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//---< SimCore >---//
8#include "SimCore/Geo/AuxInfoReader.h"
9#include "SimCore/Geo/Parser.h"
10
11//---< SimCore >---//
12#include "SimCore/ConditionsInterface.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
63 private:
65 std::unique_ptr<G4GDMLParser> parser_;
66
68 std::unique_ptr<simcore::geo::AuxInfoReader> info_;
69
71 std::string detector_;
72
75
77 std::string detector_name_{""};
78
79}; // GDMLParser
80} // namespace geo
81} // namespace simcore
82
83#endif // SIMCORE_GEO_GDMLPARSER_H
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
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:74
GDMLParser(framework::config::Parameters &parameters, simcore::ConditionsInterface &ci)
Default constructor.
Definition GDMLParser.cxx:6
virtual ~GDMLParser()=default
Default destructor.
G4VPhysicalVolume * getWorldVolume() override
Retrieve the G4VPhysicalVolume associated with the most top-level (world) volume.
std::unique_ptr< simcore::geo::AuxInfoReader > info_
The auxiliary info reader.
Definition GDMLParser.h:68
std::string detector_name_
The name of the parsed detector.
Definition GDMLParser.h:77
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:71
void read() override
Parse the detector geometry and read it into memory.
std::unique_ptr< G4GDMLParser > parser_
The GDML parser.
Definition GDMLParser.h:65
Interface for a parser used to load a geometry into Geant4.
Definition Parser.h:23
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...