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

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

#include <G4AtlasRunAction.h>

Inheritance diagram for G4UA::G4AtlasRunAction:
Collaboration diagram for G4UA::G4AtlasRunAction:

Public Member Functions

 G4AtlasRunAction ()
 Constructor. More...
 
void BeginOfRunAction (const G4Run *run) override final
 Geant4 method for pre-run action. More...
 
void EndOfRunAction (const G4Run *run) override final
 Geant4 method for post-run action. More...
 
void addRunAction (G4UserRunAction *action)
 Add one action to the list. More...
 

Private Attributes

std::vector< G4UserRunAction * > m_runActions
 List of ATLAS run actions. More...
 

Detailed Description

ATLAS subclass of the G4 run action.

Maintains a list of custom actions for the beginning and end of an run 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 G4AtlasRunAction.h.

Constructor & Destructor Documentation

◆ G4AtlasRunAction()

G4UA::G4AtlasRunAction::G4AtlasRunAction ( )

Constructor.

Definition at line 14 of file G4AtlasRunAction.cxx.

15  {
16  }

Member Function Documentation

◆ addRunAction()

void G4UA::G4AtlasRunAction::addRunAction ( G4UserRunAction *  action)

Add one action to the list.

Definition at line 43 of file G4AtlasRunAction.cxx.

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

◆ BeginOfRunAction()

void G4UA::G4AtlasRunAction::BeginOfRunAction ( const G4Run *  run)
finaloverride

Geant4 method for pre-run action.

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

Definition at line 21 of file G4AtlasRunAction.cxx.

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

◆ EndOfRunAction()

void G4UA::G4AtlasRunAction::EndOfRunAction ( const G4Run *  run)
finaloverride

Geant4 method for post-run action.

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

Definition at line 32 of file G4AtlasRunAction.cxx.

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

Member Data Documentation

◆ m_runActions

std::vector<G4UserRunAction*> G4UA::G4AtlasRunAction::m_runActions
private

List of ATLAS run actions.

Definition at line 52 of file G4AtlasRunAction.h.


The documentation for this class was generated from the following files:
run
Definition: run.py:1
G4UA::G4AtlasRunAction::m_runActions
std::vector< G4UserRunAction * > m_runActions
List of ATLAS run actions.
Definition: G4AtlasRunAction.h:52
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77