ATLAS Offline Software
G4AtlasWorkerRunManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef G4ATLASALG_G4ATLASWORKERRUNMANAGER_H
6 #define G4ATLASALG_G4ATLASWORKERRUNMANAGER_H
7 
8 // Hide multi-threading classes from builds without G4MT
9 #include "G4Types.hh"
10 #ifdef G4MULTITHREADED
11 
12 #include "GaudiKernel/ToolHandle.h"
13 #include "GaudiKernel/ServiceHandle.h"
14 
15 #include "G4WorkerRunManager.hh"
17 
21 
22 
24 class G4AtlasWorkerRunManager : public G4WorkerRunManager, public AthMessaging {
25 
26 public:
27 
29  static G4AtlasWorkerRunManager* GetG4AtlasWorkerRunManager();
30 
33  void Initialize() override final;
34 
36  bool ProcessEvent(G4Event* event);
37 
39  void RunTermination() override final;
40 
44  void SetDetGeoSvc(const std::string& typeAndName) {
45  m_detGeoSvc.setTypeAndName(typeAndName);
46  }
47 
49  void SetFastSimMasterTool(const std::string& typeAndName) {
50  m_fastSimTool.setTypeAndName(typeAndName);
51  }
52 
54  void SetQuietMode(bool quietMode) {
55  m_quietMode = quietMode;
56  }
58 
59 protected:
60 
62  void InitializeGeometry() override final;
63 
65  void InitializePhysics() override final;
66 
67 private:
68 
70  G4AtlasWorkerRunManager();
71 
73  void CommandLog(int returnCode, const std::string& commandString) const;
74 
75 private:
76 
79 
81  ToolHandle<IFastSimulationMasterTool> m_fastSimTool;
82 
84  bool m_quietMode{true};
85 
86 };
87 
88 #endif // G4MULTITHREADED
89 
90 #endif
ISensitiveDetectorMasterTool.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
IFastSimulationMasterTool.h
IDetectorGeometrySvc
Definition: IDetectorGeometrySvc.h:23
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
IDetectorGeometrySvc.h
IFastSimulationMasterTool
Definition: IFastSimulationMasterTool.h:18
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
jobOptions.Initialize
Initialize
Definition: jobOptions.pA.py:28
AthMessaging.h
ServiceHandle
Definition: ClusterMakerTool.h:37