Celeritas  0.5.0-86+4a8eea4
Functions
GeantUtils.hh File Reference
#include "corecel/Config.hh"
#include "corecel/Assert.hh"
This graph shows which files directly or indirectly include this file:

Functions

void celeritas::disable_geant_signal_handler ()
 Clear Geant4's signal handlers that get installed on startup/activation. More...
 
int celeritas::get_geant_num_threads (G4RunManager const &runman)
 Get the number of threads in a version-portable way. More...
 
int celeritas::get_geant_num_threads ()
 Get the number of threads from the global run manager.
 
int celeritas::get_geant_thread_id ()
 Get the Geant4 thread ID.
 

Function Documentation

◆ disable_geant_signal_handler()

void celeritas::disable_geant_signal_handler ( )
inline

Clear Geant4's signal handlers that get installed on startup/activation.

This should be called before instantiating a run manager.

◆ get_geant_num_threads()

int celeritas::get_geant_num_threads ( G4RunManager const &  runman)
inline

Get the number of threads in a version-portable way.

G4RunManager::GetNumberOfThreads isn't virtual before Geant4 v10.7.0 so we need to explicitly dynamic cast to G4MTRunManager to get the number of threads.

In tasking mode, the result may be zero!