Belle II Software development
|
The run manager controls the flow of the Geant4 program and manages the event loop(s) within a run. More...
#include <RunManager.h>
Classes | |
class | SingletonDestroyer |
Destroyer class to delete the instance of the RunManager class when the program terminates. More... | |
Public Member Functions | |
void | beginRun (int runNumber) |
Prepares Geant4 for a new run. | |
void | processEvent (int evtNumber) |
Process a single event in Geant4. | |
void | endRun () |
Terminates a Geant4 run. | |
void | destroy () |
Destroys the RunManager at the end of the simulation. | |
void | Initialize () |
Initialize the Kernel. | |
void | addAssemblyVolume (G4AssemblyVolume *vol) |
Register a G4AssemblyVolume. | |
Static Public Member Functions | |
static RunManager & | Instance () |
Static method to get a reference to the RunManager instance. | |
Private Member Functions | |
RunManager () | |
The constructor is hidden to avoid that someone creates an instance of this class. | |
RunManager (const RunManager &) | |
Disable/Hide the copy constructor. | |
RunManager & | operator= (const RunManager &) |
Disable/Hide the copy assignment operator. | |
virtual | ~RunManager () |
The RunManager destructor. | |
Private Attributes | |
std::vector< G4AssemblyVolume * > | m_AssemblyVolumes |
Vector of pointers to G4AssemblyVolumes. | |
RandomEngine * | m_randomEngine |
Pointer to RandomEngine to avoid memory leak by creating it in the constructor and deleting it in the destructor. | |
Static Private Attributes | |
static RunManager * | m_instance = NULL |
Pointer that saves the instance of this class. | |
Friends | |
class | SingletonDestroyer |
The run manager controls the flow of the Geant4 program and manages the event loop(s) within a run.
The run manager is also responsible for managing initialization procedures, including methods in the user initialization classes. By definition of Geant4, this class has to be a singleton.
Definition at line 32 of file RunManager.h.
|
private |
The constructor is hidden to avoid that someone creates an instance of this class.
Definition at line 125 of file RunManager.cc.
|
privatevirtual |
|
inline |
Register a G4AssemblyVolume.
Definition at line 68 of file RunManager.h.
void beginRun | ( | int | runNumber | ) |
Prepares Geant4 for a new run.
runNumber | The current number of the run. |
Definition at line 49 of file RunManager.cc.
void destroy | ( | ) |
Destroys the RunManager at the end of the simulation.
Required by Geant4.
Definition at line 85 of file RunManager.cc.
void endRun | ( | ) |
void Initialize | ( | ) |
Initialize the Kernel.
Definition at line 35 of file RunManager.cc.
|
static |
Static method to get a reference to the RunManager instance.
Definition at line 29 of file RunManager.cc.
void processEvent | ( | int | evtNumber | ) |
Process a single event in Geant4.
evtNumber | The current number of the event. |
Definition at line 67 of file RunManager.cc.
|
friend |
Definition at line 103 of file RunManager.h.
|
private |
Vector of pointers to G4AssemblyVolumes.
Definition at line 87 of file RunManager.h.
|
staticprivate |
Pointer that saves the instance of this class.
Definition at line 84 of file RunManager.h.
|
private |
Pointer to RandomEngine to avoid memory leak by creating it in the constructor and deleting it in the destructor.
Definition at line 90 of file RunManager.h.