ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::MaterialTrackRecorderTool Class Reference

#include <MaterialTrackRecorderTool.h>

Inheritance diagram for ActsTrk::MaterialTrackRecorderTool:
Collaboration diagram for ActsTrk::MaterialTrackRecorderTool:

Public Member Functions

 MaterialTrackRecorderTool (const std::string &type, const std::string &name, const IInterface *parent)
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< MaterialTrackRecordermakeAndFillAction (G4UA::G4AtlasUserActions &) override final
 Make the action and push onto the lists.

Protected Attributes

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

Private Attributes

Gaudi::Property< std::string > m_materialTrackCollectionName {this, "MaterialTrackCollectionName", "OutputMaterialTracks", "Name of the output recorded material track collection"}
 The name of the recorded material track collection.
Gaudi::Property< std::vector< std::string > > m_excludeMaterials {this, "ExcludeMaterials", {"Air", "Vacuum"}, "Material you want to exclude from recording"}
 The list of material excluded from recording.

Detailed Description

Definition at line 17 of file MaterialTrackRecorderTool.h.

Constructor & Destructor Documentation

◆ MaterialTrackRecorderTool()

ActsTrk::MaterialTrackRecorderTool::MaterialTrackRecorderTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 9 of file MaterialTrackRecorderTool.cxx.

12 : G4UA::UserActionToolBase<MaterialTrackRecorder>(type, name, parent)
13 {
14 }

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< MaterialTrackRecorder >::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< MaterialTrackRecorder >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< MaterialTrackRecorder >::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< MaterialTrackRecorder > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ makeAndFillAction()

std::unique_ptr< MaterialTrackRecorder > ActsTrk::MaterialTrackRecorderTool::makeAndFillAction ( G4UA::G4AtlasUserActions & actionLists)
finaloverrideprotectedvirtual

Make the action and push onto the lists.

Implements G4UA::UserActionToolBase< MaterialTrackRecorder >.

Definition at line 17 of file MaterialTrackRecorderTool.cxx.

18 {
19 ATH_MSG_DEBUG("Constructing a MaterialTrackRecorder action");
20
21 MaterialTrackRecorder::Config config;
22 config.materialTrackCollectionName = m_materialTrackCollectionName.value();
23
24 auto action = std::make_unique<MaterialTrackRecorder>(config);
25 actionList.runActions.push_back( action.get() );
26 actionList.eventActions.push_back( action.get() );
27 actionList.steppingActions.push_back( action.get() );
28 return action;
29 }
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::string > m_materialTrackCollectionName
The name of the recorded material track collection.

Member Data Documentation

◆ m_actions

ThreadSpecificUserAction<MaterialTrackRecorder> G4UA::UserActionToolBase< MaterialTrackRecorder >::m_actions
protectedinherited

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_excludeMaterials

Gaudi::Property<std::vector<std::string> > ActsTrk::MaterialTrackRecorderTool::m_excludeMaterials {this, "ExcludeMaterials", {"Air", "Vacuum"}, "Material you want to exclude from recording"}
private

The list of material excluded from recording.

Definition at line 31 of file MaterialTrackRecorderTool.h.

32{this, "ExcludeMaterials", {"Air", "Vacuum"}, "Material you want to exclude from recording"};

◆ m_materialTrackCollectionName

Gaudi::Property<std::string> ActsTrk::MaterialTrackRecorderTool::m_materialTrackCollectionName {this, "MaterialTrackCollectionName", "OutputMaterialTracks", "Name of the output recorded material track collection"}
private

The name of the recorded material track collection.

Definition at line 27 of file MaterialTrackRecorderTool.h.

28{this, "MaterialTrackCollectionName", "OutputMaterialTracks", "Name of the output recorded material track collection"};

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