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

A Tool to manage TestActionEHist Create the TestActionEHist for each worker thread. Note that since this is using ROOT access DIRECTLY, it is aonly tested and working with 1 thread. Operation with more than 1 thread will be disabled from the python side. More...

#include <TestActionEHistTool.h>

Inheritance diagram for G4UA::TestActionEHistTool:
Collaboration diagram for G4UA::TestActionEHistTool:

Public Member Functions

 TestActionEHistTool (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< TestActionEHistmakeAndFillAction (G4AtlasUserActions &) override final
 Create action for this thread. More...
 

Protected Attributes

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

Private Attributes

TestActionEHist::Config m_config
 holds the configuration details received from python More...
 

Detailed Description

A Tool to manage TestActionEHist Create the TestActionEHist for each worker thread. Note that since this is using ROOT access DIRECTLY, it is aonly tested and working with 1 thread. Operation with more than 1 thread will be disabled from the python side.

Author
Andrea Di Simone

Definition at line 22 of file TestActionEHistTool.h.

Constructor & Destructor Documentation

◆ TestActionEHistTool()

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

Standard constructor.

Definition at line 10 of file TestActionEHistTool.cxx.

13  : UserActionToolBase<TestActionEHist>(type, name, parent)
14  {
15  declareProperty("ROOTFileName",m_config.name);
16  declareProperty("CaloDepth",m_config.dCALO);
17  declareProperty("BeamPipeDepth",m_config.dBeam);
18  declareProperty("InDetDepth",m_config.dIDET);
19  declareProperty("MuonDepth",m_config.dMUON);
20  declareProperty("MaxHists",m_config.maxhists);
21  declareProperty("DetailDepth",m_config.dDetail);
22  }

Member Function Documentation

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< TestActionEHist >::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< TestActionEHist > G4UA::TestActionEHistTool::makeAndFillAction ( G4AtlasUserActions actionList)
finaloverrideprotectedvirtual

Create action for this thread.

Implements G4UA::UserActionToolBase< TestActionEHist >.

Definition at line 25 of file TestActionEHistTool.cxx.

26  {
27  ATH_MSG_DEBUG("Constructing a TestActionEHist");
28  auto action = std::make_unique<TestActionEHist>(m_config);
29  actionList.runActions.push_back( action.get() );
30  actionList.trackingActions.push_back( action.get() );
31  actionList.steppingActions.push_back( action.get() );
32  return action;
33  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_config

TestActionEHist::Config G4UA::TestActionEHistTool::m_config
private

holds the configuration details received from python

Definition at line 41 of file TestActionEHistTool.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::TestActionEHist::Config::dMUON
int dMUON
Used for depth limits applied in jobOptions.
Definition: TestActionEHist.h:57
G4UA::TestActionEHist::Config::dIDET
int dIDET
Definition: TestActionEHist.h:56
G4UA::TestActionEHistTool::m_config
TestActionEHist::Config m_config
holds the configuration details received from python
Definition: TestActionEHistTool.h:41
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
G4UA::TestActionEHist::Config::dBeam
int dBeam
Definition: TestActionEHist.h:55
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
G4UA::UserActionToolBase< TestActionEHist >::m_actions
ThreadSpecificUserAction< TestActionEHist > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::TestActionEHist::Config::dDetail
std::string dDetail
Path used to set detailed depth cuts.
Definition: TestActionEHist.h:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
G4UA::UserActionToolBase< TestActionEHist >::makeAndFillAction
virtual std::unique_ptr< TestActionEHist > 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
G4UA::TestActionEHist::Config::maxhists
int maxhists
Definition: TestActionEHist.h:58
G4UA::TestActionEHist::Config::name
std::string name
Name of root output file.
Definition: TestActionEHist.h:61
G4UA::TestActionEHist::Config::dCALO
int dCALO
Definition: TestActionEHist.h:54