|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
A central store for accessing Module objects. More...
#include <ModuleRegistry.hh>
Public Types | |
| typedef std::map< std::string, Module * > | ModuleMap |
Public Types inherited from Module | |
| enum | ModuleStatus { eOkay = 0 , eNotInitialized = 1 , eBadState = 2 , eFatalError = 3 } |
Public Member Functions | |
| ModuleRegistry () | |
| virtual | ~ModuleRegistry () |
| void | deleteModules () |
| void | deregisterModule (const std::string &name) |
| void | deregisterModule (Module *module) |
| Module * | findModule (const std::string &name) |
| void | print () |
| void | registerModule (Module *module) |
Public Member Functions inherited from Singleton< ModuleRegistry > | |
| Singleton () | |
| ~Singleton () | |
| void | release () |
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 *) |
Private Attributes | |
| ModuleMap | m_modules |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< ModuleRegistry > | |
| static ModuleRegistry * | instance () |
Public Attributes inherited from Module | |
| bool | m_deleteOnExit |
| LogStream * | m_log |
| std::string | m_name |
| ModuleStatus | m_status |
Protected Member Functions inherited from Module | |
| Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true) | |
A central store for accessing Module objects.
Definition at line 18 of file ModuleRegistry.hh.
A map of names to Modules.
Definition at line 25 of file ModuleRegistry.hh.
| ModuleRegistry | ( | ) |
Class constructor.
Definition at line 10 of file ModuleRegistry.cc.
|
virtual |
Class destructor.
Definition at line 14 of file ModuleRegistry.cc.
| void deleteModules | ( | ) |
Delete all modules.
Definition at line 56 of file ModuleRegistry.cc.
References ModuleRegistry::m_modules.
| void deregisterModule | ( | const std::string & | name | ) |
Remove a Module from the registry by name.
| [in] | name | The name of the Module to deregister. |
Definition at line 38 of file ModuleRegistry.cc.
References ModuleRegistry::m_modules, and LOG::name.
| void deregisterModule | ( | Module * | module | ) |
Remove a Module from the registry.
| [in] | module | The Module to deregister. |
Definition at line 34 of file ModuleRegistry.cc.
References Module::getName().
| Module * findModule | ( | const std::string & | name | ) |
Find a module by its name.
| [in] | name | The name of the Module to find. |
Definition at line 17 of file ModuleRegistry.cc.
References ModuleRegistry::m_modules, and LOG::name.
| void print | ( | ) |
Print the list of registered modules to the log.
Definition at line 46 of file ModuleRegistry.cc.
References LOG::always, LOG::endl, Module::log(), and ModuleRegistry::m_modules.
| void registerModule | ( | Module * | module | ) |
Register a module by its name.
| [in] | module | The Module to register. |
Definition at line 21 of file ModuleRegistry.cc.
References Module::getName(), Module::log(), ModuleRegistry::m_modules, and LogStream::warning().
|
private |
Definition at line 77 of file ModuleRegistry.hh.
Referenced by ModuleRegistry::deleteModules(), ModuleRegistry::deregisterModule(), ModuleRegistry::findModule(), ModuleRegistry::print(), and ModuleRegistry::registerModule().