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

Tool which manages the MCTruthUserAction. More...

#include <MCTruthUserActionTool.h>

Inheritance diagram for G4UA::iGeant4::MCTruthUserActionTool:
Collaboration diagram for G4UA::iGeant4::MCTruthUserActionTool:

Public Member Functions

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

Protected Member Functions

virtual std::unique_ptr< MCTruthUserActionmakeAndFillAction (G4AtlasUserActions &) override final
 Create an action for this thread. More...
 

Protected Attributes

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

Private Attributes

MCTruthUserAction::Config m_config
 Configuration parameters. More...
 

Detailed Description

Tool which manages the MCTruthUserAction.

Author
Andrea Di Simone

Definition at line 23 of file MCTruthUserActionTool.h.

Constructor & Destructor Documentation

◆ MCTruthUserActionTool()

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

Standard constructor.

Definition at line 13 of file MCTruthUserActionTool.cxx.

16  : UserActionToolBase<MCTruthUserAction>(type, name, parent)
17  {
18  declareProperty("TruthRecordSvc", m_config.truthRecordSvc,
19  "ISF Particle Truth Svc");
20  declareProperty("SecondarySavingLevel", m_config.ilevel=2);
21  }

Member Function Documentation

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< MCTruthUserAction >::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  }

◆ makeAndFillAction()

std::unique_ptr< MCTruthUserAction > G4UA::iGeant4::MCTruthUserActionTool::makeAndFillAction ( G4AtlasUserActions actionList)
finaloverrideprotectedvirtual

Create an action for this thread.

Implements G4UA::UserActionToolBase< MCTruthUserAction >.

Definition at line 24 of file MCTruthUserActionTool.cxx.

25  {
26  ATH_MSG_DEBUG("Constructing an MCTruthUserAction");
27  if(msgLvl(MSG::VERBOSE)) { m_config.verboseLevel = 10; }
28  else if(msgLvl(MSG::DEBUG)) { m_config.verboseLevel = 5; }
29  auto action = std::make_unique<MCTruthUserAction>(m_config);
30  actionList.trackingActions.push_back( action.get() );
31  return action;
32  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_config

MCTruthUserAction::Config G4UA::iGeant4::MCTruthUserActionTool::m_config
private

Configuration parameters.

Definition at line 36 of file MCTruthUserActionTool.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
G4UA::iGeant4::MCTruthUserActionTool::m_config
MCTruthUserAction::Config m_config
Configuration parameters.
Definition: MCTruthUserActionTool.h:36
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< MCTruthUserAction >::m_actions
ThreadSpecificUserAction< MCTruthUserAction > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
G4UA::UserActionToolBase< MCTruthUserAction >::makeAndFillAction
virtual std::unique_ptr< MCTruthUserAction > 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
DEBUG
#define DEBUG
Definition: page_access.h:11
G4UA::iGeant4::MCTruthUserAction::Config::ilevel
int ilevel
Definition: MCTruthUserAction.h:46
G4UA::iGeant4::MCTruthUserAction::Config::truthRecordSvc
ServiceHandle< ISF::ITruthSvc > truthRecordSvc
Definition: MCTruthUserAction.h:43
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
G4UA::iGeant4::MCTruthUserAction::Config::verboseLevel
unsigned int verboseLevel
Definition: MCTruthUserAction.h:47