101#ifndef G4RunManager_hh
102#define G4RunManager_hh 1
167 virtual void BeamOn(
G4int n_event,
const char* macroFile =
nullptr,
G4int n_select = -1);
234 G4int n_select = -1);
290 G4cerr <<
"CutOffHasBeenModified becomes obsolete." <<
G4endl;
291 G4cerr <<
"It is safe to remove invoking this method." <<
G4endl;
308 kernel->GeometryHasBeenModified();
309 kernel->SetGeometryToBeOptimized(vl);
392 eventManager->GetStackManager()->SetNumberOfAdditionalWaitingStacks(iAdd);
402 {
eventManager->GetStackManager()->SetDefaultClassification(ts,val,es); }
406 {
eventManager->GetStackManager()->SetDefaultClassification(pd,val,es); }
413 kernel->SetPrimaryTransformer(pt);
437 if (dirStr.back() !=
'/') dirStr +=
"/";
441 std::replace(dirStr.begin(), dirStr.end(),
'/',
'\\');
442 G4String shellCmd =
"if not exist " + dirStr +
" mkdir ";
446 G4int sysret = system(shellCmd);
448 G4String errmsg =
"\"" + shellCmd +
"\" returns non-zero value. Directory creation failed.";
462 "Random number status is not available for this event.");
472 kernel->SetVerboseLevel(vl);
502 for (
G4int j = 1; j < i; ++j) {
537 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
542 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
547 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
553 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
559 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
564 "Base class method is invoked for RunManager that is not a worker in sub-event parallel mode");
570 "Base class method is invoked for RunManager that is not a worker in sub-event parallel mode");
577 "Base class method is invoked for a RunManager that is not sub-event parallel mode");
586 {
if(
kernel!=
nullptr)
kernel->ResetNavigatorAtInitialization(val); }
G4ClassificationOfNewTrack
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cerr
const G4UserTrackingAction * GetUserTrackingAction() const
virtual void RegisterSubEventType(G4int, G4int)
G4bool isScoreNtupleWriter
G4bool geometryInitialized
virtual void CleanUpPreviousEvents()
virtual void MergeTrajectories(const G4SubEvent *, const G4Event *)
virtual 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()
virtual void UpdateScoringForSubEvent(const G4SubEvent *, const G4Event *)
virtual void ReportEventDeletion(const G4Event *evt)
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
void SetDefaultClassification(const G4ParticleDefinition *pd, G4ClassificationOfNewTrack val, G4ExceptionSeverity es=G4ExceptionSeverity::IgnoreTheIssue)
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()
void SetDefaultClassification(G4TrackStatus ts, G4ClassificationOfNewTrack val, G4ExceptionSeverity es=G4ExceptionSeverity::IgnoreTheIssue)
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
virtual void DeleteUserInitializations()
const G4Event * GetPreviousEvent(G4int i) const
G4RunManagerKernel * kernel
virtual G4bool ConfirmBeamOnCondition()
G4bool geometryToBeOptimized
virtual void TrajectoriesToBeMerged(G4bool)
virtual void RestoreRndmEachEvent(G4bool)
static G4RunManager * GetRunManager()
virtual void AbortEvent()
virtual void rndmSaveThisRun()
virtual void InitializePhysics()
G4String randomNumberStatusForThisRun
virtual G4int GetSubEventType() const
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
virtual void StackPreviousEvent(G4Event *anEvent)
static G4RUN_DLL G4bool fGeometryHasBeenDestroyed
void ReOptimize(G4LogicalVolume *)
const G4String & GetRandomNumberStatusForThisRun() const
void SetNumberOfEventsToBeProcessed(G4int val)
void ResetNavigatorAtInitialization(G4bool val=true)
void SetVerboseLevel(G4int vl)
G4bool GetRandomNumberStore() const
const G4VUserPhysicsList * GetUserPhysicsList() const
G4VUserDetectorConstruction * userDetector
const G4String & GetRandomNumberStoreDir() const
virtual void SetSubEventType(G4int)
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
void UpdateScoring(const G4Event *evt=nullptr)
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
virtual const G4SubEvent * GetSubEvent(G4int, G4bool &, G4long &, G4long &, G4long &, G4bool)
const G4UserRunAction * GetUserRunAction() const
virtual std::size_t GetMaxNTrack() 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()
G4bool storeRandomNumberStatus
virtual G4Event * GenerateEvent(G4int i_event)
virtual void SubEventFinished(const G4SubEvent *, const G4Event *)
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()
friend class G4RunManagerFactory
G4UserStackingAction * userStackingAction
G4int GetVerboseLevel() const
virtual void ConstructScoringWorlds()
void SetPrintProgress(G4int i)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4UserSteppingAction * userSteppingAction