44 #ifndef CEXMC_RUN_MANAGER_HH
45 #define CEXMC_RUN_MANAGER_HH
49 #ifdef CEXMC_USE_PERSISTENCY
50 #include <boost/archive/binary_oarchive.hpp>
59 class CexmcEventFastSObject;
60 #ifdef CEXMC_USE_CUSTOM_FILTER
61 class CexmcCustomFilterEval;
73 G4bool overrideExistingProject =
false );
95 #ifdef CEXMC_USE_PERSISTENCY
96 void ReadProject(
void );
98 void SaveProject(
void );
100 void PrintReadRunData(
void )
const;
102 void ReadAndPrintEventsData(
void )
const;
106 void ReplayEvents(
G4int nEvents = 0 );
108 void SeekTo(
G4int eventNmb = 1 );
110 void SkipInteractionsWithoutEDTonWrite(
G4bool on =
true );
112 #ifdef CEXMC_USE_CUSTOM_FILTER
113 void SetCustomFilter(
const G4String & cfFileName_ );
140 #ifdef CEXMC_USE_PERSISTENCY
141 boost::archive::binary_oarchive * GetEventsArchive(
void )
const;
143 boost::archive::binary_oarchive * GetFastEventsArchive(
void )
const;
156 #ifdef CEXMC_USE_PERSISTENCY
157 void DoReadEventLoop(
G4int nEvent );
159 void SaveCurrentTPTEvent(
const CexmcEventFastSObject & evFastSObject,
165 void ReadPreinitProjectData(
void );
174 G4bool shouldGdmlFileBeValidated;
190 G4bool skipInteractionsWithoutEDTonWrite;
197 G4int numberOfEventsProcessed;
199 G4int numberOfEventsProcessedEffective;
203 #ifdef CEXMC_USE_PERSISTENCY
205 boost::archive::binary_oarchive * eventsArchive;
207 boost::archive::binary_oarchive * fastEventsArchive;
209 CexmcRunSObject sObject;
211 #ifdef CEXMC_USE_CUSTOM_FILTER
212 CexmcCustomFilterEval * customFilter;
227 physicsManager = physicsManager_;
237 productionModelType = productionModelType_;
246 gdmlFileName = gdmlFileName_;
252 shouldGdmlFileBeValidated = on;
258 guiMacroName = guiMacroName_;
268 eventCountPolicy =
value;
278 evDataVerboseLevel =
value;
284 return physicsManager;
291 return productionModelType;
303 return shouldGdmlFileBeValidated;
315 return projectId !=
"";
321 return rProject !=
"";
337 #ifdef CEXMC_USE_PERSISTENCY
339 inline boost::archive::binary_oarchive * CexmcRunManager::GetEventsArchive(
342 return eventsArchive;
346 inline boost::archive::binary_oarchive * CexmcRunManager::GetFastEventsArchive(
349 return fastEventsArchive;
353 inline void CexmcRunManager::ReplayEvents(
G4int nEvents )
365 inline void CexmcRunManager::SeekTo(
G4int eventNmb )
370 curEventRead = eventNmb;
374 inline void CexmcRunManager::SkipInteractionsWithoutEDTonWrite(
G4bool on )
376 skipInteractionsWithoutEDTonWrite = on;
385 return evDataVerboseLevel;
G4bool ShouldGdmlFileBeValidated(void) const
void SetPhysicsManager(CexmcPhysicsManager *physicsManager_)
G4String GetProjectsDir(void) const
void SetupConstructionHook(void)
CexmcPhysicsManager * GetPhysicsManager(void)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
G4String GetGdmlFileName(void) const
void DoEventLoop(G4int nEvent, const char *macroFile, G4int nSelect)
virtual ~CexmcRunManager()
G4bool ProjectIsRead(void) const
CexmcEventDataVerboseLevel GetEventDataVerboseLevel(void) const
G4String GetGuiMacroName(void) const
const XML_Char int const XML_Char * value
void BeamParticleChangeHook(void)
void SetGdmlFileValidation(G4bool on=true)
void RegisterScenePrimitives(void)
G4String GetProjectId(void) const
void SetGdmlFileName(const G4String &gdmlFileName_)
void SetGuiMacroName(const G4String &guiMacroName_)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
CexmcProductionModelType GetProductionModelType(void) const
CexmcEventDataVerboseLevel
std::vector< CexmcAngularRange > CexmcAngularRangeList
CexmcRunManager(const G4String &projectId="", const G4String &rProject="", G4bool overrideExistingProject=false)
std::set< CexmcOutputDataType > CexmcOutputDataTypeSet
G4bool ProjectIsSaved(void) const
void SetProductionModelType(CexmcProductionModelType productionModelType_)
void SetEventCountPolicy(CexmcEventCountPolicy value)
void SetEventDataVerboseLevel(CexmcEventDataVerboseLevel value)