k4SimGeant4
Loading...
Searching...
No Matches
SimG4Alg.h
Go to the documentation of this file.
1#ifndef SIMG4COMPONENTS_G4SIMALG_H
2#define SIMG4COMPONENTS_G4SIMALG_H
3
4// GAUDI
5#include "Gaudi/Algorithm.h"
6
7// FCCSW
8#include "k4FWCore/DataHandle.h"
11
12// Forward declarations:
13// Interfaces
14class ISimG4Svc;
15
16// Geant
17class G4Event;
18
31class SimG4Alg : public Gaudi::Algorithm {
32public:
33 explicit SimG4Alg(const std::string&, ISvcLocator*);
34 virtual ~SimG4Alg();
38 virtual StatusCode initialize() final;
46 virtual StatusCode execute(const EventContext&) const final;
50 virtual StatusCode finalize() final;
51
52private:
54 ServiceHandle<ISimG4Svc> m_geantSvc;
56 mutable PublicToolHandleArray<ISimG4SaveOutputTool> m_saveTools {
57 this, "outputs", {}};
59 mutable ToolHandle<ISimG4EventProviderTool> m_eventTool{
60 "SimG4PrimariesFromEdmTool", this};
61};
62#endif /* SIMG4COMPONENTS_G4SIMALG_H */
Interface to the main Geant simulation service.
Definition ISimG4Svc.h:17
Geant simulation algorithm.
Definition SimG4Alg.h:31
ToolHandle< ISimG4EventProviderTool > m_eventTool
Handle for the tool that creates the G4Event.
Definition SimG4Alg.h:59
SimG4Alg(const std::string &, ISvcLocator *)
Definition SimG4Alg.cpp:11
PublicToolHandleArray< ISimG4SaveOutputTool > m_saveTools
Handle to the tools saving the output.
Definition SimG4Alg.h:56
virtual ~SimG4Alg()
Definition SimG4Alg.cpp:15
virtual StatusCode finalize() final
Finalize.
Definition SimG4Alg.cpp:55
virtual StatusCode initialize() final
Initialize.
Definition SimG4Alg.cpp:17
virtual StatusCode execute(const EventContext &) const final
Execute the simulation.
Definition SimG4Alg.cpp:37
ServiceHandle< ISimG4Svc > m_geantSvc
Pointer to the interface of Geant simulation service.
Definition SimG4Alg.h:54