72 G4String ErrMessage =
"Solid already exists... " + wl[1];
77 std::vector<G4String> wlc = wl;
84 for(std::size_t ii = 0; ii < wl2.length(); ++ii)
86 wl2[ii] = toupper(wl2[ii]);
88 if((wl2 ==
"UNION") || (wl2 ==
"SUBTRACTION") || (wl2 ==
"INTERSECTION"))
94 else if(wl2 ==
"SCALED")
99 else if(wl2 ==
"MULTIUNION")
119 "Cannot be two solids with the same name... " + sol->
GetName();
132 "Cannot unregister a solid that is not registered... " + sol->
GetName();
149 "Cannot be two volumes with the same name... " + vol->
GetName();
159 std::vector<G4tgrVolume*>::const_iterator ite;
171 "Cannot unregister a volume not registered... " + vol->
GetName();
172 G4Exception(
"G4tgrVolumeMgr::unRegisterMe()",
"InvalidSetup",
204 G4String ErrMessage =
"Solid not found... " + volname;
211 vol =
const_cast<G4tgrSolid*
>((*svite).second);
232 G4String ErrMessage =
"Volume not found... " + volname;
233 G4Exception(
"G4tgrVolumeMgr::FindVolume()",
"InvalidSetup",
238 G4String WarMessage =
"Volume does not exists... " + volname;
255 std::vector<G4tgrVolume*> vols;
257 G4mapsvol::const_iterator svite;
263 vols.push_back(
const_cast<G4tgrVolume*
>((*svite).second));
276 G4String ErrMessage =
"Volume not found... " + volname;
277 G4Exception(
"G4tgrVolumeMgr::FindVolumes()",
"InvalidSetup",
282 G4String WarMessage =
"Volume does not exists... " + volname;
305 G4cout <<
" G4tgrVolumeMgr::GetTopVolume() - Vol: " << vol->
GetName()
316 G4cout <<
" G4tgrVolumeMgr::GetTopVolume() - Vol: " << vol->
GetName()
321 if((topVol !=
nullptr) && (topVol != vol) &&
322 (topVol->
GetType() !=
"VOLDivision") &&
323 (vol->
GetType() !=
"VOLDivision"))
326 "Two world volumes found, second will be taken",
JustWarning,
327 (
G4String(
"Both volumes are at the top of a hierarchy: ") +
338std::pair<G4mmapspl::iterator, G4mmapspl::iterator>
341 std::pair<G4mmapspl::iterator, G4mmapspl::iterator> dite;
349 G4cout <<
" @@@@@@@@@@@@@@@@ DUMPING G4tgrVolume's Tree " <<
G4endl;
358 unsigned int leafDepth)
360 for(std::size_t ii = 0; ii < leafDepth; ++ii)
364 G4cout <<
" VOL:(" << leafDepth <<
")" << vol->
GetName() <<
" copy No "
368 std::pair<G4mmapspl::iterator, G4mmapspl::iterator> children =
370 G4mmapspl::const_iterator cite;
373 for(cite = children.first; cite != children.second; ++cite)
388 G4cout <<
" @@@@@@@@@@@@@@@@@@ Dumping Detector Summary " <<
G4endl;
389 G4cout <<
" @@@ Geometry built inside world volume: "
392 unsigned int nPlace = 0;
396 nPlace += ((*cite).second)->GetPlacements().size();
398 G4cout <<
" Number of G4tgrPlace's: " << nPlace <<
G4endl;
409 G4cout <<
" Number of G4tgrRotationMatrix's: "
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
const G4mstgrelem & GetElementList() const
const G4mstgrmate & GetMaterialList() const
static G4tgrMaterialFactory * GetInstance()
void DumpElementList() const
void DumpMaterialList() const
const G4mstgrisot & GetIsotopeList() const
void DumpIsotopeList() const
static G4int GetVerboseLevel()
unsigned int GetCopyNo() const
G4tgrVolume * GetVolume() const
std::vector< G4tgrRotationMatrix * > GetRotMatList() const
static G4tgrRotationMatrixFactory * GetInstance()
const G4String & GetName() const
static G4bool AreWordsEquivalent(const G4String &word1, const G4String &word2)
std::vector< G4tgrVolume * > FindVolumes(const G4String &volname, G4bool exists)
static G4ThreadLocal G4tgrVolumeMgr * theInstance
G4tgrVolume * FindVolume(const G4String &volname, G4bool exists=false)
G4tgrSolid * FindSolid(const G4String &name, G4bool exists=false)
void RegisterParentChild(const G4String &parentName, const G4tgrPlace *pl)
G4mapssol theG4tgrSolidMap
G4mmapspl theG4tgrVolumeTree
void DumpVolumeLeaf(const G4tgrVolume *vol, unsigned int copyNo, unsigned int leafDepth)
void RegisterMe(G4tgrSolid *vol)
const G4tgrVolume * GetTopVolume()
void UnRegisterMe(G4tgrSolid *vol)
G4tgrSolid * CreateSolid(const std::vector< G4String > &wl, G4bool bVOLUtag)
static G4tgrVolumeMgr * GetInstance()
std::pair< G4mmapspl::iterator, G4mmapspl::iterator > GetChildren(const G4String &name)
G4mapsvol theG4tgrVolumeMap
std::vector< G4tgrVolume * > theG4tgrVolumeList
const G4String & GetName() const
const G4String & GetType() const
const std::vector< G4tgrPlace * > GetPlacements() const
const char * name(G4int ptype)