Celeritas 0.6.0-47+develop.b3cbb238
|
#include <memory>
#include <string>
#include "corecel/Macros.hh"
#include "corecel/data/ParamsDataInterface.hh"
#include "BoundingBox.hh"
#include "GeoParamsInterface.hh"
#include "ScopedGeantExceptionHandler.hh"
#include "ScopedGeantLogger.hh"
#include "Types.hh"
#include "g4/GeantGeoData.hh"
Classes | |
class | celeritas::GeantGeoParams |
Shared Geant4 geometry model wrapper. More... | |
Functions | |
void | celeritas::geant_geo (GeantGeoParams const &gp) |
Set global geometry instance. | |
GeantGeoParams const * | celeritas::geant_geo () |
Access the global geometry instance. | |
GeantGeoParams const * celeritas::geant_geo | ( | ) |
Access the global geometry instance.
This should be used by Geant4 geometry-related helper functions throughout the code base. Make sure to check the result is not null! Do not save a pointer to it either.
void celeritas::geant_geo | ( | GeantGeoParams const & | gp | ) |
Set global geometry instance.
This allows many parts of the codebase to independently access Geant4 metadata. It should be called during initialization of any Celeritas front end that integrates with Geant4. We can't use shared pointers here because of global initialization order issues (the low-level Geant4 objects may be cleared before a static celeritas::GeantGeoParams is destroyed).