LDMX Software
|
Parse GDML files, build the geometry in memory and load it into Geant4. More...
#include <GDMLParser.h>
Public Member Functions | |
GDMLParser (framework::config::Parameters ¶meters, simcore::ConditionsInterface &ci) | |
Default constructor. | |
virtual | ~GDMLParser ()=default |
Default destructor. | |
G4VPhysicalVolume * | GetWorldVolume () override |
Retrieve the G4VPhysicalVolume associated with the most top-level (world) volume. | |
std::string | getDetectorName () override |
Get the name of the parsed detector. | |
void | read () override |
Parse the detector geometry and read it into memory. | |
Static Public Member Functions | |
static Parser * | create (framework::config::Parameters ¶meters, simcore::ConditionsInterface &ci) |
Create an instance of this parser. | |
Private Attributes | |
std::unique_ptr< G4GDMLParser > | parser_ |
The GDML parser. | |
std::unique_ptr< simcore::geo::AuxInfoReader > | info_ |
The auxiliary info reader. | |
std::string | detector_ |
path to the detector GDML | |
bool | validate_ |
should we take the time to validate | |
std::string | detector_name_ {""} |
The name of the parsed detector. | |
Parse GDML files, build the geometry in memory and load it into Geant4.
This class extends the interface Parser which allows creation of the parser at runtime via a factory.
Definition at line 26 of file GDMLParser.h.
simcore::geo::GDMLParser::GDMLParser | ( | framework::config::Parameters & | parameters, |
simcore::ConditionsInterface & | ci | ||
) |
Default constructor.
parameters | The parameters used to configure this parser. |
ci | Interface that allows access to the conditions. |
Definition at line 6 of file GDMLParser.cxx.
References detector_, framework::config::Parameters::getParameter(), info_, parser_, and validate_.
|
inlinestatic |
Create an instance of this parser.
Definition at line 66 of file GDMLParser.h.
Referenced by simcore::geo::ParserFactory::ParserFactory().
|
inlineoverridevirtual |
Get the name of the parsed detector.
This name is typically extracted from the file containing the detector description.
Implements simcore::geo::Parser.
Definition at line 56 of file GDMLParser.h.
References detector_name_.
|
overridevirtual |
Retrieve the G4VPhysicalVolume associated with the most top-level (world) volume.
Implements simcore::geo::Parser.
Definition at line 16 of file GDMLParser.cxx.
References parser_.
|
overridevirtual |
Parse the detector geometry and read it into memory.
Implements simcore::geo::Parser.
Definition at line 20 of file GDMLParser.cxx.
References detector_, detector_name_, info_, parser_, and validate_.
|
private |
path to the detector GDML
Definition at line 79 of file GDMLParser.h.
Referenced by GDMLParser(), and read().
|
private |
The name of the parsed detector.
Definition at line 85 of file GDMLParser.h.
Referenced by getDetectorName(), and read().
|
private |
The auxiliary info reader.
Definition at line 76 of file GDMLParser.h.
Referenced by GDMLParser(), and read().
|
private |
The GDML parser.
Definition at line 73 of file GDMLParser.h.
Referenced by GDMLParser(), GetWorldVolume(), and read().
|
private |
should we take the time to validate
Definition at line 82 of file GDMLParser.h.
Referenced by GDMLParser(), and read().