Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G3VolTable Class Reference

#include <G3VolTable.hh>

Public Member Functions

G3VolTableEntryPutVTE (G3VolTableEntry *aVTE)
 
G3VolTableEntryGetVTE (const G4String &Vname)
 
void PrintAll ()
 
 G3VolTable ()
 
virtual ~G3VolTable ()
 
G4LogicalVolumeGetG3toG4Mother ()
 
G3VolTableEntryGetFirstVTE ()
 
void SetFirstVTE ()
 
void VTEStat ()
 
void CountG3Pos ()
 
void Clear ()
 

Detailed Description

Definition at line 60 of file G3VolTable.hh.

Constructor & Destructor Documentation

G3VolTable::G3VolTable ( )

Definition at line 39 of file G3VolTable.cc.

40  : G3toG4TopVTE(0), _FirstKey("UnDefined"), _NG3Pos(0){
41 }
G3VolTable::~G3VolTable ( )
virtual

Definition at line 43 of file G3VolTable.cc.

43  {
44  if (VTD.size()>0){
45  // G4cout << "Deleting VTD" << G4endl;
46  for (VTDiterator i=VTD.begin(); i != VTD.end(); i++) {
47  delete (*i).second;
48  }
49  VTD.clear();
50  }
51 }
std::map< G4String, G3VolTableEntry *, std::less< G4String > >::iterator VTDiterator
Definition: G3VolTable.cc:37

Member Function Documentation

void G3VolTable::Clear ( )

Definition at line 119 of file G3VolTable.cc.

119  {
120  if (VTD.size()>0){
121  for (VTDiterator i=VTD.begin(); i != VTD.end(); i++) {
122  delete (*i).second;
123  }
124  VTD.clear();
125  }
126  G3toG4TopVTE = 0;
127  _FirstKey = "UnDefined";
128  _NG3Pos = 0;
129 }
std::map< G4String, G3VolTableEntry *, std::less< G4String > >::iterator VTDiterator
Definition: G3VolTable.cc:37
void G3VolTable::CountG3Pos ( )

Definition at line 92 of file G3VolTable.cc.

92  {
93  _NG3Pos++;
94 }

Here is the caller graph for this function:

G3VolTableEntry * G3VolTable::GetFirstVTE ( )

Definition at line 107 of file G3VolTable.cc.

107  {
108  return G3toG4TopVTE;
109 }

Here is the caller graph for this function:

G4LogicalVolume* G3VolTable::GetG3toG4Mother ( )
G3VolTableEntry * G3VolTable::GetVTE ( const G4String Vname)

Definition at line 54 of file G3VolTable.cc.

54  {
55  VTDiterator i = VTD.find(Vname);
56  if (i == VTD.end()) return 0;
57  else return (*i).second;
58 }
std::map< G4String, G3VolTableEntry *, std::less< G4String > >::iterator VTDiterator
Definition: G3VolTable.cc:37

Here is the caller graph for this function:

void G3VolTable::PrintAll ( void  )

Definition at line 61 of file G3VolTable.cc.

61  {
62  if (VTD.size()){
63  G4int i=0;
64  G4cout << "Dump of VTD - " << VTD.size() << " entries:" << G4endl;
65  VTEStat();
66  for (VTDiterator v=VTD.begin(); v != VTD.end(); v++){
67  G3VolTableEntry* VTE = (*v).second;
68  G4cout << "G3VolTable element " << std::setw(3) << i++ << " name "
69  << VTE->GetName() << " has " << VTE->GetNoDaughters()
70  << " daughters" << G4endl;
71  }
72  }
73 }
int G4int
Definition: G4Types.hh:78
G4int GetNoDaughters()
G4GLOB_DLL std::ostream G4cout
tuple v
Definition: test.py:18
std::map< G4String, G3VolTableEntry *, std::less< G4String > >::iterator VTDiterator
Definition: G3VolTable.cc:37
G4String GetName()
#define G4endl
Definition: G4ios.hh:61
void VTEStat()
Definition: G3VolTable.cc:112

Here is the call graph for this function:

Here is the caller graph for this function:

G3VolTableEntry * G3VolTable::PutVTE ( G3VolTableEntry aVTE)

Definition at line 76 of file G3VolTable.cc.

76  {
77 
78  if (GetVTE(aG3VolTableEntry->GetName()) == 0 ){
79 
80  // create a hash key
81  G4String HashID = aG3VolTableEntry->GetName();
82 
83  if (_FirstKey == "UnDefined") _FirstKey = HashID;
84 
85  // insert into dictionary
86  VTD[HashID] = aG3VolTableEntry;
87  }
88  return GetVTE(aG3VolTableEntry->GetName());
89 }
G3VolTableEntry * GetVTE(const G4String &Vname)
Definition: G3VolTable.cc:54

Here is the call graph for this function:

Here is the caller graph for this function:

void G3VolTable::SetFirstVTE ( )

Definition at line 97 of file G3VolTable.cc.

97  {
98  G3toG4TopVTE = VTD[_FirstKey];
99 
100  if (G3toG4TopVTE->NPCopies() > 0) {
101  _FirstKey = G3toG4TopVTE->GetMother()->GetName();
102  SetFirstVTE();
103  }
104 }
G4int NPCopies()
G3VolTableEntry * GetMother(G4int i)
G4String GetName()
void SetFirstVTE()
Definition: G3VolTable.cc:97

Here is the call graph for this function:

Here is the caller graph for this function:

void G3VolTable::VTEStat ( )

Definition at line 112 of file G3VolTable.cc.

112  {
113  G4cout << "Instantiated " << VTD.size() <<
114  " volume table entries \n"
115  << " " << _NG3Pos << " positions." << G4endl;
116 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:


The documentation for this class was generated from the following files: