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

Tool which manages the LooperKiller action. More...

#include <LooperKillerTool.h>

Inheritance diagram for G4UA::LooperKillerTool:
Collaboration diagram for G4UA::LooperKillerTool:

Public Member Functions

 LooperKillerTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
virtual StatusCode initialize () override
virtual StatusCode finalize () override
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< LooperKillermakeAndFillAction (G4AtlasUserActions &) override final
 Create action for this thread.

Protected Attributes

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

Private Attributes

G4UA::LooperKiller::Config m_config
 Configuration parameters.

Detailed Description

Tool which manages the LooperKiller action.

Create the LooperKiller for each worker thread

Author
Andrea Di Simone

Definition at line 27 of file LooperKillerTool.h.

Constructor & Destructor Documentation

◆ LooperKillerTool()

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

Standard constructor.

Definition at line 13 of file LooperKillerTool.cxx.

15 : UserActionToolBase<LooperKiller>(type, name, parent)
16 {
17 declareProperty("MaxSteps", m_config.MaxSteps);
18 declareProperty("PrintSteps",m_config.PrintSteps);
19 declareProperty("VerboseLevel", m_config.VerboseLevel);
20 declareProperty("AbortEvent", m_config.AbortEvent);
21 declareProperty("SetError", m_config.SetError);
22 declareProperty("BSM_Only", m_config.BSM_Only);
23 }
G4UA::LooperKiller::Config m_config
Configuration parameters.
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

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

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

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

◆ finalize()

StatusCode G4UA::LooperKillerTool::finalize ( )
overridevirtual

Definition at line 34 of file LooperKillerTool.cxx.

35 {
36 ATH_MSG_DEBUG("finalize");
37
38 // Accumulate the results across threads
39 LooperKiller::Report report;
40 m_actions.accumulate(report, &LooperKiller::getReport,
42
43 ATH_MSG_INFO( "******* Report from "<< name()<< " *******");
44 ATH_MSG_INFO(" Set to kill tracks over " << m_config.MaxSteps << " steps");
45 ATH_MSG_INFO(" and give " << m_config.PrintSteps << " steps of verbose output");
46 ATH_MSG_INFO(" We killed " << report.killed_tracks << " tracks this run.");
47 ATH_MSG_INFO(" Was set to " << (m_config.AbortEvent?"":"not ") << "abort events and ");
48 ATH_MSG_INFO( (m_config.SetError?"":"not ") << "set an error state." );
49
50 return StatusCode::SUCCESS;
51 }
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
const Report & getReport() const
Retrieve results.
ThreadSpecificUserAction< LooperKiller > m_actions
list report
Definition checkTP.py:125
void merge(const Report &rep)

◆ initialize()

StatusCode G4UA::LooperKillerTool::initialize ( )
overridevirtual

Definition at line 28 of file LooperKillerTool.cxx.

29 {
30 ATH_MSG_DEBUG("initialize");
31 return StatusCode::SUCCESS;
32 }

◆ makeAndFillAction()

std::unique_ptr< LooperKiller > G4UA::LooperKillerTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

Create action for this thread.

Implements G4UA::UserActionToolBase< LooperKiller >.

Definition at line 58 of file LooperKillerTool.cxx.

59 {
60 ATH_MSG_DEBUG("Making a LooperKiller action");
61 auto action = std::make_unique<LooperKiller>(m_config);
62 actionList.steppingActions.push_back( action.get() );
63 return action;
64 }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_config

G4UA::LooperKiller::Config G4UA::LooperKillerTool::m_config
private

Configuration parameters.

Definition at line 48 of file LooperKillerTool.h.


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