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

Tool which manages the SG_StepNtuple user action. More...

#include <SG_StepNtupleTool.h>

Inheritance diagram for G4UA::SG_StepNtupleTool:
Collaboration diagram for G4UA::SG_StepNtupleTool:

Public Member Functions

 SG_StepNtupleTool (const std::string &type, const std::string &name, const IInterface *parent)
 standard tool ctor
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists.
StatusCode BeginOfAthenaEvent (HitCollectionMap &) override
 Calls BeginOfAthenaEvent.
StatusCode EndOfAthenaEvent (HitCollectionMap &) override
 Calls EndOfAthenaEvent.

Protected Member Functions

virtual std::unique_ptr< SG_StepNtuplemakeAndFillAction (G4AtlasUserActions &) override final
 creates the action instances

Protected Attributes

ThreadSpecificUserAction< SG_StepNtuplem_actions
 Thread-specific storage of the user action.

Private Attributes

std::vector< int > m_pdgids

Detailed Description

Tool which manages the SG_StepNtuple user action.

creates one SG_StepNtuple instance per thread

Author
Andrea Di Simone

Definition at line 24 of file SG_StepNtupleTool.h.

Constructor & Destructor Documentation

◆ SG_StepNtupleTool()

G4UA::SG_StepNtupleTool::SG_StepNtupleTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

standard tool ctor

Definition at line 10 of file SG_StepNtupleTool.cxx.

13 : UserActionToolBase<SG_StepNtuple>(type, name, parent)
14 {
15 declareProperty("RHadronPDGIDList",m_pdgids,"List of R-Hadron PDG IDs");
16 }
std::vector< int > m_pdgids
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< SG_StepNtuple >::BeginOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls BeginOfAthenaEvent.

Definition at line 59 of file UserActionToolBase.h.

59{return StatusCode::SUCCESS;};
abstract template utility base-class for G4 user-action tools.

◆ EndOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< SG_StepNtuple >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< SG_StepNtuple >::fillUserAction ( G4AtlasUserActions & actionLists)
inlinefinaloverridevirtualinherited

Fill the user action lists.

Definition at line 47 of file UserActionToolBase.h.

48 {
50 if(myAction == nullptr) {
51 ATH_MSG_ERROR( "Failed to construct user action in " << name() );
53 }
56 }
#define ATH_MSG_ERROR(x)
virtual std::unique_ptr< SG_StepNtuple > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ makeAndFillAction()

std::unique_ptr< SG_StepNtuple > G4UA::SG_StepNtupleTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

creates the action instances

Implements G4UA::UserActionToolBase< SG_StepNtuple >.

Definition at line 19 of file SG_StepNtupleTool.cxx.

20 {
21 ATH_MSG_DEBUG("Constructing an SG_StepNtuple action");
22 auto action = std::make_unique<SG_StepNtuple>(m_pdgids);
23 actionList.runActions.push_back( action.get() );
24 actionList.eventActions.push_back( action.get() );
25 actionList.steppingActions.push_back( action.get() );
26 return action;
27 }
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_pdgids

std::vector<int> G4UA::SG_StepNtupleTool::m_pdgids
private

Definition at line 39 of file SG_StepNtupleTool.h.


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