14 #ifndef DD4HEP_DDG4_GEANT4EVENTACTION_H
15 #define DD4HEP_DDG4_GEANT4EVENTACTION_H
27 namespace Simulation {
30 class Geant4EventAction;
31 class Geant4SharedEventAction;
32 class Geant4EventActionSequence;
70 virtual void begin(
const G4Event* event);
72 virtual void end(
const G4Event* event);
111 virtual void begin(
const G4Event* event);
113 virtual void end(
const G4Event* event);
162 template <
typename Q,
typename T>
167 template <
typename Q,
typename T>
172 template <
typename Q,
typename T>
179 virtual void begin(
const G4Event* event);
181 virtual void end(
const G4Event* event);
187 #endif // DD4HEP_DDG4_GEANT4EVENTACTION_H
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
Geant4SharedEventAction()=default
Inhibit copy constructor.
Geant4EventAction & operator=(const Geant4EventAction ©)=delete
Inhibit assignment operator.
virtual ~Geant4EventActionSequence()
Default destructor.
virtual void end(const G4Event *event)
End-of-event callback.
Geant4SharedEventAction shared_type
Geant4EventActionSequence()=default
Inhibit copy constructor.
virtual void end(const G4Event *event)
End-of-event callback.
void callAtEnd(Q *p, void(T::*f)(const G4Event *))
Register end-of-event callback.
virtual ~Geant4SharedEventAction()
Default destructor.
void add(const Callback &cb, Location where)
Generically Add a new callback to the sequence depending on the location arguments.
void callAtFinal(Q *p, void(T::*f)(const G4Event *))
Register event-cleanup callback (after end-of-event callback – unordered)
virtual void updateContext(Geant4Context *ctxt)
Set or update client context.
Definition of an actor on sequences of callbacks.
Concrete implementation of the Geant4 event action sequence.
Concrete basic implementation of the Geant4 event action.
Geant4Context * context() const
Access the context.
const std::string & name() const
Access name of the action.
void callAtBegin(Q *p, void(T::*f)(const G4Event *))
Register begin-of-event callback.
CallbackSequence m_end
Callback sequence for event finalization action.
void adopt(Geant4EventAction *action)
Add an actor responding to all callbacks. Sequence takes ownership.
Implementation of the Geant4 shared event action.
Geant4EventAction * m_action
Reference to the shared action.
CallbackSequence m_begin
Callback sequence for event initialization action.
virtual void end(const G4Event *event)
End-of-event callback.
virtual void begin(const G4Event *event)
Begin-of-event callback.
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
virtual ~Geant4EventAction()
Default destructor.
Geant4EventAction()=default
Inhibit copy constructor.
Geant4EventActionSequence & operator=(const Geant4EventActionSequence ©)=delete
Inhibit assignment operator.
Generic context to extend user, run and event information.
Geant4SharedEventAction & operator=(const Geant4SharedEventAction ©)=delete
Inhibit assignment operator.
virtual void use(Geant4EventAction *action)
Underlying object to be used during the execution of this thread.
Default base class for all Geant 4 actions and derivates thereof.
CallbackSequence m_final
Callback sequence for event finalization action.
virtual void begin(const G4Event *event)
Begin-of-event callback.
virtual void begin(const G4Event *event)
Begin-of-event callback.
Actors< Geant4EventAction > m_actors
The list of action objects to be called.
Actor class to manipulate action groups.