14 #ifndef DD4HEP_DDG4_GEANT4USERINITIALIZATION_H
15 #define DD4HEP_DDG4_GEANT4USERINITIALIZATION_H
26 namespace Simulation {
42 virtual void build()
const;
68 template <
typename Q,
typename T>
void build(Q* p,
void (
T::*f)()) {
72 template <
typename Q,
typename T>
void buildMaster(Q* p,
void (
T::*f)()) {
81 virtual void build()
const;
88 #endif // DD4HEP_DDG4_GEANT4USERINITIALIZATION_H
Actors< Geant4UserInitialization > m_actors
The list of action objects to be called.
Class to orchestrate a modular initializion of a multi- or single threaded Geant4 application...
virtual void build() const
Callback function to build setup for the MT worker thread.
virtual ~Geant4UserInitializationSequence()
Default destructor.
void add(const Callback &cb, Location where)
Generically Add a new callback to the sequence depending on the location arguments.
Definition of an actor on sequences of callbacks.
void build(Q *p, void(T::*f)())
Register callback to setup worker. Types Q and T must be polymorph!
CallbackSequence m_masterCalls
Callback sequence to initialize the thread master.
CallbackSequence m_workerCalls
Callback sequence to initialize worker elements.
virtual void buildMaster() const
Callback function to build setup for the MT master thread.
Geant4UserInitializationSequence(Geant4Context *c, const std::string &nam)
Standard constructor.
void adopt(Geant4UserInitialization *action)
Add an actor responding to all callbacks. Sequence takes ownership.
Base class to initialize a multi-threaded or single threaded Geant4 application.
Geant4UserInitialization(Geant4Context *c, const std::string &nam)
Standard constructor.
virtual void updateContext(Geant4Context *ctxt)
Set client context.
virtual void build() const
Callback function to build setup for the MT worker thread.
Generic context to extend user, run and event information.
void buildMaster(Q *p, void(T::*f)())
Register callback to setup master. Types Q and T must be polymorph!
virtual ~Geant4UserInitialization()
Default destructor.
Default base class for all Geant 4 actions and derivates thereof.
virtual void buildMaster() const
Callback function to build setup for the MT master thread.