Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Simple interface for G4VUserTrackingAction-based integration. More...
#include <UserActionIntegration.hh>
Public Member Functions | |
void | BeginOfRunAction (G4Run const *run) final |
Start the run. | |
void | BeginOfEventAction (G4Event const *event) |
Send Celeritas the event ID. | |
void | PreUserTrackingAction (G4Track *track) |
Send tracks to Celeritas if applicable and "StopAndKill" if so. | |
void | EndOfEventAction (G4Event const *event) |
Flush offloaded tracks from Celeritas. | |
![]() | |
void | SetOptions (SetupOptions &&opts) |
Set options before starting the run. | |
void | BuildForMaster () |
Initialize during ActionInitialization on non-worker thread in MT mode. | |
void | Build () |
Initialize during ActionInitialization on a worker thread or serial mode. | |
void | EndOfRunAction (G4Run const *run) |
End the run. | |
CoreParams const & | GetParams () |
Access Celeritas shared params. | |
CoreStateInterface & | GetState () |
Access THREAD-LOCAL Celeritas core state data for user diagnostics. | |
Static Public Member Functions | |
static UserActionIntegration & | Instance () |
Access the singleton. | |
Additional Inherited Members | |
![]() | |
CELER_DEFAULT_COPY_MOVE (IntegrationBase) | |
Simple interface for G4VUserTrackingAction-based integration.
This singleton integrates both thread-local and global data with the user application. To use this class in your Geant4 application to offload tracks to Celeritas:
Options
before calling G4RunManager::Initialize
Build
and BuildForMaster
from UserActionInitialization
BeginOfRunAction
and EndOfRunAction
from UserRunAction
BeginOfEvent
and EndOfEvent
from UserEventAction
PreUserTrackingAction
from your UserTrackingAction
The CELER_DISABLE
environment variable, if set and non-empty, will disable offloading so that Celeritas will not be built nor kill tracks.
The method names correspond to methods in Geant4 User Actions and must be called from all threads, both worker and master.
celeritas::TrackingManagerIntegration
instead of this class, unless you need support for Geant4 earlier than 11.1.Start the run.
Implements celeritas::IntegrationBase.