SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RunManager Class Reference

Extension of G4RunManager. More...

#include <RunManager.hh>

Inheritance diagram for RunManager:
Module

Public Member Functions

 RunManager ()
 
virtual ~RunManager ()
 
void abortRun ()
 
void abortRun (int errorCode)
 
int getNumberOfEventsToRun ()
 
void Initialize ()
 
bool isRunAborted ()
 
- Public Member Functions inherited from Module
virtual ~Module ()
 
virtual void beginEvent (const G4Event *)
 
virtual void beginRun (const G4Run *)
 
virtual void cleanup ()
 
bool deleteOnExit ()
 
virtual void endEvent (const G4Event *)
 
virtual void endRun (const G4Run *)
 
const std::string & getName () const
 
ModuleStatus getStatus () const
 
virtual void initialize ()
 
LogStream & log ()
 
virtual void postTracking (const G4Track *)
 
virtual void preTracking (const G4Track *)
 
virtual void reset ()
 
virtual void stepping (const G4Step *)
 

Static Public Member Functions

static RunManager * instance ()
 

Protected Member Functions

void BeamOn (G4int nevent, const char *macroFile=0, G4int nselect=-1)
 
void InitializeGeometry ()
 
void InitializePhysics ()
 
- Protected Member Functions inherited from Module
 Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true)
 

Private Attributes

bool m_abortRun
 
int m_numberOfEventsToRun
 
PluginManager * m_pluginManager
 

Additional Inherited Members

- Public Types inherited from Module
enum  ModuleStatus { eOkay = 0 , eNotInitialized = 1 , eBadState = 2 , eFatalError = 3 }
 
- Public Attributes inherited from Module
bool m_deleteOnExit
 
LogStream * m_log
 
std::string m_name
 
ModuleStatus m_status
 

Detailed Description

Extension of G4RunManager.

Note
Initializes the default physics list setup using PhysicsListManager.

Definition at line 18 of file RunManager.hh.

Constructor & Destructor Documentation

◆ RunManager()

Class constructor.

Definition at line 25 of file RunManager.cc.

◆ ~RunManager()

~RunManager ( )
virtual

Class destructor.

Definition at line 29 of file RunManager.cc.

References RunManager::m_pluginManager.

Member Function Documentation

◆ abortRun() [1/2]

void abortRun ( )
inline

◆ abortRun() [2/2]

void abortRun ( int  errorCode)
inline

Abort the current run with an error code.

Parameters
[in]errorCodeThe error code.

Definition at line 60 of file RunManager.hh.

References LOG::done, LOG::fatal, Singleton< SlicApplication >::instance(), Module::log(), RunManager::m_abortRun, LOG::name, and LOG::sep.

◆ BeamOn()

void BeamOn ( G4int  nevent,
const char *  macroFile = 0,
G4int  nselect = -1 
)
protected

This method overrides the Geant4 implementation. The super class's method is called but wrapped in code for application control flow.

Parameters
[in]neventThe number of events to execute.
[in]macroFileA macro file to be executed after each event (not used by SLIC).
[in]nselectThe number of events to wait before macro execution.

Definition at line 113 of file RunManager.cc.

References RunManager::abortRun(), LOG::done, SlicApplication::EVENT_UNDERFLOW, LOG::fatal, SlicApplication::GENERATOR_NOT_SETUP, EventSourceManager::getNumEventsGenerated(), LOG::head, RunManager::Initialize(), Singleton< SlicApplication >::instance(), Singleton< EventSourceManager >::instance(), RunManager::isRunAborted(), Module::log(), RunManager::m_abortRun, RunManager::m_numberOfEventsToRun, SlicApplication::OKAY, EventSourceManager::printNumEventsGenerated(), and LOG::warning.

◆ getNumberOfEventsToRun()

int getNumberOfEventsToRun ( )

Get the number of events to run.

Returns
The number of events to run.

Definition at line 154 of file RunManager.cc.

References RunManager::m_numberOfEventsToRun.

◆ Initialize()

void Initialize ( )

◆ InitializeGeometry()

void InitializeGeometry ( )
protected

Initialize the current geometry configuration.

Definition at line 101 of file RunManager.cc.

References RunManager::abortRun(), Singleton< SlicApplication >::instance(), and SlicApplication::INVALID_GEOMETRY_SETUP.

◆ InitializePhysics()

void InitializePhysics ( )
protected

Initialize the current physics configuration.

Definition at line 78 of file RunManager.cc.

References PhysicsListManager::enableLimits(), LOG::endl, Singleton< PhysicsListManager >::instance(), and PhysicsListManager::setupUserLimitsProcesses().

◆ instance()

static RunManager* instance ( )
inlinestatic

◆ isRunAborted()

bool isRunAborted ( )

Return true if run has been aborted.

Returns
True if run has been aborted; false if not.

Definition at line 158 of file RunManager.cc.

References RunManager::m_abortRun.

Referenced by RunManager::BeamOn().

Member Data Documentation

◆ m_abortRun

bool m_abortRun
private

◆ m_numberOfEventsToRun

int m_numberOfEventsToRun
private

Definition at line 107 of file RunManager.hh.

Referenced by RunManager::BeamOn(), and RunManager::getNumberOfEventsToRun().

◆ m_pluginManager

PluginManager* m_pluginManager
private

Definition at line 109 of file RunManager.hh.

Referenced by RunManager::~RunManager(), and RunManager::Initialize().


The documentation for this class was generated from the following files: