ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
G4UA::G4AtlasEventAction Class Reference

ATLAS subclass of the G4 event action. More...

#include <G4AtlasEventAction.h>

Inheritance diagram for G4UA::G4AtlasEventAction:
Collaboration diagram for G4UA::G4AtlasEventAction:

Public Member Functions

 G4AtlasEventAction ()
 Constructor. More...
 
void BeginOfEventAction (const G4Event *event) override final
 Geant4 method for pre-event action. More...
 
void EndOfEventAction (const G4Event *event) override final
 Geant4 method for post-event action. More...
 
void addEventAction (G4UserEventAction *action)
 Add one action to the list. More...
 

Private Attributes

std::vector< G4UserEventAction * > m_eventActions
 List of ATLAS event actions. More...
 

Detailed Description

ATLAS subclass of the G4 event action.

Maintains a list of custom actions for the beginning and end of an event and when invoked by Geant4 will forward the call to each of them in turn.

Todo:
TODO lifetime management of wrapper actions.
Author
Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 28 of file G4AtlasEventAction.h.

Constructor & Destructor Documentation

◆ G4AtlasEventAction()

G4UA::G4AtlasEventAction::G4AtlasEventAction ( )

Constructor.

Definition at line 14 of file G4AtlasEventAction.cxx.

15  {
16  }

Member Function Documentation

◆ addEventAction()

void G4UA::G4AtlasEventAction::addEventAction ( G4UserEventAction *  action)

Add one action to the list.

Definition at line 43 of file G4AtlasEventAction.cxx.

44  {
45  m_eventActions.push_back(action);
46  }

◆ BeginOfEventAction()

void G4UA::G4AtlasEventAction::BeginOfEventAction ( const G4Event *  event)
finaloverride

Geant4 method for pre-event action.

This method forwards the G4 call onto each of its pre-event ATLAS actions.

Definition at line 21 of file G4AtlasEventAction.cxx.

22  {
23  // Loop over my pre-actions and apply each one in turn
24  for(auto action : m_eventActions){
25  action->BeginOfEventAction(event);
26  }
27  }

◆ EndOfEventAction()

void G4UA::G4AtlasEventAction::EndOfEventAction ( const G4Event *  event)
finaloverride

Geant4 method for post-event action.

This method forwards the G4 call onto each of its post-event ATLAS actions.

Definition at line 32 of file G4AtlasEventAction.cxx.

33  {
34  // Loop over my post-actions and apply each one in turn
35  for(auto action : m_eventActions){
36  action->EndOfEventAction(event);
37  }
38  }

Member Data Documentation

◆ m_eventActions

std::vector<G4UserEventAction*> G4UA::G4AtlasEventAction::m_eventActions
private

List of ATLAS event actions.

Definition at line 52 of file G4AtlasEventAction.h.


The documentation for this class was generated from the following files:
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
G4UA::G4AtlasEventAction::m_eventActions
std::vector< G4UserEventAction * > m_eventActions
List of ATLAS event actions.
Definition: G4AtlasEventAction.h:52