13 #ifndef DD4HEP_DDG4_GEANT4STEPPINGACTION_H
14 #define DD4HEP_DDG4_GEANT4STEPPINGACTION_H
20 class G4SteppingManager;
27 namespace Simulation {
30 class Geant4SteppingAction;
31 class Geant4SharedSteppingAction;
32 class Geant4SteppingActionSequence;
51 virtual void operator()(
const G4Step* step, G4SteppingManager* mgr);
83 virtual void operator()(
const G4Step* step, G4SteppingManager* mgr);
122 template <
typename Q,
typename T>
123 void call(Q* p,
void (
T::*f)(
const G4Step*, G4SteppingManager*)) {
129 virtual void operator()(
const G4Step* step, G4SteppingManager* mgr);
135 #endif // DD4HEP_DDG4_GEANT4STEPPINGACTION_H
Concrete implementation of the Geant4 stepping action sequence.
Geant4SharedSteppingAction(const Geant4SteppingAction ©)=delete
Inhibit copy constructor.
virtual ~Geant4SteppingAction()
Default destructor.
Geant4SharedSteppingAction shared_type
virtual ~Geant4SharedSteppingAction()
Default destructor.
CallbackSequence m_calls
Callback sequence for user stepping action calls.
Implementation of the Geant4 shared stepping action.
void call(Q *p, void(T::*f)(const G4Step *, G4SteppingManager *))
Register stepping action callback. Types Q and T must be polymorph!
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.
virtual void updateContext(Geant4Context *ctxt)
Set or update client context.
Geant4Context * context() const
Access the context.
const std::string & name() const
Access name of the action.
Concrete implementation of the Geant4 stepping action sequence.
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
Geant4SteppingAction(const Geant4SteppingAction ©)=delete
Inhibit copy constructor.
virtual ~Geant4SteppingActionSequence()
Default destructor.
virtual void operator()(const G4Step *step, G4SteppingManager *mgr)
User stepping callback.
void adopt(Geant4SteppingAction *action)
Add an actor responding to all callbacks. Sequence takes ownership.
Geant4SteppingActionSequence(const Geant4SteppingAction ©)=delete
Inhibit copy constructor.
Geant4SteppingAction * m_action
Reference to the shared action.
virtual void use(Geant4SteppingAction *action)
Underlying object to be used during the execution of this thread.
Actors< Geant4SteppingAction > m_actors
The list of action objects to be called.
Generic context to extend user, run and event information.
virtual void operator()(const G4Step *step, G4SteppingManager *mgr)
User stepping callback.
Default base class for all Geant 4 actions and derivates thereof.
virtual void operator()(const G4Step *step, G4SteppingManager *mgr)
User stepping callback.