Celeritas 0.7.0-dev.312+develop.818ec9c1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::UserActionIntegration Class Referencefinal

Simple interface for G4VUserTrackingAction-based integration. More...

#include <UserActionIntegration.hh>

Inheritance diagram for celeritas::UserActionIntegration:
Inheritance graph
[legend]

Public Member Functions

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.
 
- Public Member Functions inherited from celeritas::IntegrationBase
void BuildForMaster ()
 
void Build ()
 
void SetOptions (SetupOptions &&opts)
 Set options before starting the run.
 
void BeginOfRunAction (G4Run const *run)
 Start the run.
 
void EndOfRunAction (G4Run const *run)
 End the run.
 
OffloadMode GetMode () const
 Access whether Celeritas is set up, enabled, or uninitialized.
 
CoreParams constGetParams ()
 Access global Celeritas shared params during a run, if not disabled.
 
CoreStateInterfaceGetState ()
 Access thread-local Celeritas core state data for user diagnostics.
 

Static Public Member Functions

static UserActionIntegrationInstance ()
 Access the singleton.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::IntegrationBase
 IntegrationBase ()
 Initialize MPI and logging on first access.
 
 IntegrationBase (IntegrationBase const &)=default
 
IntegrationBaseoperator= (IntegrationBase const &)=default
 
 IntegrationBase (IntegrationBase &&)=default
 
IntegrationBaseoperator= (IntegrationBase &&)=default
 

Detailed Description

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:

The method names correspond to methods in Geant4 User Actions and must be called from all threads, both worker and master.

See further documentation in celeritas::IntegrationBase.

Note
Prefer to use celeritas::TrackingManagerIntegration instead of this class, unless you need support for Geant4 earlier than 11.0.

The documentation for this class was generated from the following files: