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

a class to manage the DebugSteppingAction action More...

#include <DebugSteppingActionTool.h>

Inheritance diagram for G4UA::DebugSteppingActionTool:
Collaboration diagram for G4UA::DebugSteppingActionTool:

Public Member Functions

 DebugSteppingActionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
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< DebugSteppingActionmakeAndFillAction (G4AtlasUserActions &) override final
 creates one action per thread

Protected Attributes

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

Private Attributes

DebugSteppingAction::Config m_config
 the config for the action

Detailed Description

a class to manage the DebugSteppingAction action

Author
Andrea Di Simone

Definition at line 18 of file DebugSteppingActionTool.h.

Constructor & Destructor Documentation

◆ DebugSteppingActionTool()

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

Standard constructor.

Definition at line 10 of file DebugSteppingActionTool.cxx.

13 : UserActionToolBase<DebugSteppingAction>(type, name, parent)
14 {
15 declareProperty("DebugStep", m_config.step);
16 declareProperty("NumSteps", m_config.numSteps);
17 }
DebugSteppingAction::Config m_config
the config for the action
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

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

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

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

◆ makeAndFillAction()

std::unique_ptr< DebugSteppingAction > G4UA::DebugSteppingActionTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

creates one action per thread

Implements G4UA::UserActionToolBase< DebugSteppingAction >.

Definition at line 20 of file DebugSteppingActionTool.cxx.

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

DebugSteppingAction::Config G4UA::DebugSteppingActionTool::m_config
private

the config for the action

Definition at line 37 of file DebugSteppingActionTool.h.


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