ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
G4UA::AthenaTrackingActionTool Class Reference

Tool which manages the AthenaTrackingAction. More...

#include <AthenaTrackingActionTool.h>

Inheritance diagram for G4UA::AthenaTrackingActionTool:
Collaboration diagram for G4UA::AthenaTrackingActionTool:

Public Member Functions

 AthenaTrackingActionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual StatusCode initialize () override
 Initialize the tool (just for debugging printout) More...
 
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists. More...
 

Protected Member Functions

virtual std::unique_ptr< AthenaTrackingActionmakeAndFillAction (G4AtlasUserActions &actionLists) override final
 Setup the user action for current thread. More...
 

Protected Attributes

ThreadSpecificUserAction< AthenaTrackingActionm_actions
 Thread-specific storage of the user action. More...
 

Private Attributes

int m_secondarySavingLevel
 The saving level for secondaries. More...
 
int m_subDetVolLevel
 The level in the G4 volume hierarchy at which can we find the sub-detector name. More...
 

Detailed Description

Tool which manages the AthenaTrackingAction.

Author
Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 23 of file AthenaTrackingActionTool.h.

Constructor & Destructor Documentation

◆ AthenaTrackingActionTool()

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

Standard constructor.

Definition at line 13 of file AthenaTrackingActionTool.cxx.

16  : UserActionToolBase<AthenaTrackingAction>(type, name, parent)
18  , m_subDetVolLevel(1)
19  {
20  declareProperty("SecondarySavingLevel", m_secondarySavingLevel,
21  "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All");
22  declareProperty("SubDetVolumeLevel", m_subDetVolLevel,
23  "The level in the G4 volume hierarchy at which can we find the sub-detector name");
24  }

Member Function Documentation

◆ fillUserAction()

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

Fill the user action lists.

Definition at line 45 of file UserActionToolBase.h.

46  {
47  auto myAction = makeAndFillAction(actionLists);
48  if(myAction == nullptr) {
49  ATH_MSG_ERROR( "Failed to construct user action in " << name() );
50  return StatusCode::FAILURE;
51  }
52  m_actions.set( std::move(myAction) );
53  return StatusCode::SUCCESS;
54  }

◆ initialize()

StatusCode G4UA::AthenaTrackingActionTool::initialize ( )
overridevirtual

Initialize the tool (just for debugging printout)

Definition at line 29 of file AthenaTrackingActionTool.cxx.

30  {
31  ATH_MSG_DEBUG( "Initializing " << name() );
32  return StatusCode::SUCCESS;
33  }

◆ makeAndFillAction()

std::unique_ptr< AthenaTrackingAction > G4UA::AthenaTrackingActionTool::makeAndFillAction ( G4AtlasUserActions actionLists)
finaloverrideprotectedvirtual

Setup the user action for current thread.

Implements G4UA::UserActionToolBase< AthenaTrackingAction >.

Definition at line 39 of file AthenaTrackingActionTool.cxx.

40  {
41  ATH_MSG_DEBUG("Constructing an AthenaTrackingAction");
42  // Create and configure the action plugin.
43  auto action = std::make_unique<AthenaTrackingAction>(
45  actionLists.trackingActions.push_back( action.get() );
46  return action;
47  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_secondarySavingLevel

int G4UA::AthenaTrackingActionTool::m_secondarySavingLevel
private

The saving level for secondaries.

Definition at line 44 of file AthenaTrackingActionTool.h.

◆ m_subDetVolLevel

int G4UA::AthenaTrackingActionTool::m_subDetVolLevel
private

The level in the G4 volume hierarchy at which can we find the sub-detector name.

Definition at line 46 of file AthenaTrackingActionTool.h.


The documentation for this class was generated from the following files:
G4UA::AthenaTrackingActionTool::m_subDetVolLevel
int m_subDetVolLevel
The level in the G4 volume hierarchy at which can we find the sub-detector name.
Definition: AthenaTrackingActionTool.h:46
G4UA::ThreadSpecificUserAction::set
void set(std::unique_ptr< ActionType > action)
Assign the object of the current thread.
Definition: ThreadSpecificUserAction.h:61
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
G4UA::UserActionToolBase< AthenaTrackingAction >::m_actions
ThreadSpecificUserAction< AthenaTrackingAction > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::AthenaTrackingActionTool::m_secondarySavingLevel
int m_secondarySavingLevel
The saving level for secondaries.
Definition: AthenaTrackingActionTool.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase< AthenaTrackingAction >::makeAndFillAction
virtual std::unique_ptr< AthenaTrackingAction > makeAndFillAction(G4AtlasUserActions &actionLists)=0
Make the action and push onto the lists.
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7