Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
celeritas::GeantGdmlLoader Class Reference

Load a GDML file into memory. More...

#include <GeantGdmlLoader.hh>

Classes

struct  Options
 
struct  Result
 

Public Types

enum class  PointerTreatment { ignore , truncate , remove }
 How to handle pointers in volume names. More...
 
Type aliases
using MapDetectors = std::multimap< std::string, G4LogicalVolume * >
 

Public Member Functions

 GeantGdmlLoader (Options const &opts)
 Construct with options.
 
 GeantGdmlLoader ()
 Construct with defaults.
 
Result operator() (std::string const &filename) const
 Load a gdml input file, creating a pointer owned by Geant4.
 

Detailed Description

Load a GDML file into memory.

The pointer treatment gives three options:

The detectors option reads auxiliary tags in the structure that have auxtype=SensDet and returns a multimap of strings to volume pointers.

Member Enumeration Documentation

◆ PointerTreatment

How to handle pointers in volume names.

Enumerator
ignore 

Pointers will remain in the volume name.

truncate 

All text after '0x' is removed.

remove 

Only pointers are carefully removed.

Member Function Documentation

◆ operator()()

auto celeritas::GeantGdmlLoader::operator() ( std::string const filename) const
inline

Load a gdml input file, creating a pointer owned by Geant4.

Geant4's constructors for physical/logical volumes register this pointers in the "volume stores" which can be cleared with celeritas::reset_geant_geometry .

Note that material and element names (at least as of Geant4@11.0) are always stripped: only volumes and solids keep their extension.


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