106 #ifndef G4RunManager_h
107 #define G4RunManager_h 1
160 virtual void BeamOn(
G4int n_event,
const char* macroFile=0,
G4int n_select=-1);
182 G4bool topologyIsChanged=
true);
391 storeRandomNumberStatusToG4Event = vl;
399 { storeRandomNumberStatus = flag; }
405 if( dirStr(dirStr.length()-1) !=
'/' ) dirStr +=
"/";
409 std::replace(dirStr.begin(), dirStr.end(),
'/',
'\\');
410 G4String shellCmd =
"if not exist " + dirStr +
" mkdir ";
413 randomNumberStatusDir = dirStr;
414 G4int sysret = system(shellCmd);
417 G4String errmsg =
"\"" + shellCmd +
"\" returns non-zero value. Directory creation failed.";
428 if(storeRandomNumberStatusToG4Event==0 || storeRandomNumberStatusToG4Event==2)
429 {
G4Exception(
"GrRunManager::SetRandomNumberStoreDir",
431 "Random number status is not available for this event."); }
435 { rngStatusEventsFlag = flag; }
468 G4cerr <<
"CutOffHasBeenModified becomes obsolete." <<
G4endl;
469 G4cerr <<
"It is safe to remove invoking this method." <<
G4endl;
496 if(geometryToBeOptimized != vl)
498 geometryToBeOptimized = vl;
508 { n_perviousEventsToBeStored = val; }
525 if(i>=1 && i<=n_perviousEventsToBeStored)
526 {
return (*previousEvents)[i-1]; }
534 { runIDCounter = i; }
542 { numberOfEventToBeProcessed = val; }
void GeometryHasBeenModified(G4bool prop=true)
G4int GetVerboseLevel() const
virtual void AbortRun(G4bool softAbort=false)
G4int numberOfEventToBeProcessed
const G4String & GetVersionString() const
virtual void ProcessOneEvent(G4int i_event)
virtual void TerminateEventLoop()
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4int numberOfEventProcessed
G4UserTrackingAction * userTrackingAction
G4String randomNumberStatusForThisRun
virtual void RunTermination()
G4VUserPhysicsList * physicsList
G4String randomNumberStatusForThisEvent
const G4String & GetRandomNumberStoreDir() const
void SetVerboseLevel(G4int vl)
G4VUserActionInitialization * userActionInitialization
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4bool GetRandomNumberStore() const
G4bool storeRandomNumberStatus
G4String GetSelectMacro() const
void SetPrintProgress(G4int i)
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
virtual void RunInitialization()
G4RunManager(const G4RunManager &)
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
void SetGeometryToBeOptimized(G4bool vl)
G4bool physicsInitialized
G4VPhysicalVolume * currentWorld
const G4Event * GetPreviousEvent(G4int i) const
void SetRandomNumberStorePerEvent(G4bool flag)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
void SetRandomNumberStore(G4bool flag)
G4int GetFlagRandomNumberStatusToG4Event() const
virtual void InitializePhysics()
void ReOptimize(G4LogicalVolume *)
void SetGeometryToBeOptimized(G4bool vl)
const G4UserSteppingAction * GetUserSteppingAction() const
const G4Run * GetCurrentRun() const
virtual void InitializeGeometry()
G4bool GetGeometryToBeOptimized()
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
virtual G4bool ConfirmBeamOnCondition()
virtual void RestoreRandomNumberStatus(const G4String &fileN)
G4bool geometryInitialized
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
G4bool initializedAtLeastOnce
G4int GetNumberOfParallelWorld() const
virtual void rndmSaveThisRun()
virtual G4Event * GenerateEvent(G4int i_event)
void StoreRandomNumberStatusToG4Event(G4int vl)
G4bool geometryToBeOptimized
const G4UserStackingAction * GetUserStackingAction() const
const G4String & GetVersionString() const
G4UserWorkerInitialization * userWorkerInitialization
G4String randomNumberStatusDir
void PhysicsHasBeenModified()
RMType GetRunManagerType() const
G4bool rngStatusEventsFlag
virtual void ConstructScoringWorlds()
virtual void AnalyzeEvent(G4Event *anEvent)
const G4String & GetRandomNumberStatusForThisRun() const
G4int storeRandomNumberStatusToG4Event
G4UserEventAction * userEventAction
virtual void rndmSaveThisEvent()
G4bool GetRandomNumberStorePerEvent() const
const G4UserEventAction * GetUserEventAction() const
virtual void DeleteUserInitializations()
G4int GetNumberOfEventsToBeProcessed() const
const G4UserTrackingAction * GetUserTrackingAction() const
const G4VUserActionInitialization * GetUserActionInitialization() const
G4UserRunAction * userRunAction
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int GetNumberOfSelectEvents() const
void SetNumberOfEventsToBeProcessed(G4int val)
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
static G4RunManager * GetRunManager()
void SetDCtable(G4DCtable *DCtbl)
virtual void DoEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
void SetRunIDCounter(G4int i)
void ReOptimizeMotherOf(G4VPhysicalVolume *)
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void Initialize()
void SetNumberOfEventsToBeStored(G4int val)
void StackPreviousEvent(G4Event *anEvent)
const G4String & GetRandomNumberStatusForThisEvent() const
void GeometryHasBeenModified()
virtual void AbortEvent()
void CutOffHasBeenModified()
G4RunManagerKernel * kernel
const G4UserRunAction * GetUserRunAction() const
void StoreRandomNumberStatusToG4Event(G4int vl)
G4EventManager * eventManager
const G4Event * GetCurrentEvent() const
const G4VUserPhysicsList * GetUserPhysicsList() const
virtual void TerminateOneEvent()
void PhysicsHasBeenModified()
void SetRandomNumberStoreDir(const G4String &dir)
G4VUserDetectorConstruction * userDetector
G4UserSteppingAction * userSteppingAction
G4RunMessenger * runMessenger
void SetVerboseLevel(G4int vl)
G4Run * GetNonConstCurrentRun() const
std::vector< G4Event * > * previousEvents
void DumpRegion(const G4String &rname) const
G4RunManager & operator=(const G4RunManager &)
G4int n_perviousEventsToBeStored
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
static G4ThreadLocal G4RunManager * fRunManager
G4GLOB_DLL std::ostream G4cerr
G4UserStackingAction * userStackingAction
virtual void SetUserAction(G4UserRunAction *userAction)