LDMX Software
GDMLParser.cxx
1#include "SimCore/Geo/GDMLParser.h"
2
3namespace simcore {
4namespace geo {
5
8 detector_ = parameters.getParameter<std::string>("detector");
9 validate_ = parameters.getParameter<bool>("validate_detector");
10 parser_ = std::make_unique<G4GDMLParser>();
11 parser_->SetOverlapCheck(validate_);
12 info_ =
13 std::make_unique<simcore::geo::AuxInfoReader>(parser_.get(), parameters);
14}
15
16G4VPhysicalVolume *GDMLParser::GetWorldVolume() {
17 return parser_->GetWorldVolume();
18}
19
22 info_->readGlobalAuxInfo();
23 info_->assignAuxInfoToVolumes();
24 detector_name_ = info_->getDetectorHeader()->getName();
25}
26
27} // namespace geo
28} // namespace simcore
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89
Handle to the conditions system, provided at construction to classes which require it.
bool validate_
should we take the time to validate
Definition GDMLParser.h:82
GDMLParser(framework::config::Parameters &parameters, simcore::ConditionsInterface &ci)
Default constructor.
Definition GDMLParser.cxx:6
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 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