LDMX Software
GDMLParser.h
1#ifndef SIMCORE_GEO_GDMLPARSER_H
2#define SIMCORE_GEO_GDMLPARSER_H
3
4//---< Geant4 >---//
5#include "G4GDMLParser.hh"
6
7//---< Framework >---//
8#include "Framework/Configure/Parameters.h"
9
10//---< SimCore >---//
11#include "SimCore/Geo/AuxInfoReader.h"
12#include "SimCore/Geo/Parser.h"
13
14// Forward Declarations
15class G4VPhysicalVolume;
16
17namespace simcore {
18namespace geo {
19
26class GDMLParser : public Parser {
27 public:
36
38 virtual ~GDMLParser() = default;
39
46 G4VPhysicalVolume *GetWorldVolume() override;
47
56 std::string getDetectorName() override { return detector_name_; }
57
61 void read() override;
62
68 return new GDMLParser(parameters, ci);
69 }
70
71 private:
73 std::unique_ptr<G4GDMLParser> parser_;
74
76 std::unique_ptr<simcore::geo::AuxInfoReader> info_;
77
79 std::string detector_;
80
83
85 std::string detector_name_{""};
86
87}; // GDMLParser
88} // namespace geo
89} // namespace simcore
90
91#endif // SIMCORE_GEO_GDMLPARSER_H
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Handle to the conditions system, provided at construction to classes which require it.
Parse GDML files, build the geometry in memory and load it into Geant4.
Definition GDMLParser.h:26
bool validate_
should we take the time to validate
Definition GDMLParser.h:82
virtual ~GDMLParser()=default
Default destructor.
static Parser * create(framework::config::Parameters &parameters, simcore::ConditionsInterface &ci)
Create an instance of this parser.
Definition GDMLParser.h:66
std::unique_ptr< simcore::geo::AuxInfoReader > info_
The auxiliary info reader.
Definition GDMLParser.h:76
std::string detector_name_
The name of the parsed detector.
Definition GDMLParser.h:85
std::string getDetectorName() override
Get the name of the parsed detector.
Definition GDMLParser.h:56
std::string detector_
path to the detector GDML
Definition GDMLParser.h:79
G4VPhysicalVolume * GetWorldVolume() override
Retrieve the G4VPhysicalVolume associated with the most top-level (world) volume.
void read() override
Parse the detector geometry and read it into memory.
std::unique_ptr< G4GDMLParser > parser_
The GDML parser.
Definition GDMLParser.h:73
Interface for a parser used to load a geometry into Geant4.
Definition Parser.h:25