ATLAS Offline Software
Loading...
Searching...
No Matches
FastIDKillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "FastIDKillerTool.h"
6
7namespace G4UA
8{
9
10 //---------------------------------------------------------------------------
12 const std::string& name,
13 const IInterface* parent)
14 : UserActionToolBase<FastIDKiller>(type, name, parent)
15 {
16 declareProperty("R", m_config.R);
17 declareProperty("Z", m_config.Z);
18 declareProperty("energyCut", m_config.energyCut);
19 declareProperty("isDalek", m_config.isDalek);
20 }
21
22 //---------------------------------------------------------------------------
23 std::unique_ptr<FastIDKiller>
25 {
26 ATH_MSG_DEBUG("Constructing a FastIDKiller action");
27 auto action = std::make_unique<FastIDKiller>(m_config);
28 actionList.runActions.push_back( action.get() );
29 actionList.steppingActions.push_back( action.get() );
30 return action;
31 }
32
33 //---------------------------------------------------------------------------
35 {
36 // Accumulate results across threads
38 m_actions.accumulate(report, &FastIDKiller::getReport,
40 ATH_MSG_INFO( "Fast Inner Detector Killer killed " << report.killCount <<
41 " particles during this run." );
42 return StatusCode::SUCCESS;
43 }
44
45} // namespace G4UA
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
FastIDKillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
virtual std::unique_ptr< FastIDKiller > makeAndFillAction(G4AtlasUserActions &) override final
Create the action for the current thread.
FastIDKiller::Config m_config
virtual StatusCode finalize() override
NEEDS DOCUMENTATION.
const Report & getReport() const
ThreadSpecificUserAction< FastIDKiller > m_actions
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Per-thread results for merging at end of run.
void merge(const Report &rep)
Struct for passing around user actions.
std::vector< G4UserSteppingAction * > steppingActions
std::vector< G4UserRunAction * > runActions