ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsValidationUserActionTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace G4UA
8{
9
10 namespace iGeant4
11 {
12
14 PhysicsValidationUserActionTool(const std::string& type,
15 const std::string& name,
16 const IInterface* parent)
18 {
19 declareProperty("ValidationOutput",
20 m_config.validationOutput,
21 "If turned on, write out a ROOT tree.");
22 declareProperty("ValidationStreamName",
23 m_config.validationStream,
24 "Name of the output stream");
25 declareProperty("THistService",
26 m_config.thistSvc,
27 "The THistSvc");
28 declareProperty("GeoIDSvc" , m_config.geoIDSvc , "ISF GeoID Svc" );
29 declareProperty("ID_Rmax",m_config.idR);
30 declareProperty("ID_Zmax",m_config.idZ);
31 declareProperty("CaloRmean",m_config.caloRmean);
32 declareProperty("CaloZmean",m_config.caloZmean);
33 declareProperty("MuonRmean",m_config.muonRmean);
34 declareProperty("MuonZmean",m_config.muonZmean);
35 declareProperty("CavernRmean",m_config.cavernRmean);
36 declareProperty("CavernZmean",m_config.cavernZmean);
37 }
38
39 std::unique_ptr<PhysicsValidationUserAction>
41 {
42 ATH_MSG_DEBUG("Constructing a PhysicsValidationUserAction");
43 if(msgLvl(MSG::VERBOSE)) { m_config.verboseLevel = MSG::VERBOSE; }
44 else if(msgLvl(MSG::DEBUG)) { m_config.verboseLevel = MSG::DEBUG; }
45 else if(msgLvl(MSG::INFO)) { m_config.verboseLevel = MSG::INFO; }
46 else if(msgLvl(MSG::WARNING)) { m_config.verboseLevel = MSG::WARNING; }
47 else if(msgLvl(MSG::ERROR)) { m_config.verboseLevel = MSG::ERROR; }
48 else if(msgLvl(MSG::FATAL)) { m_config.verboseLevel = MSG::FATAL; }
49 auto action = std::make_unique<PhysicsValidationUserAction>(m_config);
50 actionList.runActions.push_back( action.get() );
51 actionList.eventActions.push_back( action.get() );
52 actionList.trackingActions.push_back( action.get() );
53 actionList.steppingActions.push_back( action.get() );
54 return action;
55 }
56
57 } // iGeant4
58
59} // namespace G4UA
#define ATH_MSG_DEBUG(x)
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::unique_ptr< PhysicsValidationUserAction > makeAndFillAction(G4AtlasUserActions &) override final
Create an action for this thread.
PhysicsValidationUserAction::Config m_config
Configuration parameters.
PhysicsValidationUserActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Struct for passing around user actions.
std::vector< G4UserTrackingAction * > trackingActions
std::vector< G4UserSteppingAction * > steppingActions
std::vector< G4UserEventAction * > eventActions
std::vector< G4UserRunAction * > runActions