|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DDG4_GEANT4STACKINGACTION_H
14 #define DDG4_GEANT4STACKINGACTION_H
20 #include <G4ClassificationOfNewTrack.hh>
32 class Geant4StackingAction;
33 class Geant4SharedStackingAction;
34 class Geant4StackingActionSequence;
40 G4ClassificationOfNewTrack
value;
105 virtual void newStage(G4StackManager* stackManager)
override;
107 virtual void prepare(G4StackManager* stackManager)
override;
110 classifyNewTrack(G4StackManager* stackManager,
const G4Track* track)
override;
155 template <
typename T>
void callAtPrepare(T* p,
void (T::*f)(G4StackManager*)) {
161 virtual void newStage(G4StackManager* stackManager);
163 virtual void prepare(G4StackManager* stackManager);
171 #endif // DDG4_GEANT4STACKINGACTION_H
virtual void updateContext(Geant4Context *ctxt) override
Set or update client context.
TrackClassification(G4ClassificationOfNewTrack val)
G4ClassificationOfNewTrack value
Geant4StackingAction * m_action
Reference to the shared action.
CallbackSequence m_newStage
Callback sequence for the newStage call.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4StackingActionSequence)
Define standard assignments and constructors.
Concrete implementation of the Geant4 stacking action sequence.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4SharedStackingAction)
Define standard assignments and constructors.
Geant4StackingActionTrackClassification
virtual void newStage(G4StackManager *)
New-stage callback.
void add(const Callback &cb, Location where)
Generically Add a new callback to the sequence depending on the location arguments.
Actors< Geant4StackingAction > m_actors
The list of action objects to be called.
Geant4SharedStackingAction shared_type
virtual TrackClassification classifyNewTrack(G4StackManager *stackManager, const G4Track *track) override
Return TrackClassification with enum G4ClassificationOfNewTrack or NoTrackClassification.
Geant4StackingAction * get(const std::string &name) const
Get an action by name.
Definition of an actor on sequences of callbacks.
Geant4StackingAction(Geant4Context *ctxt, const std::string &name)
Standard constructor.
virtual ~Geant4StackingAction()
Default destructor.
virtual ~Geant4SharedStackingAction()
Default destructor.
virtual void prepare(G4StackManager *stackManager)
Preparation callback.
CallbackSequence m_prepare
Default base class for all Geant 4 actions and derivates thereof.
DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4StackingAction)
Define standard assignments and constructors.
const std::string & name() const
Access name of the action.
virtual TrackClassification classifyNewTrack(G4StackManager *, const G4Track *track)
Return TrackClassification with enum G4ClassificationOfNewTrack or NoTrackClassification.
virtual void prepare(G4StackManager *stackManager) override
Preparation callback.
virtual void prepare(G4StackManager *)
Preparation callback.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.
Geant4SharedStackingAction(Geant4Context *context, const std::string &nam)
Standard constructor.
Namespace for the AIDA detector description toolkit.
virtual void use(Geant4StackingAction *action)
Underlying object to be used during the execution of this thread.
Concrete implementation of the Geant4 stacking action base class.
void callAtPrepare(T *p, void(T::*f)(G4StackManager *))
Register end-of-event callback. Types Q and T must be polymorph!
virtual void newStage(G4StackManager *stackManager)
New-stage callback.
virtual ~Geant4StackingActionSequence()
Default destructor.
void adopt(Geant4StackingAction *action)
Add an actor responding to all callbacks. Sequence takes ownership.
virtual void newStage(G4StackManager *stackManager) override
New-stage callback.
Geant4StackingActionSequence(Geant4Context *ctxt, const std::string &name)
Standard constructor.
Implementation of the Geant4 shared stacking action.
virtual TrackClassification classifyNewTrack(G4StackManager *stackManager, const G4Track *track)
Classify new track: The first call in the sequence returning non-null pointer wins!
void callAtNewStage(T *p, void(T::*f)(G4StackManager *))
Register begin-of-event callback. Types Q and T must be polymorph!
Generic context to extend user, run and event information.
Geant4Context * context() const
Access the context.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.