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

A tool which manages the HitWrapper user action. More...

#include <HitWrapperTool.h>

Inheritance diagram for G4UA::HitWrapperTool:
Collaboration diagram for G4UA::HitWrapperTool:

Public Member Functions

 HitWrapperTool (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< HitWrappermakeAndFillAction (G4AtlasUserActions &) override final
 Create the action for the current thread. More...
 

Protected Attributes

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

Private Attributes

HitWrapper::Config m_config
 

Detailed Description

A tool which manages the HitWrapper user action.

Definition at line 18 of file HitWrapperTool.h.

Constructor & Destructor Documentation

◆ HitWrapperTool()

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

Standard constructor.

Definition at line 11 of file HitWrapperTool.cxx.

13  : UserActionToolBase<HitWrapper>(type, name, parent)
14  {
15  declareProperty("Time", m_config.time);
16  }

Member Function Documentation

◆ fillUserAction()

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

Create the action for the current thread.

Implements G4UA::UserActionToolBase< HitWrapper >.

Definition at line 20 of file HitWrapperTool.cxx.

21  {
22  ATH_MSG_DEBUG("Making a HitWrapper action");
23  auto action = std::make_unique<HitWrapper>(m_config);
24  actionList.eventActions.push_back( action.get() );
25  return action;
26  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_config

HitWrapper::Config G4UA::HitWrapperTool::m_config
private

Definition at line 35 of file HitWrapperTool.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::HitWrapperTool::m_config
HitWrapper::Config m_config
Definition: HitWrapperTool.h:35
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< HitWrapper >::m_actions
ThreadSpecificUserAction< HitWrapper > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase< HitWrapper >::makeAndFillAction
virtual std::unique_ptr< HitWrapper > makeAndFillAction(G4AtlasUserActions &actionLists)=0
Make the action and push onto the lists.
G4UA::HitWrapper::Config::time
float time
Definition: HitWrapper.h:24
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