ATLAS Offline Software
Loading...
Searching...
No Matches
G4UA::ScoringPlaneTool Class Reference

A tool to manage ScoprinPlane actions. More...

#include <ScoringPlaneTool.h>

Inheritance diagram for G4UA::ScoringPlaneTool:
Collaboration diagram for G4UA::ScoringPlaneTool:

Public Member Functions

 ScoringPlaneTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard tool ctor.
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< ScoringPlanemakeAndFillAction (G4AtlasUserActions &) override final
 creates the action instances

Protected Attributes

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

Private Attributes

ScoringPlane::Config m_config
 holds the python configuration

Detailed Description

A tool to manage ScoprinPlane actions.

creates one ScoprinPlane instance per thread

Author
Andrea Di Simone

Definition at line 24 of file ScoringPlaneTool.h.

Constructor & Destructor Documentation

◆ ScoringPlaneTool()

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

Standard tool ctor.

Definition at line 11 of file ScoringPlaneTool.cxx.

14 : UserActionToolBase<ScoringPlane>(type, name, parent)
15 {
16 declareProperty("Plane", m_config.plane);
17 declareProperty("PKill", m_config.pkill);
18 declareProperty("FName", m_config.fname);
19 }
ScoringPlane::Config m_config
holds the python configuration
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< ScoringPlane >::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< ScoringPlane >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< ScoringPlane >::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< ScoringPlane > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ makeAndFillAction()

std::unique_ptr< ScoringPlane > G4UA::ScoringPlaneTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

creates the action instances

Implements G4UA::UserActionToolBase< ScoringPlane >.

Definition at line 22 of file ScoringPlaneTool.cxx.

23 {
24 ATH_MSG_DEBUG("Making a ScoringPlane action");
25 auto action = std::make_unique<ScoringPlane>(m_config);
26 actionList.runActions.push_back( action.get() );
27 actionList.eventActions.push_back( action.get() );
28 actionList.steppingActions.push_back( action.get() );
29 return action;
30 }
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_config

ScoringPlane::Config G4UA::ScoringPlaneTool::m_config
private

holds the python configuration

Definition at line 42 of file ScoringPlaneTool.h.


The documentation for this class was generated from the following files: