Celeritas 0.6.0-129+develop.846910afa
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
VolumeParams.hh File Reference
#include <memory>
#include <vector>
#include "corecel/cont/LabelIdMultiMap.hh"
#include "corecel/cont/Span.hh"
#include "Types.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::VolumeParams
 Define and manage a hierarchy of volumes and instances thereof. More...
 

Namespaces

namespace  celeritas::inp
 Configure Celeritas input.
 

Functions

void celeritas::global_volumes (std::shared_ptr< VolumeParams const > const &gv)
 Set global geometry instance.
 
std::weak_ptr< VolumeParams const > constceleritas::global_volumes ()
 Access the global canonical volume metadata.
 

Function Documentation

◆ global_volumes() [1/2]

std::weak_ptr< VolumeParams const > const & celeritas::global_volumes ( )

Access the global canonical volume metadata.

This can be used by geometry-related helper functions throughout the code base.

Returns
Weak pointer to the global VolumeParams wrapper, which may be null.

◆ global_volumes() [2/2]

void celeritas::global_volumes ( std::shared_ptr< VolumeParams const > const gv)

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::VolumeParams is destroyed).

Note
This should be done only during setup on the main thread.