|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
19 #include <G4Threading.hh>
20 #include <G4AutoLock.hh>
24 G4Mutex action_mutex=G4MUTEX_INITIALIZER;
70 except(
"Attempt to use invalid actor!");
76 G4AutoLock protection_lock(&action_mutex); {
86 G4AutoLock protection_lock(&action_mutex); {
96 const G4Track* track) {
98 G4AutoLock protection_lock(&action_mutex); {
129 except(
"Attempt to add invalid actor!");
163 const G4Track* track) {
165 auto ret = a->classifyNewTrack(stackManager, track);
virtual void updateContext(Geant4Context *ctxt) override
Set or update client context.
bool m_needsControl
Default property: Flag to create control instance.
Geant4StackingAction * m_action
Reference to the shared action.
CallbackSequence m_newStage
Callback sequence for the newStage call.
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
Functor to access elements by name.
Geant4Context * m_context
Reference to the Geant4 context.
virtual void newStage(G4StackManager *)
New-stage callback.
static void increment(T *)
Increment count according to type information.
Functor to update the context of a Geant4Action object.
Actors< Geant4StackingAction > m_actors
The list of action objects to be called.
PropertyManager m_properties
Property pool.
virtual TrackClassification classifyNewTrack(G4StackManager *stackManager, const G4Track *track) override
Return TrackClassification with enum G4ClassificationOfNewTrack or NoTrackClassification.
void except(const char *fmt,...) const
Support of exceptions: Print fatal message and throw runtime_error.
Geant4StackingAction * get(const std::string &name) const
Get an action by name.
Geant4StackingAction(Geant4Context *ctxt, const std::string &name)
Standard constructor.
virtual ~Geant4StackingAction()
Default destructor.
virtual ~Geant4SharedStackingAction()
Default destructor.
void adopt(const PropertyManager ©)
Import properties of another instance.
static void decrement(T *)
Decrement count according to type information.
virtual void prepare(G4StackManager *stackManager)
Preparation callback.
CallbackSequence m_prepare
Default base class for all Geant 4 actions and derivates thereof.
long release()
Decrease reference count. Implicit destruction.
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.
void clear()
Clear the sequence and remove all callbacks.
static TypeName split(const std::string &type_name)
Split string pair according to default delimiter ('/')
PropertyManager & properties()
Access to the properties of the object.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.
long addRef()
Increase reference count.
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
Geant4SharedStackingAction(Geant4Context *context, const std::string &nam)
Standard constructor.
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.
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.
virtual TrackClassification classifyNewTrack(G4StackManager *stackManager, const G4Track *track)
Classify new track: The first call in the sequence returning non-null pointer wins!
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.