|
Celeritas 0.7.0-dev.177+develop.cd9b6ed5e
|
Manage offloading of tracks to Celeritas. More...
#include <LocalTransporter.hh>
Public Types | |
Type aliases | |
| using | MapStrReal = std::unordered_map< std::string, real_type > |
Public Member Functions | |
| LocalTransporter (SetupOptions const &options, SharedParams ¶ms) | |
| Construct with shared (MT) params. | |
| void | Initialize (SetupOptions const &options, SharedParams ¶ms) |
| Helper for making initialization more obvious from user code. | |
| void | SetEventId (int id) |
| void | InitializeEvent (int) |
| Set the event ID and reseed the Celeritas RNG at the start of an event. | |
| void | Push (G4Track &) |
| Convert a Geant4 track to a Celeritas primary and add to buffer. | |
| void | Flush () |
| Transport the buffered tracks and all secondaries produced. | |
| void | Finalize () |
| Clear local data. | |
| MapStrReal | GetActionTime () const |
| Get the accumulated action times. | |
| size_type | GetBufferSize () const |
| CoreStateInterface const & | GetState () const |
| Access core state data for user diagnostics. | |
| CoreStateInterface & | GetState () |
| Access core state data for user diagnostics. | |
| operator bool () const | |
| Whether the class instance is initialized. | |
Manage offloading of tracks to Celeritas.
This class must be constructed locally on each worker thread/task/stream, usually as a shared pointer that's accessible to:
LocalOffload or something? | void celeritas::LocalTransporter::Finalize | ( | ) |
Clear local data.
This may need to be executed on the same thread it was created in order to safely deallocate some Geant4 objects under the hood...
| void celeritas::LocalTransporter::Flush | ( | ) |
Transport the buffered tracks and all secondaries produced.
Abort cleanly for interrupt and user-defined (i.e., job manager) signals.
|
inline |
Helper for making initialization more obvious from user code.
This gives it some symmetry with Finalize, which is provided as an exception-friendly destructor.
Convert a Geant4 track to a Celeritas primary and add to buffer.