5#ifndef G4ATLASSERVICES_G4RunTool_H
6#define G4ATLASSERVICES_G4RunTool_H
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
27#include <condition_variable>
48class G4RunTool :
public extends<AthAlgTool , IG4RunTool> {
52 using extends::extends;
55 virtual StatusCode
initialize()
override final;
56 virtual StatusCode
finalize()
override final;
64 virtual size_t Size()
const override;
72 void commandLog(
int returnCode,
const std::string& commandString)
const;
78 ToolHandle<IDetectorConstructionTool>
m_detConstruction{
this,
"DetectorConstruction",
"",
"Tool handle of the DetectorConstruction"};
79 ToolHandleArray<G4UA::IUserActionTool>
m_actionTools{
this,
"UserActionTools", {},
"User action tools to be added to the G4 Action service."};
80 PublicToolHandleArray<IPhysicsInitializationTool>
m_physicsInitializationTools{
this,
"PhysicsInitializationTools", {},
"Physics initialization happening after Geant4 initialization"};
84 Gaudi::Property<std::string>
m_libList{
this,
"Dll",
"",
""};
85 Gaudi::Property<std::string>
m_physList{
this,
"Physics",
"",
""};
86 Gaudi::Property<std::string>
m_fieldMap{
this,
"FieldMap",
"",
""};
87 Gaudi::Property<std::vector<std::string> >
m_g4commands{
this,
"G4Commands", {},
"Commands to be sent to Geant4 UI at initialization"};
89 Gaudi::Property<int>
m_nG4threads{
this,
"NG4threads", 1,
"Number of parallel G4 worker threads to launch"};
90 Gaudi::Property<int>
m_nG4eventsPerRun{
this,
"NG4eventsPerRun", 100000,
"Number of G4 events foreseen for each Run"};