21void GSystemCADFactory::loadGeometry(
GSystem* s) {
24 if (filesystem::exists(dirLocation)) {
28 for (
const auto& cf : cadFiles) {
33 string cad_yaml = dirLocation +
"/cad__" + s->
getVariation() +
".yaml";
35 if (filesystem::exists(cad_yaml)) {
36 log->
info(0,
"Loading modifiers from YAML file: " + cad_yaml);
40 YAML::Node ynode = YAML::LoadFile(cad_yaml);
42 for (
auto& [volumeName, gvolume] : s->getGVolumesMap()) {
44 auto vmod = ynode[volumeName];
45 log->
info(0,
"Looking for cad modifiers for Volume: ", volumeName,
", found: ", vmod);
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
std::vector< std::string > possibleLocationOfFiles
List of candidate directories used by file-based factories.
Represents a single detector system (e.g., calorimeter, tracker).
std::string getVariation() const
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.).
Conventions and shared constants for the detector-system module.
#define GSYSTEMCADTFACTORYLABEL
vector< string > getListOfFilesInDirectory(const string &dirName, const vector< string > &extensions)
string searchForDirInLocations(const string &dirName, const vector< string > &possibleLocations)