61 auto volmap = store->
GetMap();
62 auto pos = volmap.find(logVolName);
63 if (pos != volmap.cend()) {
64 if ((pos->second.size() > 1) && !multi) {
65 G4String eM =
"More than one logical volumes of name <";
67 eM +=
"> are found and thus the sensitive detector <";
69 eM +=
"> cannot be uniquely assigned.";
74 for (
auto& i : pos->second) {
79 G4String eM2 =
"No logical volume of name <";
81 eM2 +=
"> is found. The specified sensitive detector <";
83 eM2 +=
"> couldn't be assigned to any volume.";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const std::map< G4String, std::vector< G4LogicalVolume * > > & GetMap() const
static G4LogicalVolumeStore * GetInstance()
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
static G4SDManager * GetSDMpointer()
void AddNewDetector(G4VSensitiveDetector *aSD)
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
void SetName(const G4String &pName)
G4VPhysicalVolume * GetWorld()
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
G4VUserParallelWorld(const G4String &worldName)