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

Tool which manages the LengthIntegrator action. More...

#include <LengthIntegratorTool.h>

Inheritance diagram for G4UA::LengthIntegratorTool:
Collaboration diagram for G4UA::LengthIntegratorTool:

Public Member Functions

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

Protected Member Functions

virtual std::unique_ptr< LengthIntegratormakeAndFillAction (G4AtlasUserActions &) override final
 Create aciton for this thread. More...
 

Protected Attributes

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

Private Attributes

ServiceHandle< ITHistSvc > m_hSvc
 Handle to the histogram service. More...
 
bool m_doHistos
 

Detailed Description

Tool which manages the LengthIntegrator action.

Creates the LengthIntegrator for each worker thread.

Definition at line 26 of file LengthIntegratorTool.h.

Constructor & Destructor Documentation

◆ LengthIntegratorTool()

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

Standard constructor.

Definition at line 13 of file LengthIntegratorTool.cxx.

16  : UserActionToolBase<LengthIntegrator>(type, name, parent),
17  m_hSvc("THistSvc", name)
18  {
19  declareProperty("HistoSvc", m_hSvc);
20  declareProperty("CreateHistograms", m_doHistos=true);
21 
22  }

Member Function Documentation

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< LengthIntegrator >::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::LengthIntegratorTool::initialize ( )
overridevirtual

Initialize the tool.

Definition at line 27 of file LengthIntegratorTool.cxx.

28  {
29  ATH_MSG_DEBUG("initialize");
30 
31  ATH_CHECK( m_hSvc.retrieve() );
32 
33  return StatusCode::SUCCESS;
34  }

◆ makeAndFillAction()

std::unique_ptr< LengthIntegrator > G4UA::LengthIntegratorTool::makeAndFillAction ( G4AtlasUserActions actionList)
finaloverrideprotectedvirtual

Create aciton for this thread.

Implements G4UA::UserActionToolBase< LengthIntegrator >.

Definition at line 40 of file LengthIntegratorTool.cxx.

41  {
42  ATH_MSG_DEBUG("Making a LengthIntegrator action");
43  auto action = std::make_unique<LengthIntegrator>( m_hSvc.name(), m_doHistos );
44  actionList.eventActions.push_back( action.get() );
45  actionList.steppingActions.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_doHistos

bool G4UA::LengthIntegratorTool::m_doHistos
private

Definition at line 51 of file LengthIntegratorTool.h.

◆ m_hSvc

ServiceHandle<ITHistSvc> G4UA::LengthIntegratorTool::m_hSvc
private

Handle to the histogram service.

Definition at line 47 of file LengthIntegratorTool.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
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< LengthIntegrator >::m_actions
ThreadSpecificUserAction< LengthIntegrator > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
G4UA::LengthIntegratorTool::m_hSvc
ServiceHandle< ITHistSvc > m_hSvc
Handle to the histogram service.
Definition: LengthIntegratorTool.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase< LengthIntegrator >::makeAndFillAction
virtual std::unique_ptr< LengthIntegrator > 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
G4UA::LengthIntegratorTool::m_doHistos
bool m_doHistos
Definition: LengthIntegratorTool.h:51