21 std::unordered_map<std::string,
39 auto volume_copy =
gsystem +
"/" + copyOf;
41 log->
info(2,
"<", s->
getName(),
"> is a copy of <", volume_copy,
">, which already exists");
45 ">, which already exists, which does not exist yet");
52 std::vector<std::string> solidOperations =
55 if (solidOperations.size() == 3) {
57 if (solidOperations[1] ==
"+" || solidOperations[1] ==
"-" || solidOperations[1] ==
"*") {
73 [[maybe_unused]] std::unordered_map<std::string,
82 std::unordered_map<std::string,
88 if (g4s->find(vname) == g4s->end()) {
89 log->
info(2,
"dependencies: ", vname,
" not found in gvolume map yet.");
99 auto volume_copy =
gsystem +
"/" + copyOf;
101 log->
info(2,
"dependencies: copy ", volume_copy,
" logical volume not found yet.");
106 log->
info(2,
"dependencies: ", vname,
" logical volume not found yet.");
113 log->
info(2,
"dependencies: ", vname,
114 " mother <", motherName,
"> logical volume not found yet.");
120 log->
info(2,
"dependencies: <", vname,
"> and mother <", motherName,
121 "> logical volumes are found. Ready to build or get physical volume.");
124 log->
info(2,
"dependencies: <", vname,
125 "> logical volume is found. Ready to build or get physical volume.");
bool checkSolidDependencies(const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s)
Check whether all prerequisites to build a solid are satisfied.
virtual std::string_view className() const =0
Short, human-readable factory name for logging.
static bool checkLogicalDependencies(const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s)
Logical dependency check placeholder.
bool checkPhysicalDependencies(const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s)
Verify prerequisites to build a physical placement.
static G4VSolid * getSolidFromMap(const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s)
Lookup solid in the g4s map.
static G4LogicalVolume * getLogicalFromMap(const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s)
Lookup logical volume in the g4s map.
Convenience container holding a Geant4 solid, logical, and physical volume.
std::shared_ptr< GLogger > log
void debug(debug_type type, Args &&... args) const
void info(int level, Args &&... args) const
std::string getCopyOf() const
std::string getName() const
std::string getG4Name() const
std::string getSystem() const
std::string getG4MotherName() const
std::string getSolidsOpr() const
Abstract factory that converts a GEMC DB GVolume into Geant4 objects.
#define UNINITIALIZEDSTRINGQUANTITY
vector< std::string > getStringVectorFromString(const std::string &input)