101#ifndef G4RunManager_hh
102#define G4RunManager_hh 1
163 virtual void BeamOn(
G4int n_event,
const char* macroFile =
nullptr,
164 G4int n_select = -1);
189 G4bool topologyIsChanged =
true);
222 G4int n_select = -1);
241 const char* macroFile =
nullptr,
242 G4int n_select = -1);
303 G4cerr <<
"CutOffHasBeenModified becomes obsolete." <<
G4endl;
304 G4cerr <<
"It is safe to remove invoking this method." <<
G4endl;
467 if(dirStr.back() !=
'/')
472 std::replace(dirStr.begin(), dirStr.end(),
'/',
'\\');
473 G4String shellCmd =
"if not exist " + dirStr +
" mkdir ";
477 G4int sysret = system(shellCmd);
481 +
"\" returns non-zero value. Directory creation failed.";
482 G4Exception(
"GrRunManager::SetRandomNumberStoreDir",
"Run0071",
500 G4Exception(
"GrRunManager::SetRandomNumberStoreDir",
"Run0072",
502 "Random number status is not available for this event.");
550 for(
G4int j = 1; j < i; ++j)
668 std::unique_ptr<ProfilerConfig> masterRunProfiler;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cerr
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
void StoreRandomNumberStatusToG4Event(G4int vl)
void GeometryHasBeenModified()
void PhysicsHasBeenModified()
void SetGeometryToBeOptimized(G4bool vl)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
const G4String & GetVersionString() const
void SetVerboseLevel(G4int vl)
const G4UserTrackingAction * GetUserTrackingAction() const
G4bool isScoreNtupleWriter
G4bool geometryInitialized
void CleanUpPreviousEvents()
void CleanUpUnnecessaryEvents(G4int keepNEvents)
G4int storeRandomNumberStatusToG4Event
G4UserWorkerInitialization * userWorkerInitialization
virtual void SetNumberOfThreads(G4int)
virtual void AbortRun(G4bool softAbort=false)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
virtual void Initialize()
std::list< G4Event * > * previousEvents
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
void SetRunIDCounter(G4int i)
G4RunManager(const G4RunManager &)=delete
virtual G4int GetNumberOfThreads() const
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
G4bool geometryDirectlyUpdated
G4int numberOfEventProcessed
virtual void RestoreRandomNumberStatus(const G4String &fileN)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
G4int GetNumberOfEventsToBeProcessed() const
const G4UserEventAction * GetUserEventAction() const
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
G4UserEventAction * userEventAction
const G4VUserActionInitialization * GetUserActionInitialization() const
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void SetRandomNumberStoreDir(const G4String &dir)
G4Run * GetNonConstCurrentRun() const
virtual void rndmSaveThisEvent()
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
virtual void DeleteUserInitializations()
const G4Event * GetPreviousEvent(G4int i) const
G4RunManagerKernel * kernel
virtual G4bool ConfirmBeamOnCondition()
G4bool geometryToBeOptimized
virtual void RestoreRndmEachEvent(G4bool)
static G4RunManager * GetRunManager()
virtual void AbortEvent()
virtual void rndmSaveThisRun()
virtual void InitializePhysics()
G4String randomNumberStatusForThisRun
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
static G4bool IfGeometryHasBeenDestroyed()
G4UserRunAction * userRunAction
const G4String & GetRandomNumberStatusForThisEvent() const
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
const G4UserStackingAction * GetUserStackingAction() const
G4bool rngStatusEventsFlag
G4RunManager & operator=(const G4RunManager &)=delete
const G4String & GetVersionString() const
virtual void InitializeGeometry()
RMType GetRunManagerType() const
virtual void RunTermination()
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
const G4UserSteppingAction * GetUserSteppingAction() const
void SetDCtable(G4DCtable *DCtbl)
void SetNumberOfEventsToBeStored(G4int val)
const G4String & GetSelectMacro() const
G4bool physicsInitialized
G4VUserActionInitialization * userActionInitialization
void PhysicsHasBeenModified()
G4VPhysicalVolume * currentWorld
const G4Event * GetCurrentEvent() const
void StackPreviousEvent(G4Event *anEvent)
static G4RUN_DLL G4bool fGeometryHasBeenDestroyed
void ReOptimize(G4LogicalVolume *)
const G4String & GetRandomNumberStatusForThisRun() const
void SetNumberOfEventsToBeProcessed(G4int val)
void SetVerboseLevel(G4int vl)
G4bool GetRandomNumberStore() const
const G4VUserPhysicsList * GetUserPhysicsList() const
G4VUserDetectorConstruction * userDetector
const G4String & GetRandomNumberStoreDir() const
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
const G4Run * GetCurrentRun() const
G4int numberOfEventToBeProcessed
G4int GetNumberOfParallelWorld() const
G4String randomNumberStatusDir
virtual void TerminateEventLoop()
virtual void SetUserAction(G4UserRunAction *userAction)
void SetRandomNumberStorePerEvent(G4bool flag)
G4String randomNumberStatusForThisEvent
const G4UserRunAction * GetUserRunAction() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
void GeometryHasBeenModified(G4bool prop=true)
void SetGeometryToBeOptimized(G4bool vl)
G4UserTrackingAction * userTrackingAction
G4int n_perviousEventsToBeStored
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
void ReOptimizeMotherOf(G4VPhysicalVolume *)
void GeometryDirectlyUpdated(G4bool val=true)
void StoreRandomNumberStatusToG4Event(G4int vl)
virtual void ProcessOneEvent(G4int i_event)
void CutOffHasBeenModified()
virtual void ConfigureProfilers(const std::vector< std::string > &args={})
G4bool storeRandomNumberStatus
virtual G4Event * GenerateEvent(G4int i_event)
G4int GetFlagRandomNumberStatusToG4Event() const
void SetRandomNumberStore(G4bool flag)
G4bool initializedAtLeastOnce
G4EventManager * eventManager
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void DoEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
virtual void TerminateOneEvent()
virtual void RunInitialization()
void DumpRegion(const G4String &rname) const
G4int GetNumberOfSelectEvents() const
G4VUserPhysicsList * physicsList
virtual void AnalyzeEvent(G4Event *anEvent)
G4bool GetRandomNumberStorePerEvent() const
G4bool GetGeometryToBeOptimized()
G4UserStackingAction * userStackingAction
G4int GetVerboseLevel() const
virtual void ConstructScoringWorlds()
void SetPrintProgress(G4int i)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4UserSteppingAction * userSteppingAction