ATLAS Offline Software
Loading...
Searching...
No Matches
G4UA::G4AtlasPrimaryGeneratorAction Class Reference

ATLAS subclass of the G4 primary generator action. More...

#include <G4AtlasPrimaryGeneratorAction.h>

Inheritance diagram for G4UA::G4AtlasPrimaryGeneratorAction:
Collaboration diagram for G4UA::G4AtlasPrimaryGeneratorAction:

Public Member Functions

void GeneratePrimaries (G4Event *anEvent) override final
 Geant4 method for primary generation.
void addPrimaryGeneratorAction (G4VUserPrimaryGeneratorAction *action)
 Add one action to the list.

Private Attributes

std::vector< G4VUserPrimaryGeneratorAction * > m_actions
 List of ATLAS primary generator actions.

Detailed Description

ATLAS subclass of the G4 primary generator action.

Maintains a list of custom actions for primary generation and when invoked by Geant4 will forward the call to each of them in turn.

Todo
TODO lifetime management of wrapper actions.
Author
Julien Esseiva julie.nosp@m.n.es.nosp@m.seiva.nosp@m.@cer.nosp@m.n.ch

Definition at line 28 of file G4AtlasPrimaryGeneratorAction.h.

Member Function Documentation

◆ addPrimaryGeneratorAction()

void G4UA::G4AtlasPrimaryGeneratorAction::addPrimaryGeneratorAction ( G4VUserPrimaryGeneratorAction * action)

Add one action to the list.

Definition at line 25 of file G4AtlasPrimaryGeneratorAction.cxx.

26 {
27 m_actions.push_back(action);
28 }
std::vector< G4VUserPrimaryGeneratorAction * > m_actions
List of ATLAS primary generator actions.

◆ GeneratePrimaries()

void G4UA::G4AtlasPrimaryGeneratorAction::GeneratePrimaries ( G4Event * anEvent)
finaloverride

Geant4 method for primary generation.

This method forwards the G4 call onto each of its primary generator actions.

Definition at line 14 of file G4AtlasPrimaryGeneratorAction.cxx.

15 {
16 // Loop over my pre-actions and apply each one in turn
17 for(auto action : m_actions){
18 action->GeneratePrimaries(anEvent);
19 }
20 }

Member Data Documentation

◆ m_actions

std::vector<G4VUserPrimaryGeneratorAction*> G4UA::G4AtlasPrimaryGeneratorAction::m_actions
private

List of ATLAS primary generator actions.

Definition at line 44 of file G4AtlasPrimaryGeneratorAction.h.


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