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

A tool for managing the MCTruthSteppingAction. More...

#include <MCTruthSteppingActionTool.h>

Inheritance diagram for G4UA::MCTruthSteppingActionTool:
Collaboration diagram for G4UA::MCTruthSteppingActionTool:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Private Attributes

std::map< std::string, std::string > m_volumeCollectionMap
 Map of volume name to output collection name. More...
 

Detailed Description

A tool for managing the MCTruthSteppingAction.

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

Definition at line 26 of file MCTruthSteppingActionTool.h.

Constructor & Destructor Documentation

◆ MCTruthSteppingActionTool()

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

Standard constructor.

Definition at line 14 of file MCTruthSteppingActionTool.cxx.

17  : UserActionToolBase<MCTruthSteppingAction>(type, name, parent)
18  {
19  declareProperty("VolumeCollectionMap", m_volumeCollectionMap,
20  "Map of volume name to output collection name");
21  }

Member Function Documentation

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< MCTruthSteppingAction >::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::MCTruthSteppingActionTool::initialize ( )
finaloverridevirtual

Initialize the tool.

Definition at line 26 of file MCTruthSteppingActionTool.cxx.

27  {
28  ATH_MSG_DEBUG( "Initializing " << name() );
29  return StatusCode::SUCCESS;
30  }

◆ makeAndFillAction()

std::unique_ptr< MCTruthSteppingAction > G4UA::MCTruthSteppingActionTool::makeAndFillAction ( G4AtlasUserActions actionLists)
finaloverrideprotectedvirtual

Setup the user action for current thread.

Implements G4UA::UserActionToolBase< MCTruthSteppingAction >.

Definition at line 36 of file MCTruthSteppingActionTool.cxx.

37  {
38  ATH_MSG_DEBUG("Constructing an MCTruthSteppingAction");
39  auto action = std::make_unique<MCTruthSteppingAction> (
41  actionLists.eventActions.push_back( action.get() );
42  actionLists.steppingActions.push_back( action.get() );
43  return action;
44  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_volumeCollectionMap

std::map<std::string, std::string> G4UA::MCTruthSteppingActionTool::m_volumeCollectionMap
private

Map of volume name to output collection name.

Definition at line 47 of file MCTruthSteppingActionTool.h.


The documentation for this class was generated from the following files:
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
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
G4UA::UserActionToolBase< MCTruthSteppingAction >::m_actions
ThreadSpecificUserAction< MCTruthSteppingAction > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::MCTruthSteppingActionTool::m_volumeCollectionMap
std::map< std::string, std::string > m_volumeCollectionMap
Map of volume name to output collection name.
Definition: MCTruthSteppingActionTool.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase< MCTruthSteppingAction >::makeAndFillAction
virtual std::unique_ptr< MCTruthSteppingAction > 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