|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
Base class for slic code modules that provides common functionality, such as logging to an output stream. More...
#include <Module.hh>
Public Types | |
| enum | ModuleStatus { eOkay = 0 , eNotInitialized = 1 , eBadState = 2 , eFatalError = 3 } |
Public Member Functions | |
| 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 *) |
Public Attributes | |
| bool | m_deleteOnExit |
| LogStream * | m_log |
| std::string | m_name |
| ModuleStatus | m_status |
Protected Member Functions | |
| Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true) | |
Base class for slic code modules that provides common functionality, such as logging to an output stream.
| enum ModuleStatus |
|
protected |
Class constructor. Only subclasses can access this.
| [in] | name | The name of the Module. |
| [in] | deleteOnExit | Whether to call delete on this Module. |
| [in] | autoRegister | Whether to automatically register this Module with the ModuleRegistry. |
Definition at line 7 of file Module.cc.
References Module::getName(), Singleton< LogManager >::instance(), Singleton< ModuleRegistry >::instance(), Module::log(), Module::m_log, Module::m_name, LOG::name, LOG::okay, and LogStream::verbose().
|
virtual |
Class destructor.
Definition at line 25 of file Module.cc.
References Module::getName(), Singleton< LogManager >::instance(), Singleton< ModuleRegistry >::instance(), Module::log(), Module::m_log, and LogStream::verbose().
|
inlinevirtual |
Begin of event hook.
| [in] | event | The G4Event. |
Reimplemented in EventSourceWithInputFile, EventSourceManager, EventSource, StdHepEventSource, LHEEventSource, and LcioEventSource.
|
inlinevirtual |
Begin of run hook.
| [in] | run | The G4Run. |
Reimplemented in LcioManager, EventSourceWithInputFile, EventSourceManager, EventSource, StdHepEventSource, LHEEventSource, and LcioEventSource.
|
inlinevirtual |
|
inline |
Get whether to delete the module.
Definition at line 91 of file Module.hh.
References Module::m_deleteOnExit.
|
inlinevirtual |
End of event hook.
| [in] | event | The G4Event. |
Reimplemented in EventSourceManager, EventSource, and LcioManager.
|
inlinevirtual |
End run hook.
| [in] | run | The G4Run. |
Reimplemented in LcioManager, EventSourceManager, and EventSource.
|
inline |
Get the name of the module.
Definition at line 54 of file Module.hh.
References Module::m_name.
Referenced by Module::Module(), Module::~Module(), ModuleRegistry::deregisterModule(), and ModuleRegistry::registerModule().
|
inline |
Get the status of the module as a ModuleStatus enum.
Definition at line 62 of file Module.hh.
References Module::m_status.
|
inlinevirtual |
|
inline |
Get the LogStream for this Module.
Definition at line 99 of file Module.hh.
References Module::m_log.
Referenced by EventSourceManager::EventSourceManager(), G4MagIntegratorStepperFactory::G4MagIntegratorStepperFactory(), HepPDTManager::HepPDTManager(), Module::Module(), SlicApplication::SlicApplication(), Module::~Module(), SlicApplication::~SlicApplication(), RunManager::abortRun(), LcioHitsCollectionBuilder::addParticleContributions(), RunManager::BeamOn(), EventSourceManager::beginRun(), EventSourceWithInputFile::beginRun(), SteppingAction::checkKillTrack(), EventSourceManager::createEventSource(), G4MagIntegratorStepperFactory::createG4MagIntegratorStepper(), LcioHitsCollectionBuilder::createHit(), PhysicsListManager::createPhysicsList(), MCParticleManager::createPrimary(), MCParticleManager::createVertex(), EventSourceManager::generate(), MCParticleManager::generateEvent(), PrimaryGeneratorAction::GeneratePrimaries(), SlicApplication::getErrorCodeString(), LcioFileNamer::getFieldValue(), EventSourceManager::getSourceTypeFromFileExtension(), SlicApplication::initialize(), HepPDTManager::loadParticleData(), SlicMain::main(), LcioManager::makeAutoname(), LcioManager::openLcioFile(), ModuleRegistry::print(), PhysicsListManager::printAvailablePhysicsLists(), GPSEventSource::printCurrentEvent(), ParticleGunEventSource::printCurrentEvent(), EventSourceManager::printNumEventsGenerated(), CommandLineProcessor::printOptions(), CommandQueue::printOut(), HepPDTManager::printParticleData(), SlicApplication::printSplashScreen(), CommandLineProcessor::printUsage(), CommandLineProcessor::printVersion(), CommandLineProcessor::process(), ModuleRegistry::registerModule(), SlicApplication::run(), TrackManager::saveTrackSummaries(), LcioManager::setDetectorName(), LcioManager::setFileExistsAction(), EventSourceWithInputFile::setFilename(), LcioManager::setFilename(), LcioHitsCollectionBuilder::setLongFlag(), EventSourceManager::setLorentzTransformationAngle(), PhysicsMessenger::SetNewValue(), SlicApplicationMessenger::SetNewValue(), FieldMessenger::SetNewValue(), GeneratorMessenger::SetNewValue(), LcioManager::setPath(), LcioHitsCollectionBuilder::setPDGFlag(), LcioManager::setRunNumber(), EventSourceManager::setupEventSource(), EventAction::startEventTimer(), RunAction::startRunTimer(), EventAction::stopEventTimer(), and RunAction::stopRunTimer().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reset the state of the module.
Reimplemented in TrackManager, MCParticleManager, EventSourceWithInputFile, and EventSource.
|
inlinevirtual |
| bool m_deleteOnExit |
Definition at line 156 of file Module.hh.
Referenced by Module::deleteOnExit().
| LogStream* m_log |
Definition at line 155 of file Module.hh.
Referenced by Module::Module(), Module::~Module(), and Module::log().
| std::string m_name |
Definition at line 154 of file Module.hh.
Referenced by Module::Module(), and Module::getName().
| ModuleStatus m_status |
Definition at line 153 of file Module.hh.
Referenced by Module::getStatus().