LDMX Software
Public Member Functions | Private Attributes | List of all members
simcore::g4user::RunAction Class Reference

Implementation of user run action hook. More...

#include <RunAction.h>

Public Member Functions

 RunAction ()=default
 Class constructor.
 
virtual ~RunAction ()=default
 Class destructor.
 
void BeginOfRunAction (const G4Run *run)
 Implementation of begin run hook.
 
void EndOfRunAction (const G4Run *run)
 Implementation of end run hook.
 
void registerAction (UserAction *runAction)
 Register a user action of type RunAction with this class.
 

Private Attributes

std::vector< UserAction * > runActions_
 

Detailed Description

Implementation of user run action hook.

Definition at line 34 of file RunAction.h.

Member Function Documentation

◆ BeginOfRunAction()

void simcore::g4user::RunAction::BeginOfRunAction ( const G4Run *  run)

Implementation of begin run hook.

Parameters
runThe current Geant4 run info.

Definition at line 17 of file RunAction.cxx.

17 {
18 // Call user run action
19 for (auto& runAction : runActions_) {
20 runAction->BeginOfRunAction(run);
21 }
22}

◆ EndOfRunAction()

void simcore::g4user::RunAction::EndOfRunAction ( const G4Run *  run)

Implementation of end run hook.

Parameters
runThe current Geant4 run info.

Definition at line 24 of file RunAction.cxx.

24 {
25 // Call user run action
26 for (auto& runAction : runActions_) {
27 runAction->EndOfRunAction(run);
28 }
29}

◆ registerAction()

void simcore::g4user::RunAction::registerAction ( UserAction runAction)
inline

Register a user action of type RunAction with this class.

Parameters
actionUser action of type RunAction

Definition at line 63 of file RunAction.h.

63 {
64 runActions_.push_back(runAction);
65 }

Member Data Documentation

◆ runActions_

std::vector<UserAction*> simcore::g4user::RunAction::runActions_
private

Definition at line 68 of file RunAction.h.


The documentation for this class was generated from the following files: