ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasRunAction.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local includes
6#include "G4AtlasRunAction.h"
7
8namespace G4UA
9{
10
11 //---------------------------------------------------------------------------
12 // Constructor
13 //---------------------------------------------------------------------------
17
18 //---------------------------------------------------------------------------
19 // Begin-run action
20 //---------------------------------------------------------------------------
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 }
28
29 //---------------------------------------------------------------------------
30 // End-run action
31 //---------------------------------------------------------------------------
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 }
39
40 //---------------------------------------------------------------------------
41 // Add one action to the list
42 //---------------------------------------------------------------------------
43 void G4AtlasRunAction::addRunAction(G4UserRunAction* action)
44 {
45 m_runActions.push_back(action);
46 }
47
48} // namespace G4UA
std::vector< G4UserRunAction * > m_runActions
List of ATLAS run actions.
void addRunAction(G4UserRunAction *action)
Add one action to the list.
void BeginOfRunAction(const G4Run *run) override final
Geant4 method for pre-run action.
void EndOfRunAction(const G4Run *run) override final
Geant4 method for post-run action.
Definition run.py:1