47 GSystem(
const std::shared_ptr<GOptions>& gopts,
48 const std::string& dbhost,
49 const std::string& sname,
50 const std::string& factory,
51 const std::string& experiment,
53 const std::string& variation,
54 const std::string& annotations =
"none"
80 return std::make_unique<GSystem>(*
this);
87 std::string factoryName;
88 std::string experiment;
90 std::string variation;
91 std::string annotations;
101 std::map<std::string, std::shared_ptr<GVolume>> gvolumesMap;
102 std::map<std::string, std::shared_ptr<GMaterial>> gmaterialsMap;
108 [[nodiscard]]
inline std::string
getName()
const {
return name; }
110 [[nodiscard]]
inline std::string
getVariation()
const {
return variation; }
111 [[nodiscard]]
inline std::string
getExperiment()
const {
return experiment; }
113 [[nodiscard]]
inline int getRunno()
const {
return runno; }
114 [[nodiscard]]
inline std::string
get_dbhost()
const {
return dbhost; }
134 inline void set_dbhost(
const std::string& dbh) { this->dbhost = dbh; }
158 void addGVolume(std::vector<std::string> pars);
175 void addVolumeFromFile(
const std::string& importType,
const std::string& filename);
193 [[nodiscard]]
inline const std::map<std::string, std::shared_ptr<GVolume>>&
getGVolumesMap()
const {
202 [[nodiscard]]
inline const std::map<std::string, std::shared_ptr<GMaterial>>&
getGMaterialMap()
const {
203 return gmaterialsMap;
Material definition belonging to a detector system.
Represents a single detector system (e.g., calorimeter, tracker).
const GMaterial * getMaterialForGVolume(const std::string &volumeName) const
Retrieve the material associated with a given volume.
const std::map< std::string, std::shared_ptr< GVolume > > & getGVolumesMap() const
Access all volumes in this system.
const std::map< std::string, std::shared_ptr< GMaterial > > & getGMaterialMap() const
Access all materials in this system.
std::string getExperiment() const
void addROOTVolume(const std::string &rootVolumeDefinition)
Adds the special ROOT/world volume to the system.
std::string getAnnotations() const
void set_dbhost(const std::string &dbh)
Sets the database host.
std::string getVariation() const
void addGMaterial(std::vector< std::string > pars)
Build and add a material from a serialized parameter list.
std::string getFactoryName() const
GVolume * getGVolume(const std::string &volumeName) const
Retrieve a volume by name.
std::unique_ptr< GSystem > clone() const
Clone helper.
GSystem(const std::shared_ptr< GOptions > &gopts, const std::string &dbhost, const std::string &sname, const std::string &factory, const std::string &experiment, int runno, const std::string &variation, const std::string &annotations="none")
Construct a detector system descriptor.
void addGVolume(std::vector< std::string > pars)
Build and add a volume from a serialized parameter list.
std::string getName() const
GSystem(GSystem &&) noexcept=default
std::string getFilePath()
Gets the full file path of the system.
void addVolumeFromFile(const std::string &importType, const std::string &filename)
Add a volume imported from a file (CAD, GDML, etc.).
std::string get_dbhost() const
Geometry volume record loaded into a GSystem.
std::shared_ptr< GSystem > SystemPtr
std::vector< SystemPtr > SystemList
std::map< std::string, SystemPtr > SystemMap