|
actions
|
Registers GEMC user actions for worker threads, sequential execution, and the master thread. More...
#include <gaction.h>
Public Member Functions | |
| GAction (std::shared_ptr< GOptions > gopts, std::shared_ptr< gdynamicdigitization::dRoutinesMap > digi_map) | |
| Constructs the action initializer used by the Geant4 run manager. | |
| ~GAction () override=default | |
| GAction (const GAction &)=delete | |
| GAction & | operator= (const GAction &)=delete |
| GAction (GAction &&)=delete | |
| GAction & | operator= (GAction &&)=delete |
| void | Build () const override |
| Registers the user actions required by worker threads and sequential execution. | |
| void | BuildForMaster () const override |
| Registers the user actions required by the master thread. | |
| std::shared_ptr< std::vector< GparticlePtr > > | getSharedParticles () const |
| Returns the shared particle list so the pmaker GUI can wire its tabs to the same objects. | |
Public Member Functions inherited from GBase< GAction > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GAction > | |
| std::shared_ptr< GLogger > | log |
Geant4 uses an action-initialization object derived from G4VUserActionInitialization to obtain the user actions that will participate in a simulation.
In this module, GAction applies that lifecycle as follows:
This split mirrors the Geant4 execution model:
Internally, this class stores the shared configuration object and the shared digitization-routine map so that every action created by this initializer receives a consistent view of the runtime configuration.
|
explicit |
| gopts | Shared configuration object used by all actions constructed by this initializer. |
| digi_map | Shared map associating collection names with digitization routines. |
Definition at line 12 of file gaction.cc.
|
overridedefault |
|
delete |
|
delete |
|
override |
This method is called by Geant4 when action objects must be created for an execution context that processes events.
The registration order used here is:
The event action receives the run-action instance created in this method so it can access thread-local run services such as digitization-routine lookup and streamer access.
Definition at line 37 of file gaction.cc.
|
override |
In multithreaded execution, the master thread does not process individual events. For that reason, only GRunAction is registered here. That action handles the master-side run lifecycle, including merged run-data publication when needed.
Definition at line 28 of file gaction.cc.
|
inline |