GGS(GenericGEANT4Simulation)Software
2.7.0
|
The GGS ser actions manager. More...
#include <GGSUserActionsManager.h>
Public Member Functions | |
~GGSUserActionsManager () | |
Destructor. More... | |
void | AddAction (GGSUserAction *userAction) |
Adds a general user action. More... | |
void | AddAction (G4UserSteppingAction *steppingAction) |
Adds a stepping action. More... | |
void | AddAction (G4UserTrackingAction *trackingAction) |
Adds a tracking action. More... | |
void | AddAction (G4UserEventAction *eventAction) |
Adds a event action. More... | |
void | AddAction (G4UserRunAction *runAction) |
Adds a run action. More... | |
void | AddAction (G4UserStackingAction *stackingAction) |
Adds a stacking action. More... | |
void | UserSteppingAction (const G4Step *step) |
Override of UserSteppingAction method. More... | |
void | PreUserTrackingAction (const G4Track *track) |
Override of PreUserTrackingAction method. More... | |
void | PostUserTrackingAction (const G4Track *track) |
Override of PostUserTrackingAction method. More... | |
void | BeginOfEventAction (const G4Event *event) |
Override of BeginOfEventAction method. More... | |
void | EndOfEventAction (const G4Event *event) |
Override of EndOfEventAction method. More... | |
void | BeginOfRunAction (const G4Run *run) |
Override of BeginOfRunAction method. More... | |
void | EndOfRunAction (const G4Run *run) |
Override of EndOfRunAction method. More... | |
G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *aTrack) |
Override of ClassifyNewTrack method. More... | |
void | NewStage () |
Override of NewStage method. More... | |
void | PrepareNewEvent () |
Override of PrepareNewEvent method. More... | |
![]() | |
GGSUserAction () | |
Constructor. More... | |
virtual | ~GGSUserAction () |
Destructor. | |
G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *) |
Override of the ClassifyNewTrack method. More... | |
Static Public Member Functions | |
static GGSUserActionsManager * | GetInstance () |
Get the singleton instance. More... | |
The GGS ser actions manager.
This class is intended as an actions container. User can fill it with desired actions and the manager will provide the necessary interface to GEANT4 kernel calls. The main aim of this software layer is to give the user the possibility to define and use the set of actions which is most suitable for the specific simulation. The manager can contain general actions inheriting from GGSUserAction (which can do something at each simulation level) as well as actions inheriting from regular GEANT4 user actions (like G4UserEventAction, which acts only at the beginning and at the end of an event. The actions are NOT guaranteed to be executed in the same order they are added to the manager. The manager in current implementation owns the actions; this means that when the manager is destroyed it will delete all the actions it contains.
Definition at line 32 of file GGSUserActionsManager.h.
GGSUserActionsManager::~GGSUserActionsManager | ( | ) |
Destructor.
It destroys also the actions previously added to the manager.
Definition at line 33 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | GGSUserAction * | userAction | ) |
Adds a general user action.
userAction | The general user action to be added to the manager. |
Definition at line 85 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | G4UserSteppingAction * | steppingAction | ) |
Adds a stepping action.
steppingAction | The stepping action to be added to the manager. |
Definition at line 94 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | G4UserTrackingAction * | trackingAction | ) |
Adds a tracking action.
trackingAction | The tracking action to be added to the manager. |
Definition at line 101 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | G4UserEventAction * | eventAction | ) |
Adds a event action.
eventAction | The event action to be added to the manager. |
Definition at line 110 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | G4UserRunAction * | runAction | ) |
Adds a run action.
runAction | The run action to be added to the manager. |
Definition at line 117 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::AddAction | ( | G4UserStackingAction * | stackingAction | ) |
Adds a stacking action.
stackingAction | The stacking action to be added to the manager. |
void GGSUserActionsManager::BeginOfEventAction | ( | const G4Event * | event | ) |
Override of BeginOfEventAction method.
This routine calls BeginOfEventAction for every general and event actions in the manager.
event | The current event. |
Definition at line 163 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::BeginOfRunAction | ( | const G4Run * | run | ) |
Override of BeginOfRunAction method.
This routine calls BeginOfRunAction for every general and run actions in the manager.
run | The current run. |
Definition at line 194 of file GGSUserActionsManager.cpp.
G4ClassificationOfNewTrack GGSUserActionsManager::ClassifyNewTrack | ( | const G4Track * | aTrack | ) |
Override of ClassifyNewTrack method.
This routine calls ClassifyNewTrack for every general actions in the manager. If no general actions are present, or if none of them reimplements ClassifyNewTrack properly, it returns the return value of G4UserStackingAction::ClassifyNewTrack. If more actions are present and the classifications are not in agreement, the default classification given by G4UserStackingAction::ClassifyNewTrack will be returned;
aTrack | The new track. |
Definition at line 220 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::EndOfEventAction | ( | const G4Event * | event | ) |
Override of EndOfEventAction method.
This routine calls EndOfEventAction for every general and event actions in the manager.
event | The current event. |
Definition at line 176 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::EndOfRunAction | ( | const G4Run * | run | ) |
Override of EndOfRunAction method.
This routine calls EndOfRunAction for every general and run actions in the manager.
run | The current run. |
Definition at line 207 of file GGSUserActionsManager.cpp.
|
static |
Get the singleton instance.
This method instantiate the singleton when it is first called. Every access to the manager must be done using the returned pointer.
Definition at line 20 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::NewStage | ( | ) |
Override of NewStage method.
This routine calls NewStage for every general and stacking actions in the manager.
Definition at line 242 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::PostUserTrackingAction | ( | const G4Track * | track | ) |
Override of PostUserTrackingAction method.
This routine calls PostUserTrackingAction for every general and tracking actions in the manager.
track | The current track. |
Definition at line 150 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::PrepareNewEvent | ( | ) |
Override of PrepareNewEvent method.
This routine calls PrepareNewEvent for every general and stacking actions in the manager.
Definition at line 250 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::PreUserTrackingAction | ( | const G4Track * | track | ) |
Override of PreUserTrackingAction method.
This routine calls PreUserTrackingAction for every general and tracking actions in the manager.
track | The current track. |
Definition at line 137 of file GGSUserActionsManager.cpp.
void GGSUserActionsManager::UserSteppingAction | ( | const G4Step * | step | ) |
Override of UserSteppingAction method.
This routine calls UserSteppingAction for every general and stepping actions in the manager.
step | The current step. |
Definition at line 124 of file GGSUserActionsManager.cpp.