#include <G4tgbVolumeMgr.hh>
Definition at line 59 of file G4tgbVolumeMgr.hh.
◆ G4tgbVolumeMgr()
| G4tgbVolumeMgr::G4tgbVolumeMgr |
( |
| ) |
|
Definition at line 51 of file G4tgbVolumeMgr.cc.
52{
54
55
56 theDetectorBuilder = new G4tgbDetectorBuilder();
57}
static G4ReflectionFactory * Instance()
void SetScalePrecision(G4double scaleValue)
Referenced by GetInstance().
◆ ~G4tgbVolumeMgr()
| G4tgbVolumeMgr::~G4tgbVolumeMgr |
( |
| ) |
|
Definition at line 60 of file G4tgbVolumeMgr.cc.
61{
62 delete theDetectorBuilder;
63 delete theInstance;
64}
◆ AddTextFile()
| void G4tgbVolumeMgr::AddTextFile |
( |
const G4String & | fname | ) |
|
Definition at line 77 of file G4tgbVolumeMgr.cc.
78{
80}
void AddTextFile(const G4String &fname)
static G4tgrFileReader * GetInstance()
◆ BuildPhysVolTree()
| void G4tgbVolumeMgr::BuildPhysVolTree |
( |
| ) |
|
◆ CopyVolumes()
| void G4tgbVolumeMgr::CopyVolumes |
( |
| ) |
|
Definition at line 136 of file G4tgbVolumeMgr.cc.
137{
138
140 for(auto cite = vollist.cbegin(); cite != vollist.cend(); ++cite)
141 {
142 G4tgrVolume* tgrvol = const_cast<G4tgrVolume*>((*cite).second);
143 G4tgbVolume* svol = new G4tgbVolume(tgrvol);
145 }
146}
std::map< G4String, G4tgrVolume * > G4mapsvol
void RegisterMe(const G4tgbVolume *vol)
const G4mapsvol & GetVolumeMap()
static G4tgrVolumeMgr * GetInstance()
Referenced by G4tgbDetectorConstruction::Construct(), and G4tgbDetectorBuilder::ConstructDetector().
◆ DumpG4LogVolLeaf()
| void G4tgbVolumeMgr::DumpG4LogVolLeaf |
( |
const G4LogicalVolume * | lv, |
|
|
unsigned int | leafDepth ) |
Definition at line 390 of file G4tgbVolumeMgr.cc.
392{
393 for(std::size_t ii = 0; ii < leafDepth; ++ii)
394 {
396 }
398
399
400
401
402
403
404
405
406 ++leafDepth;
407
408
409
410
411}
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
Referenced by DumpG4LogVolTree().
◆ DumpG4LogVolTree()
| void G4tgbVolumeMgr::DumpG4LogVolTree |
( |
| ) |
|
Definition at line 380 of file G4tgbVolumeMgr.cc.
381{
382 G4cout <<
" @@@@@@@@@@@@@ DUMPING G4LogicalVolume's Tree " <<
G4endl;
383
385
387}
G4LogicalVolume * GetTopLogVol()
void DumpG4LogVolLeaf(const G4LogicalVolume *lv, unsigned int leafDepth)
Referenced by DumpSummary().
◆ DumpG4PhysVolLeaf()
| void G4tgbVolumeMgr::DumpG4PhysVolLeaf |
( |
const G4VPhysicalVolume * | pv, |
|
|
unsigned int | leafDepth ) |
Definition at line 424 of file G4tgbVolumeMgr.cc.
426{
427 for(std::size_t ii = 0; ii < leafDepth; ++ii)
428 {
430 }
432
433
434
435
436
437
438
439
440 ++leafDepth;
441
442
443
444
445}
const G4String & GetName() const
Referenced by DumpG4PhysVolTree().
◆ DumpG4PhysVolTree()
| void G4tgbVolumeMgr::DumpG4PhysVolTree |
( |
| ) |
|
Definition at line 414 of file G4tgbVolumeMgr.cc.
415{
416 G4cout <<
" @@@@@@@@@@@@@ DUMPING G4PhysicalVolume's Tree " <<
G4endl;
417
419
421}
void DumpG4PhysVolLeaf(const G4VPhysicalVolume *pv, unsigned int leafDepth)
G4VPhysicalVolume * GetTopPhysVol()
Referenced by DumpSummary().
◆ DumpG4SolidList()
| void G4tgbVolumeMgr::DumpG4SolidList |
( |
| ) |
|
Definition at line 370 of file G4tgbVolumeMgr.cc.
371{
372 for(auto cite = theSolids.cbegin(); cite != theSolids.cend(); ++cite)
373 {
374 G4cout <<
"G4SOLID: " << (*cite).second->GetName() <<
" of type "
375 << (*cite).second->GetEntityType() <<
G4endl;
376 }
377}
Referenced by DumpSummary().
◆ DumpSummary()
| void G4tgbVolumeMgr::DumpSummary |
( |
| ) |
|
Definition at line 341 of file G4tgbVolumeMgr.cc.
342{
343
344 G4cout <<
" @@@@@@@@@@@@@ Dumping Geant4 geometry objects Summary " <<
G4endl;
345 G4cout <<
" @@@ Geometry built inside world volume: "
347 G4cout <<
" Number of G4VSolid's: " << theSolids.size() <<
G4endl;
348 G4cout <<
" Number of G4LogicalVolume's: " << theLVs.size() <<
G4endl;
349 G4cout <<
" Number of G4VPhysicalVolume's: " << thePVs.size() <<
G4endl;
350
358
360 G4cout <<
" Number of G4RotationMatrix's: "
362
363
367}
const G4msg4elem GetG4ElementList() const
const G4msg4mate GetG4MaterialList() const
const G4msg4isot GetG4IsotopeList() const
static G4tgbMaterialMgr * GetInstance()
const G4msg4rotm & GetG4RotMatList() const
static G4tgbRotationMatrixMgr * GetInstance()
◆ FindG4LogVol()
Definition at line 226 of file G4tgbVolumeMgr.cc.
228{
229 G4mmslv::const_iterator mscite = theLVs.find(name);
230 if(mscite == theLVs.cend())
231 {
232 if(exists)
233 {
234 G4String ErrMessage =
"Logical volume name " +
name +
" not found !";
235 G4Exception(
"G4tgbVolumeMgr::FindG4LogVol()",
"InvalidSetup",
237 }
238 return nullptr;
239 }
240 else
241 {
242 return (*mscite).second;
243 }
244}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const char * name(G4int ptype)
Referenced by G4tgbVolume::ConstructG4PhysVol(), and G4tgbVolume::ConstructG4Volumes().
◆ FindG4PhysVol()
Definition at line 247 of file G4tgbVolumeMgr.cc.
249{
250 G4mmspv::const_iterator mscite = thePVs.find(name);
251 if(mscite == thePVs.cend())
252 {
253 if(exists)
254 {
255 G4String ErrMessage =
"Physical volume name " +
name +
" not found !";
256 G4Exception(
"G4tgbVolumeMgr::FindG4PhysVol()",
"InvalidSetup",
258 }
259 return nullptr;
260 }
261 else
262 {
263 return (*mscite).second;
264 }
265}
◆ FindG4Solid()
Definition at line 166 of file G4tgbVolumeMgr.cc.
167{
168#ifdef G4VERBOSE
170 {
172 }
173#endif
174
175 G4VSolid* oldSolid = nullptr;
176 std::pair<G4mmssol::iterator, G4mmssol::iterator> mmssdi;
177 mmssdi = theSolids.equal_range(name);
178
179 if(mmssdi.first != mmssdi.second)
180 {
181 G4mmssol::const_iterator mmsscite = mmssdi.first;
182
183#ifdef G4VERBOSE
185 {
186 G4cout <<
" G4tgbVolumeMgr::FindG4Solid() - Solid finding " <<
name
188 }
189#endif
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204 oldSolid = (*mmsscite).second;
205#ifdef G4VERBOSE
207 {
208 G4cout <<
" G4tgbVolumeMgr::FindG4Solid() - Solid already found " <<
name
210 }
211#endif
212 }
213
214#ifdef G4VERBOSE
216 {
217 G4cout <<
" G4tgbVolumeMgr::FindG4Solid() - Old solid: " << oldSolid
219 }
220#endif
221
222 return oldSolid;
223}
static G4int GetVerboseLevel()
Referenced by G4tgbVolume::FindOrConstructG4Solid().
◆ FindVolume()
◆ GetDetectorBuilder()
◆ GetInstance()
◆ GetSolids()
| const std::multimap< G4String, G4VSolid * > & G4tgbVolumeMgr::GetSolids |
( |
| ) |
const |
|
inline |
◆ GetTopLogVol()
Definition at line 285 of file G4tgbVolumeMgr.cc.
286{
287
288
289#ifdef G4VERBOSE
291 {
292 G4cout <<
" G4tgbVolumeMgr::GetTopLogVol theLVInvTresize "
293 << theLVInvTree.size() <<
G4endl;
294 }
295#endif
296 if(theLVInvTree.size() == 0)
297 {
298 G4Exception(
"G4tgbVolumeMgr::GetTopLogVol()",
"InvalidSetup",
300 }
301 G4LogicalVolume* lv = (*(theLVInvTree.begin())).second;
302
303
304 if(lv == nullptr)
305 {
306 lv = (*(theLVInvTree.begin())).first;
307 }
308 else
309 {
310 while((*(theLVInvTree.find(lv))).second != nullptr)
311 {
312
313 lv = (*(theLVInvTree.find(lv))).second;
314#ifdef G4VERBOSE
316 {
317 G4cout <<
" G4tgbVolumeMgr::GetTopPhysVol: lv " << lv->
GetName()
319 }
320#endif
321 }
322 }
323
324 return lv;
325}
Referenced by DumpG4LogVolTree(), and GetTopPhysVol().
◆ GetTopPhysVol()
◆ ReadAndConstructDetector()
Definition at line 83 of file G4tgbVolumeMgr.cc.
84{
85 const G4tgrVolume* tgrVoltop = theDetectorBuilder->ReadDetector();
86 return theDetectorBuilder->ConstructDetector(tgrVoltop);
87}
◆ RegisterChildParentLVs()
Definition at line 126 of file G4tgbVolumeMgr.cc.
128{
129 theLVInvTree[const_cast<G4LogicalVolume*>(logvol)] =
130 const_cast<G4LogicalVolume*>(parentLV);
131 theLVTree[const_cast<G4LogicalVolume*>(parentLV)] =
132 const_cast<G4LogicalVolume*>(logvol);
133}
Referenced by G4tgbVolume::ConstructG4Volumes().
◆ RegisterMe() [1/4]
Definition at line 104 of file G4tgbVolumeMgr.cc.
105{
106 theLVs.insert(
107 G4mmslv::value_type(lv->
GetName(),
const_cast<G4LogicalVolume*
>(lv)));
108
109#ifdef G4VERBOSE
111 {
112 G4cout <<
" G4tgbVolumeMgr::RegisterMe() - Logical volume registered: "
114 }
115#endif
116}
◆ RegisterMe() [2/4]
| void G4tgbVolumeMgr::RegisterMe |
( |
const G4tgbVolume * | vol | ) |
|
◆ RegisterMe() [3/4]
Definition at line 119 of file G4tgbVolumeMgr.cc.
120{
121 thePVs.insert(
122 G4mmspv::value_type(pv->
GetName(),
const_cast<G4VPhysicalVolume*
>(pv)));
123}
◆ RegisterMe() [4/4]
| void G4tgbVolumeMgr::RegisterMe |
( |
const G4VSolid * | solid | ) |
|
Definition at line 97 of file G4tgbVolumeMgr.cc.
98{
99 theSolids.insert(
100 G4mmssol::value_type(solid->
GetName(),
const_cast<G4VSolid*
>(solid)));
101}
◆ SetDetectorBuilder()
The documentation for this class was generated from the following files: