EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::EventAction Class Referencefinal

Writes out material track records. More...

#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/src/EventAction.hpp>

+ Inheritance diagram for ActsExamples::EventAction:
+ Collaboration diagram for ActsExamples::EventAction:

Public Member Functions

 EventAction ()
 Construct the action and ensure singleton usage.
 
 ~EventAction () finaloverride
 
void BeginOfEventAction (const G4Event *event) finaloverride
 
void EndOfEventAction (const G4Event *event) finaloverride
 
void clear ()
 Clear the recorded data.
 
const std::vector
< Acts::RecordedMaterialTrack > & 
materialTracks () const
 

Static Public Member Functions

static EventActioninstance ()
 Static access method.
 

Private Attributes

std::vector
< Acts::RecordedMaterialTrack
m_materialTracks
 The materialTrackWriter.
 

Static Private Attributes

static EventActions_instance = nullptr
 Instance of the EventAction.
 

Detailed Description

Writes out material track records.

The EventAction class is the realization of the Geant4 class G4UserEventAction and is writing out the collected RecordedMaterialTrack entities needed for material mapping once per event.

Definition at line 31 of file EventAction.hpp.

View newest version in sPHENIX GitHub at line 31 of file EventAction.hpp

Constructor & Destructor Documentation

EventAction::EventAction ( )

Construct the action and ensure singleton usage.

Definition at line 27 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 27 of file EventAction.cpp

References s_instance.

EventAction::~EventAction ( )
finaloverride

Definition at line 35 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 35 of file EventAction.cpp

References s_instance.

Member Function Documentation

void EventAction::BeginOfEventAction ( const G4Event *  event)
finaloverride

Interface method for begin of the event

Parameters
eventis the G4Event to be processed
Note
resets the material step action

Definition at line 39 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 39 of file EventAction.cpp

References ActsExamples::SteppingAction::clear(), and ActsExamples::SteppingAction::instance().

+ Here is the call graph for this function:

void EventAction::clear ( )

Clear the recorded data.

Definition at line 61 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 61 of file EventAction.cpp

References m_materialTracks.

Referenced by ActsExamples::RunAction::BeginOfRunAction().

+ Here is the caller graph for this function:

void EventAction::EndOfEventAction ( const G4Event *  event)
finaloverride

Interface method for end of event

Parameters
eventis the G4Event to be processed
Note
this method is writing out the material track records

Definition at line 44 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 44 of file EventAction.cpp

References ActsExamples::PrimaryGeneratorAction::direction(), ActsExamples::SteppingAction::instance(), ActsExamples::PrimaryGeneratorAction::instance(), m_materialTracks, and ActsExamples::SteppingAction::materialSteps().

+ Here is the call graph for this function:

EventAction * EventAction::instance ( )
static

Static access method.

Definition at line 23 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 23 of file EventAction.cpp

References s_instance.

Referenced by ActsExamples::RunAction::BeginOfRunAction(), and ActsExamples::GeantinoRecording::execute().

+ Here is the caller graph for this function:

const std::vector< Acts::RecordedMaterialTrack > & EventAction::materialTracks ( ) const

Access the recorded material tracks.

This only contains valid data after the end-of-event action has been executed.

Definition at line 69 of file EventAction.cpp.

View newest version in sPHENIX GitHub at line 69 of file EventAction.cpp

References m_materialTracks.

Referenced by ActsExamples::GeantinoRecording::execute().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<Acts::RecordedMaterialTrack> ActsExamples::EventAction::m_materialTracks
private

The materialTrackWriter.

Definition at line 64 of file EventAction.hpp.

View newest version in sPHENIX GitHub at line 64 of file EventAction.hpp

Referenced by clear(), EndOfEventAction(), and materialTracks().

EventAction * EventAction::s_instance = nullptr
staticprivate

Instance of the EventAction.

Definition at line 61 of file EventAction.hpp.

View newest version in sPHENIX GitHub at line 61 of file EventAction.hpp

Referenced by EventAction(), instance(), and ~EventAction().


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