Geant4 VMC Version 6.6
|
Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at run level. More...
#include <TG4RunManager.h>
Public Member Functions | |
TG4RunManager (TG4RunConfiguration *configuration, int argc=0, char **argv=0) | |
virtual | ~TG4RunManager () |
void | Initialize () |
void | LateInitialize () |
void | CacheMCStack () |
void | ProcessEvent () |
void | ProcessEvent (G4int eventId, G4bool isInterruptible) |
Bool_t | ProcessRun (G4int nofEvents) |
Bool_t | FinishRun () |
Int_t | CurrentEvent () const |
Bool_t | SecondariesAreOrdered () const |
void | CreateGeantUI () |
void | StartGeantUI () |
void | StartRootUI () |
void | ProcessGeantMacro (G4String macroName) |
void | ProcessRootMacro (G4String macroName) |
void | ProcessGeantCommand (G4String command) |
void | ProcessRootCommand (G4String command) |
void | UseG3Defaults () |
void | UseRootRandom (G4bool useRootRandom) |
void | SetRandomSeed () |
picks up random seed from ROOT gRandom and propagates to Geant4 | |
Public Member Functions inherited from TG4Verbose | |
TG4Verbose (const G4String &cmdName) | |
TG4Verbose (const G4String &cmdName, G4int verboseLevel) | |
virtual | ~TG4Verbose () |
virtual void | VerboseLevel (G4int level) |
virtual G4int | VerboseLevel () const |
Static Public Member Functions | |
static TG4RunManager * | Instance () |
Private Member Functions | |
TG4RunManager () | |
Not implemented. | |
TG4RunManager (const TG4RunManager &right) | |
Not implemented. | |
TG4RunManager & | operator= (const TG4RunManager &right) |
Not implemented. | |
void | ConfigureRunManager () |
void | CloneRootNavigatorForWorker () |
void | FilterARGV (const G4String &option) |
void | CreateRootUI () |
Private Attributes | |
G4RunManager * | fRunManager |
G4RunManager. | |
TG4RunMessenger | fMessenger |
messenger | |
TG4RunConfiguration * | fRunConfiguration |
TG4RunConfiguration. | |
TG4VRegionsManager * | fRegionsManager |
regions manager | |
G4UIExecutive * | fGeantUISession |
G4 UI. | |
TApplication * | fRootUISession |
Root UI. | |
G4bool | fRootUIOwner |
ownership of Root UI | |
G4int | fARGC |
argc | |
char ** | fARGV |
argv | |
G4bool | fUseRootRandom |
the option to use Root random number seed | |
G4bool | fIsMCStackCached |
the flag to cache MC stack only once | |
G4bool | fHasEventByEventInitialization |
Flag event-by-event processing. | |
G4int | fNEventsProcessed |
Number of events processed in event-by-event mode. | |
G4bool | fInProcessRun |
flag while being in BeamOn | |
Static Private Attributes | |
static TG4RunManager * | fgMasterInstance = 0 |
master instance | |
static G4ThreadLocal TG4RunManager * | fgInstance = 0 |
thread local instance | |
Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at run level.
It provides also methods for switching between Geant4 and Root UIs.
Definition at line 44 of file TG4RunManager.h.
TG4RunManager::TG4RunManager | ( | TG4RunConfiguration * | configuration, |
int | argc = 0, | ||
char ** | argv = 0 ) |
Standard constructor
Definition at line 84 of file TG4RunManager.cxx.
|
virtual |
Destructor
Definition at line 153 of file TG4RunManager.cxx.
|
private |
Not implemented.
|
private |
Not implemented.
|
inlinestatic |
Return this instance
Definition at line 124 of file TG4RunManager.h.
Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries(), and TG4WorkerInitialization::WorkerRunStart().
void TG4RunManager::Initialize | ( | ) |
void TG4RunManager::LateInitialize | ( | ) |
Finish initialization of G4 after the G4Run initialization is finished.
Definition at line 436 of file TG4RunManager.cxx.
Referenced by TGeant4::BuildPhysics(), and TG4WorkerInitialization::WorkerRunStart().
void TG4RunManager::CacheMCStack | ( | ) |
Cache the pointer to thread-local VMC stack
Definition at line 497 of file TG4RunManager.cxx.
Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries().
void TG4RunManager::ProcessEvent | ( | ) |
Process one event using internal event counter
Definition at line 530 of file TG4RunManager.cxx.
Referenced by ProcessEvent(), TGeant4::ProcessEvent(), TGeant4::ProcessEvent(), and TGeant4::ProcessEvent().
void TG4RunManager::ProcessEvent | ( | G4int | eventId, |
G4bool | isInterruptible ) |
Process one event using event ID given as argument
Definition at line 538 of file TG4RunManager.cxx.
Bool_t TG4RunManager::ProcessRun | ( | G4int | nofEvents | ) |
Process Geant4 run.
Definition at line 563 of file TG4RunManager.cxx.
Referenced by TGeant4::ProcessRun().
Bool_t TG4RunManager::FinishRun | ( | ) |
Definition at line 581 of file TG4RunManager.cxx.
Referenced by TGeant4::FinishRun(), and ProcessRun().
Int_t TG4RunManager::CurrentEvent | ( | ) | const |
Return the number of the current event.
Definition at line 718 of file TG4RunManager.cxx.
Referenced by TGeant4::CurrentEvent().
Bool_t TG4RunManager::SecondariesAreOrdered | ( | ) | const |
Since transition to G4SmartTrackStack in Geant4 9.6.x secondaries are not ordered even when the special stacking is activated.
Definition at line 727 of file TG4RunManager.cxx.
Referenced by TGeant4::SecondariesAreOrdered().
void TG4RunManager::CreateGeantUI | ( | ) |
Create interactive Geant4.
Definition at line 608 of file TG4RunManager.cxx.
Referenced by TGeant4::Init(), and StartGeantUI().
void TG4RunManager::StartGeantUI | ( | ) |
Start interactive/batch Geant4.
Definition at line 619 of file TG4RunManager.cxx.
Referenced by TGeant4::StartGeantUI().
void TG4RunManager::StartRootUI | ( | ) |
Start interactive Root.
Definition at line 637 of file TG4RunManager.cxx.
Referenced by TG4RunMessenger::SetNewValue(), and TGeant4::StartRootUI().
void TG4RunManager::ProcessGeantMacro | ( | G4String | macroName | ) |
Process Geant4 macro.
Definition at line 650 of file TG4RunManager.cxx.
Referenced by TGeant4::ProcessGeantMacro().
void TG4RunManager::ProcessRootMacro | ( | G4String | macroName | ) |
Process Root macro.
Definition at line 659 of file TG4RunManager.cxx.
Referenced by TG4RunMessenger::SetNewValue().
void TG4RunManager::ProcessGeantCommand | ( | G4String | command | ) |
Process Geant4 command.
Definition at line 675 of file TG4RunManager.cxx.
Referenced by TGeant4::ProcessGeantCommand(), and ProcessGeantMacro().
void TG4RunManager::ProcessRootCommand | ( | G4String | command | ) |
Process Root command.
Definition at line 701 of file TG4RunManager.cxx.
Referenced by TG4RunMessenger::SetNewValue().
void TG4RunManager::UseG3Defaults | ( | ) |
Control G3 defaults usage.
Definition at line 709 of file TG4RunManager.cxx.
Referenced by TG4RunMessenger::SetNewValue().
|
inline |
Set the option whether to use Root random number seed
Definition at line 130 of file TG4RunManager.h.
Referenced by TG4RunMessenger::SetNewValue().
void TG4RunManager::SetRandomSeed | ( | ) |
picks up random seed from ROOT gRandom and propagates to Geant4
Pass the random number seed from gRandom to Geant4 random number generator
Definition at line 392 of file TG4RunManager.cxx.
Referenced by LateInitialize(), and TGeant4::SetRandomSeed().
|
private |
Not implemented.
|
private |
Set the user action classes defined by TG4RunConfiguration to G4RunManager.
Definition at line 175 of file TG4RunManager.cxx.
Referenced by TG4RunManager().
|
private |
Definition at line 311 of file TG4RunManager.cxx.
Referenced by TG4RunManager().
|
private |
Filter out the option argument from the arguments list fARGV, if present.
Definition at line 375 of file TG4RunManager.cxx.
Referenced by CreateRootUI().
|
private |
Get/Create Root interactive session
Definition at line 340 of file TG4RunManager.cxx.
Referenced by StartRootUI().
|
staticprivate |
master instance
Definition at line 99 of file TG4RunManager.h.
Referenced by TG4RunManager(), and ~TG4RunManager().
|
staticprivate |
thread local instance
this instance
Definition at line 102 of file TG4RunManager.h.
Referenced by Instance(), TG4RunManager(), and ~TG4RunManager().
|
private |
G4RunManager.
Definition at line 105 of file TG4RunManager.h.
Referenced by ConfigureRunManager(), CurrentEvent(), FinishRun(), Initialize(), ProcessEvent(), ProcessRun(), TG4RunManager(), and ~TG4RunManager().
|
private |
messenger
Definition at line 106 of file TG4RunManager.h.
|
private |
Definition at line 107 of file TG4RunManager.h.
Referenced by CloneRootNavigatorForWorker(), ConfigureRunManager(), LateInitialize(), TG4RunManager(), and ~TG4RunManager().
|
private |
regions manager
Definition at line 108 of file TG4RunManager.h.
Referenced by ConfigureRunManager(), LateInitialize(), TG4RunManager(), and ~TG4RunManager().
|
private |
G4 UI.
Definition at line 109 of file TG4RunManager.h.
Referenced by CreateGeantUI(), StartGeantUI(), TG4RunManager(), and ~TG4RunManager().
|
private |
Root UI.
Definition at line 110 of file TG4RunManager.h.
Referenced by CreateRootUI(), StartRootUI(), TG4RunManager(), and ~TG4RunManager().
|
private |
ownership of Root UI
Definition at line 111 of file TG4RunManager.h.
Referenced by CreateRootUI(), and ~TG4RunManager().
|
private |
argc
Definition at line 112 of file TG4RunManager.h.
Referenced by CreateGeantUI(), CreateRootUI(), FilterARGV(), and TG4RunManager().
|
private |
argv
Definition at line 113 of file TG4RunManager.h.
Referenced by CreateGeantUI(), CreateRootUI(), FilterARGV(), and TG4RunManager().
|
private |
the option to use Root random number seed
Definition at line 114 of file TG4RunManager.h.
Referenced by LateInitialize(), and UseRootRandom().
|
private |
the flag to cache MC stack only once
Definition at line 115 of file TG4RunManager.h.
Referenced by CacheMCStack().
|
private |
Flag event-by-event processing.
Definition at line 116 of file TG4RunManager.h.
Referenced by FinishRun(), ProcessEvent(), and ProcessRun().
|
private |
Number of events processed in event-by-event mode.
Definition at line 118 of file TG4RunManager.h.
Referenced by FinishRun(), ProcessEvent(), and ProcessRun().
|
private |
flag while being in BeamOn
Definition at line 119 of file TG4RunManager.h.
Referenced by FinishRun(), and ProcessRun().