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

A tool to manage RadLengthAction actions. More...

#include <RadLengthActionTool.h>

Inheritance diagram for G4UA::RadLengthActionTool:
Collaboration diagram for G4UA::RadLengthActionTool:

Public Member Functions

 RadLengthActionTool (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< RadLengthActionmakeAndFillAction (G4AtlasUserActions &) override final
 creates the action instances

Protected Attributes

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

Private Attributes

RadLengthAction::Config m_config
 holds the python configuration

Detailed Description

A tool to manage RadLengthAction actions.

creates one RadLengthAction instance per thread

Definition at line 22 of file RadLengthActionTool.h.

Constructor & Destructor Documentation

◆ RadLengthActionTool()

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

standard tool ctor

Definition at line 10 of file RadLengthActionTool.cxx.

13 : UserActionToolBase<RadLengthAction>(type, name, parent)
14 , m_config()
15 {
16 declareProperty("VolumeDepthLevel",m_config.VolumeDepthLevel);
17 }
RadLengthAction::Config m_config
holds the python configuration
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

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

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

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

◆ makeAndFillAction()

std::unique_ptr< RadLengthAction > G4UA::RadLengthActionTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

creates the action instances

Implements G4UA::UserActionToolBase< RadLengthAction >.

Definition at line 20 of file RadLengthActionTool.cxx.

21 {
22 ATH_MSG_DEBUG("Constructing a RadLengthAction action");
23 auto action = std::make_unique<RadLengthAction>(m_config);
24 actionList.runActions.push_back( action.get() );
25 actionList.eventActions.push_back( action.get() );
26 actionList.steppingActions.push_back( action.get() );
27 return action;
28 }
#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_config

RadLengthAction::Config G4UA::RadLengthActionTool::m_config
private

holds the python configuration

Definition at line 39 of file RadLengthActionTool.h.


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