ATLAS Offline Software
Loading...
Searching...
No Matches
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.
virtual StatusCode initialize () override
 Initialize the tool.
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists.
StatusCode BeginOfAthenaEvent (HitCollectionMap &) override
 Calls BeginOfAthenaEvent.
StatusCode EndOfAthenaEvent (HitCollectionMap &) override
 Calls EndOfAthenaEvent.

Protected Member Functions

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

Protected Attributes

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

Private Attributes

ServiceHandle< ITHistSvc > m_hSvc
 Handle to the histogram service.
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 }
ServiceHandle< ITHistSvc > m_hSvc
Handle to the histogram service.
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< LengthIntegrator >::BeginOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls BeginOfAthenaEvent.

Definition at line 59 of file UserActionToolBase.h.

59{return StatusCode::SUCCESS;};
abstract template utility base-class for G4 user-action tools.

◆ EndOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< LengthIntegrator >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

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

Fill the user action lists.

Definition at line 47 of file UserActionToolBase.h.

48 {
50 if(myAction == nullptr) {
51 ATH_MSG_ERROR( "Failed to construct user action in " << name() );
53 }
56 }
#define ATH_MSG_ERROR(x)
virtual std::unique_ptr< LengthIntegrator > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ 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 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

◆ 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 70 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: