Celeritas 0.6.0-dev.115+3b60a5fd
|
Simple interface for G4VTrackingManager-based integration. More...
#include <TrackingManagerIntegration.hh>
Public Member Functions | |
SetupOptions & | Options () |
Edit 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 | BeginOfRunAction (G4Run const *run) |
Start the run, initializing Celeritas options. | |
void | EndOfRunAction (G4Run const *run) |
End the run. | |
Static Public Member Functions | |
static TrackingManagerIntegration & | Instance () |
Access the public-facing integration singleton. | |
Simple interface for G4VTrackingManager-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:
usually in main
.Build
and BuildForMaster
from the corresponding G4UserActionInitialization::Build
functionsBeginOfRunAction
and EndOfRunAction
from the corresponding G4UserRunAction
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.
void celeritas::TrackingManagerIntegration::Build | ( | ) |
Initialize during ActionInitialization on a worker thread or serial mode.
We guard against Build
being called from BuildForMaster
since we might add worker-specific code here.