3 #include "Geant4/G4LogicalVolume.hh" 4 #include "Geant4/G4VisAttributes.hh" 9 #include "cetlib_except/exception.h" 16 const std::vector<double>& rgba,
17 std::function<
void(G4VisAttributes*)> func)
26 att =
new G4VisAttributes(G4Colour(rgba[0], rgba[1], rgba[2], rgba[3]));
35 att =
new G4VisAttributes(0);
39 lv->SetVisAttributes(att);
46 setVisAtts(lv, display, rgba, [](G4VisAttributes*) {});
54 std::ostringstream newName;
55 newName << name <<
'[' << std::setfill(
'0') << std::setw(2) << number <<
']';
65 char* pathC = std::getenv(envVar.c_str());
67 path = std::string(pathC);
69 pathC = std::getenv(
"MRB_BUILDDIR");
71 path = std::string(pathC) +
"/" + pkgName;
74 <<
"Need enviornment variable " << envVar <<
" or $MRB_BUILDDIR set to find path\n";
std::string addNumberToName(const std::string &name, int number)
std::string basePath(const std::string &envVar, const std::string &pkgName)
void setVisAtts(G4LogicalVolume *lv, bool display, const std::vector< double > &rgba)
cet::coded_exception< error, detail::translate > exception