ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
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. More...
 
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists. More...
 

Protected Member Functions

virtual std::unique_ptr< ScoringPlanemakeAndFillAction (G4AtlasUserActions &) override final
 creates the action instances More...
 

Protected Attributes

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

Private Attributes

ScoringPlane::Config m_config
 holds the python configuration More...
 

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  }

Member Function Documentation

◆ fillUserAction()

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

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 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:
G4UA::ScoringPlane::Config::pkill
int pkill
Definition: ScoringPlane.h:33
G4UA::ThreadSpecificUserAction::set
void set(std::unique_ptr< ActionType > action)
Assign the object of the current thread.
Definition: ThreadSpecificUserAction.h:61
G4UA::ScoringPlane::Config::plane
double plane
Definition: ScoringPlane.h:32
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< ScoringPlane >::m_actions
ThreadSpecificUserAction< ScoringPlane > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::ScoringPlaneTool::m_config
ScoringPlane::Config m_config
holds the python configuration
Definition: ScoringPlaneTool.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
G4UA::UserActionToolBase< ScoringPlane >::makeAndFillAction
virtual std::unique_ptr< ScoringPlane > 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::ScoringPlane::Config::fname
std::string fname
Definition: ScoringPlane.h:34