ATLAS Offline Software
LengthIntegratorTool.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 "LengthIntegratorTool.h"
6 
7 namespace G4UA
8 {
9 
10  //---------------------------------------------------------------------------
11  // Constructor
12  //---------------------------------------------------------------------------
14  const std::string& name,
15  const IInterface* parent)
17  m_hSvc("THistSvc", name)
18  {
19  declareProperty("HistoSvc", m_hSvc);
20  declareProperty("CreateHistograms", m_doHistos=true);
21 
22  }
23 
24  //---------------------------------------------------------------------------
25  // Initialize - temporarily here for debugging
26  //---------------------------------------------------------------------------
28  {
29  ATH_MSG_DEBUG("initialize");
30 
31  ATH_CHECK( m_hSvc.retrieve() );
32 
33  return StatusCode::SUCCESS;
34  }
35 
36  //---------------------------------------------------------------------------
37  // Create the action on request
38  //---------------------------------------------------------------------------
39  std::unique_ptr<LengthIntegrator>
41  {
42  ATH_MSG_DEBUG("Making a LengthIntegrator action");
43  auto action = std::make_unique<LengthIntegrator>( m_hSvc.name(), m_doHistos );
44  actionList.eventActions.push_back( action.get() );
45  actionList.steppingActions.push_back( action.get() );
46  return action;
47  }
48 
49 }
G4UA::LengthIntegratorTool::LengthIntegratorTool
LengthIntegratorTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: LengthIntegratorTool.cxx:13
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition: IUserActionTool.h:32
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::LengthIntegratorTool::makeAndFillAction
virtual std::unique_ptr< LengthIntegrator > makeAndFillAction(G4AtlasUserActions &) override final
Create aciton for this thread.
Definition: LengthIntegratorTool.cxx:40
G4UA::LengthIntegrator
A user action used to evaluate thickness of all detectors traversed by outgoing particles.
Definition: LengthIntegrator.h:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LengthIntegratorTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
G4UA::LengthIntegratorTool::m_hSvc
ServiceHandle< ITHistSvc > m_hSvc
Handle to the histogram service.
Definition: LengthIntegratorTool.h:47
G4UA::LengthIntegratorTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition: LengthIntegratorTool.cxx:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
G4UA::UserActionToolBase
abstract template utility base-class for G4 user-action tools.
Definition: UserActionToolBase.h:33
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
G4UA::G4AtlasUserActions::eventActions
std::vector< G4UserEventAction * > eventActions
Definition: IUserActionTool.h:34
G4UA::LengthIntegratorTool::m_doHistos
bool m_doHistos
Definition: LengthIntegratorTool.h:51
G4UA::G4AtlasUserActions::steppingActions
std::vector< G4UserSteppingAction * > steppingActions
Definition: IUserActionTool.h:36