|
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>
25 G4Mutex action_mutex=G4MUTEX_INITIALIZER;
26 G4Mutex sequence_mutex=G4MUTEX_INITIALIZER;
74 except(
"Geant4SharedRunAction: Attempt to use invalid actor!");
80 G4AutoLock protection_lock(&action_mutex); {
90 G4AutoLock protection_lock(&action_mutex); {
132 G4AutoLock protection_lock(&action_mutex);
137 except(
"Geant4RunActionSequence: Attempt to add invalid actor!");
142 G4AutoLock protection_lock(&sequence_mutex);
149 G4AutoLock protection_lock(&sequence_mutex);
void adopt(Geant4RunAction *action)
Add an actor responding to all callbacks. Sequence takes ownership.
virtual void updateContext(Geant4Context *ctxt) override
Set or update client context.
bool m_needsControl
Default property: Flag to create control instance.
virtual ~Geant4SharedRunAction()
Default destructor.
virtual void configureFiber(Geant4Context *thread_context)
Set or update client for the use in a new thread fiber.
Functor to access elements by name.
Actors< Geant4RunAction > m_actors
The list of action objects to be called.
virtual void end(const G4Run *run)
End-of-run callback.
Geant4Context * m_context
Reference to the Geant4 context.
Geant4RunActionSequence(Geant4Context *context, const std::string &nam)
Standard constructor.
virtual void end(const G4Run *run) override
End-of-run callback.
static void increment(T *)
Increment count according to type information.
virtual void begin(const G4Run *run)
Begin-of-run callback.
Functor to update the context of a Geant4Action object.
PropertyManager m_properties
Property pool.
void except(const char *fmt,...) const
Support of exceptions: Print fatal message and throw runtime_error.
virtual ~Geant4RunActionSequence()
Default destructor.
virtual void begin(const G4Run *run) override
Begin-of-run callback.
void adopt(const PropertyManager ©)
Import properties of another instance.
virtual void end(const G4Run *run)
End-of-run callback.
Geant4SharedRunAction(Geant4Context *context, const std::string &nam)
Standard constructor.
static void decrement(T *)
Decrement count according to type information.
Default base class for all Geant 4 actions and derivates thereof.
long release()
Decrease reference count. Implicit destruction.
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.
virtual void begin(const G4Run *run)
Begin-of-run callback.
Geant4RunAction * m_action
Reference to the shared action.
long addRef()
Increase reference count.
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
virtual void use(Geant4RunAction *action)
Underlying object to be used during the execution of this thread.
CallbackSequence m_begin
Callback sequence for begin-run action.
Geant4RunAction * get(const std::string &name) const
Get an action by name.
Concrete basic implementation of the Geant4 run action base class.
virtual ~Geant4RunAction()
Default destructor.
CallbackSequence m_end
Callback sequence for end-run action.
virtual void configureFiber(Geant4Context *thread_context) override
Set or update client for the use in a new thread fiber.
Geant4RunAction(Geant4Context *context, const std::string &nam)
Standard constructor.
Generic context to extend user, run and event information.
Geant4Context * context() const
Access the context.