Celeritas 0.7.0-dev.79+develop.b3dc2e108
|
Common interface for integrating Celeritas into user applications. More...
#include <IntegrationBase.hh>
Public Member Functions | |
void | SetOptions (SetupOptions &&opts) |
Set options before starting the run. | |
OffloadMode | GetMode () const |
Access whether Celeritas is set up, enabled, or uninitialized. | |
void | BuildForMaster () |
void | Build () |
virtual void | BeginOfRunAction (G4Run const *run)=0 |
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. | |
Protected Member Functions | |
IntegrationBase () | |
Initialize logging on first access. | |
CELER_DEFAULT_COPY_MOVE (IntegrationBase) | |
Common interface for integrating Celeritas into user applications.
This implements common functionality for the Celeritas integration classes. The GetParams
and GetState
methods may only be used during a run with Celeritas offloading enabled.
This and the integration daughters all share common data in detail::IntegrationSingleton
.
|
protected |
Initialize logging on first access.
Since this is done during static initialization, it is guaranteed to be thread safe. By ensuring IntegrationSingleton
has been constructed, it guarantees MPI is initialized (or disabled) before the first log message.
OffloadMode celeritas::IntegrationBase::GetMode | ( | ) | const |
Access whether Celeritas is set up, enabled, or uninitialized.
This is only legal to call after SetOptions
.
CoreStateInterface & celeritas::IntegrationBase::GetState | ( | ) |
Access THREAD-LOCAL Celeritas core state data for user diagnostics.
void celeritas::IntegrationBase::SetOptions | ( | SetupOptions && | opts | ) |
Set options before starting the run.
This captures the input to indicate that options cannot be modified after this point.