49 GSystem(
const std::shared_ptr<GOptions>& gopts,
50 const std::string& dbhost,
51 const std::string& sname,
52 const std::string& factory,
53 const std::string& experiment,
55 const std::string& variation,
56 std::optional<std::string> annotations = std::nullopt
82 return std::make_unique<GSystem>(*
this);
95 [[nodiscard]] std::shared_ptr<GSystem>
descriptorClone(
const std::shared_ptr<GOptions>& gopts)
const;
101 std::string factoryName;
102 std::string experiment;
104 std::string variation;
105 std::optional<std::string> annotations;
115 std::map<std::string, std::shared_ptr<GVolume>> gvolumesMap;
116 std::map<std::string, std::shared_ptr<GMaterial>> gmaterialsMap;
117 std::map<std::string, std::shared_ptr<GMirror>> gmirrorsMap;
123 [[nodiscard]]
inline std::string
getName()
const {
return name; }
125 [[nodiscard]]
inline std::string
getVariation()
const {
return variation; }
126 [[nodiscard]]
inline std::string
getExperiment()
const {
return experiment; }
127 [[nodiscard]]
inline const std::optional<std::string>&
getAnnotations()
const {
return annotations; }
128 [[nodiscard]]
inline int getRunno()
const {
return runno; }
129 [[nodiscard]]
inline std::string
get_dbhost()
const {
return dbhost; }
149 inline void set_dbhost(
const std::string& dbh) { this->dbhost = dbh; }
173 void addGVolume(std::vector<std::string> pars);
190 void addVolumeFromFile(
const std::string& importType,
const std::string& filename);
208 [[nodiscard]]
inline const std::map<std::string, std::shared_ptr<GVolume>>&
getGVolumesMap()
const {
217 [[nodiscard]]
inline const std::map<std::string, std::shared_ptr<GMaterial>>&
getGMaterialMap()
const {
218 return gmaterialsMap;
241 void addGMirror(std::vector<std::string> pars);
256 [[nodiscard]]
inline const std::map<std::string, std::shared_ptr<GMirror>>&
getGMirrorsMap()
const {
GBase(const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
Material definition belonging to a detector system.
Optical boundary (surface) definition belonging to a detector system.
std::string getFilePath() const
Gets the full file path of the system.
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.
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.
std::shared_ptr< GSystem > descriptorClone(const std::shared_ptr< GOptions > &gopts) const
Clone only the system selection metadata.
const GMirror * getGMirror(const std::string &mirrorName) const
Retrieve a mirror by name.
void addGVolume(std::vector< std::string > pars)
Build and add a volume from a serialized parameter list.
const std::map< std::string, std::shared_ptr< GMirror > > & getGMirrorsMap() const
Access all mirrors in this system.
const std::optional< std::string > & getAnnotations() const
std::string getName() const
void addGMirror(std::vector< std::string > pars)
Build and add a mirror (optical surface) from a serialized parameter list.
GSystem(GSystem &&) noexcept=default
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
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, std::optional< std::string > annotations=std::nullopt)
Construct a detector system descriptor.
Geometry volume record loaded into a GSystem.
std::shared_ptr< GSystem > SystemPtr
std::vector< SystemPtr > SystemList
std::map< std::string, SystemPtr > SystemMap