|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
Manages user sim plugins. More...
#include <PluginManager.hh>
Public Types | |
| typedef std::vector< UserActionPlugin * > | PluginVec |
Public Member Functions | |
| PluginManager () | |
| virtual | ~PluginManager () |
| void | beginEvent (const G4Event *anEvent) |
| void | beginRun (const G4Run *aRun) |
| void | create (const std::string &pluginName, const std::string &libName) |
| void | destroy (const std::string &pluginName) |
| void | endEvent (const G4Event *anEvent) |
| void | endRun (const G4Run *aRun) |
| UserActionPlugin * | findPlugin (const std::string &pluginName) |
| void | generatePrimary (G4Event *anEvent) |
| void | postTracking (const G4Track *aTrack) |
| void | preTracking (const G4Track *aTrack) |
| std::ostream & | print (std::ostream &os) |
| G4ClassificationOfNewTrack | stackingClassifyNewTrack (const G4Track *aTrack) |
| Return a track classification from the user plugins that have stacking actions. Activate the track classification hook of registered plugins. More... | |
| void | stackingNewStage () |
| void | stackingPrepareNewEvent () |
| void | stepping (const G4Step *aStep) |
Private Member Functions | |
| void | deregisterPlugin (UserActionPlugin *plugin) |
| void | destroy (UserActionPlugin *plugin) |
| void | destroyPlugins () |
| void | registerPlugin (UserActionPlugin *plugin) |
Private Attributes | |
| PluginLoader | pluginLoader_ |
| PluginVec | plugins_ |
Manages user sim plugins.
Definition at line 35 of file PluginManager.hh.
| typedef std::vector<UserActionPlugin*> PluginVec |
Vector of plugins.
Definition at line 42 of file PluginManager.hh.
|
inline |
Class constructor.
Definition at line 47 of file PluginManager.hh.
|
virtual |
Class destructor. This will destroy all the currently registered plugins.
Definition at line 5 of file PluginManager.cc.
References PluginManager::destroyPlugins().
| void beginEvent | ( | const G4Event * | anEvent | ) |
Activate the begin event hook of registered plugins.
| anEvent | The Geant4 event. |
Definition at line 49 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by EventAction::BeginOfEventAction().
| void beginRun | ( | const G4Run * | aRun | ) |
Activate the begin run hook for registered plugins.
| aRun | The Geant4 run that is beginning. |
Definition at line 9 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by RunAction::BeginOfRunAction().
| void create | ( | const std::string & | pluginName, |
| const std::string & | libName | ||
| ) |
Create a new plugin by name from the given library.
| pluginName | The name of the plugin. |
| libName | The name of the shared library. |
Definition at line 124 of file PluginManager.cc.
References PluginLoader::create(), LOG::endl, PluginManager::findPlugin(), PluginManager::pluginLoader_, and PluginManager::registerPlugin().
Referenced by PluginMessenger::SetNewValue().
|
private |
De-register a plugin.
| plugin | Pointer to plugin that should be de-registered. |
Definition at line 159 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by PluginManager::destroy().
| void destroy | ( | const std::string & | pluginName | ) |
Destroy a plugin by name.
| pluginName | The name of the plugin. |
Definition at line 134 of file PluginManager.cc.
References PluginManager::findPlugin().
Referenced by PluginManager::destroyPlugins(), and PluginMessenger::SetNewValue().
|
private |
Destroy a plugin.
| plugin | Pointer to plugin that should be destroyed. |
Definition at line 141 of file PluginManager.cc.
References PluginManager::deregisterPlugin(), PluginLoader::destroy(), and PluginManager::pluginLoader_.
|
private |
Destroy all registered plugins.
Definition at line 166 of file PluginManager.cc.
References PluginManager::destroy(), and PluginManager::plugins_.
Referenced by PluginManager::~PluginManager().
| void endEvent | ( | const G4Event * | anEvent | ) |
Activate the end event hook of registered plugins.
| anEvent | The Geant4 event. |
Definition at line 57 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by EventAction::EndOfEventAction().
| void endRun | ( | const G4Run * | aRun | ) |
Activate the end run hook of registered plugins.
| aRun | The Geant4 run that is ending. |
Definition at line 17 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by RunAction::EndOfRunAction().
| UserActionPlugin * findPlugin | ( | const std::string & | pluginName | ) |
Find a plugin by name.
| pluginName | The name of the plugin. |
Definition at line 113 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by PluginManager::create(), and PluginManager::destroy().
| void generatePrimary | ( | G4Event * | anEvent | ) |
Activate the generate primary hook of registered plugins.
| anEvent | The Geant4 event. |
Definition at line 65 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by PrimaryGeneratorAction::GeneratePrimaries().
| void postTracking | ( | const G4Track * | aTrack | ) |
Activate the post-tracking hook of registered plugins.
| aTrack | The Geant4 track. |
Definition at line 41 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by TrackingAction::PostUserTrackingAction().
| void preTracking | ( | const G4Track * | aTrack | ) |
Activate the pre-tracking hook of registered plugins.
| aTrack | The Geant4 track. |
Definition at line 33 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by TrackingAction::PreUserTrackingAction().
| std::ostream & print | ( | std::ostream & | os | ) |
Print out information about registered plugins.
| os | The output stream. |
Definition at line 148 of file PluginManager.cc.
References LOG::endl, and PluginManager::plugins_.
Referenced by PluginMessenger::SetNewValue().
|
private |
Register a plugin.
| plugin | Pointer to plugin that should be registered. |
Definition at line 155 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by PluginManager::create().
| G4ClassificationOfNewTrack stackingClassifyNewTrack | ( | const G4Track * | aTrack | ) |
Return a track classification from the user plugins that have stacking actions. Activate the track classification hook of registered plugins.
| aTrack | The Geant4 track. |
Definition at line 73 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by StackingAction::ClassifyNewTrack().
| void stackingNewStage | ( | ) |
Activate the stacking new stage hook of registered plugins.
Definition at line 97 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by StackingAction::NewStage().
| void stackingPrepareNewEvent | ( | ) |
Activate the prepare new event stacking hook of registered plugins.
Definition at line 105 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by StackingAction::PrepareNewEvent().
| void stepping | ( | const G4Step * | aStep | ) |
Activate the stepping hook of registered plugins.
| aStep | The Geant4 step. |
Definition at line 25 of file PluginManager.cc.
References PluginManager::plugins_.
Referenced by SteppingAction::UserSteppingAction().
|
private |
The plugin loader for loading plugins from shared libraries.
Definition at line 183 of file PluginManager.hh.
Referenced by PluginManager::create(), and PluginManager::destroy().
|
private |
The list of registered plugins.
Definition at line 188 of file PluginManager.hh.
Referenced by PluginManager::beginEvent(), PluginManager::beginRun(), PluginManager::deregisterPlugin(), PluginManager::destroyPlugins(), PluginManager::endEvent(), PluginManager::endRun(), PluginManager::findPlugin(), PluginManager::generatePrimary(), PluginManager::postTracking(), PluginManager::preTracking(), PluginManager::print(), PluginManager::registerPlugin(), PluginManager::stackingClassifyNewTrack(), PluginManager::stackingNewStage(), PluginManager::stackingPrepareNewEvent(), and PluginManager::stepping().