Celeritas 0.7.0-dev.79+develop.b3dc2e108
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
celeritas::IntegrationBase Class Referenceabstract

Common interface for integrating Celeritas into user applications. More...

#include <IntegrationBase.hh>

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

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 constGetParams ()
 Access Celeritas shared params.
 
CoreStateInterfaceGetState ()
 Access THREAD-LOCAL Celeritas core state data for user diagnostics.
 

Protected Member Functions

 IntegrationBase ()
 Initialize logging on first access.
 
 CELER_DEFAULT_COPY_MOVE (IntegrationBase)
 

Detailed Description

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.

Note
It cannot be accessed before the Geant4 run manager is created (this requirement may be relaxed in the future).
See also
celeritas::UserActionIntegration
celeritas::TrackingManagerIntegration

This and the integration daughters all share common data in detail::IntegrationSingleton.

Constructor & Destructor Documentation

◆ IntegrationBase()

celeritas::IntegrationBase::IntegrationBase ( )
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.

Member Function Documentation

◆ BeginOfRunAction()

virtual void celeritas::IntegrationBase::BeginOfRunAction ( G4Run const run)
pure virtual

◆ GetMode()

OffloadMode celeritas::IntegrationBase::GetMode ( ) const

Access whether Celeritas is set up, enabled, or uninitialized.

This is only legal to call after SetOptions.

◆ GetState()

CoreStateInterface & celeritas::IntegrationBase::GetState ( )

Access THREAD-LOCAL Celeritas core state data for user diagnostics.

  • This can only be called when Celeritas is enabled (not kill-offload, not disabled)
  • This cannot be called from the main thread of an MT application.

◆ SetOptions()

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.


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