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

#include <B02PVolumeStore.hh>

Public Member Functions

 B02PVolumeStore ()
 
 ~B02PVolumeStore ()
 
void AddPVolume (const G4GeometryCell &cell)
 
const G4VPhysicalVolumeGetPVolume (const G4String &name) const
 
G4int Size ()
 
G4String GetPNames () const
 

Detailed Description

Definition at line 53 of file B02PVolumeStore.hh.

Constructor & Destructor Documentation

B02PVolumeStore::B02PVolumeStore ( )

Definition at line 47 of file B02PVolumeStore.cc.

47 {}
B02PVolumeStore::~B02PVolumeStore ( )

Definition at line 51 of file B02PVolumeStore.cc.

51 {}

Member Function Documentation

void B02PVolumeStore::AddPVolume ( const G4GeometryCell cell)

Definition at line 55 of file B02PVolumeStore.cc.

55  {
56 
57  B02SetGeometryCell::iterator it =
58  fSetGeometryCell.find(cell);
59  if (it != fSetGeometryCell.end()) {
60  G4cout << "B02PVolumeStore::AddPVolume: cell already stored"
61  << G4endl;
62  return;
63  }
64 
65  fSetGeometryCell.insert(cell);
66 
67 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

G4String B02PVolumeStore::GetPNames ( ) const

Definition at line 90 of file B02PVolumeStore.cc.

90  {
91  G4String NameString;
92  for (B02SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
93  it != fSetGeometryCell.end(); ++it) {
94  const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
95  std::ostringstream os;
96  os << vol.GetName() << "_" << it->GetReplicaNumber()
97  << "\n";
98  G4String cellname = os.str();
99 
100  // G4String cellname(vol.GetName());
101  // cellname += G4String("_");
102  // cellname += std::str(it->GetReplicaNumber());
103 
104  NameString += cellname;
105  }
106  return NameString;
107 }
const G4String & GetName() const

Here is the call graph for this function:

Here is the caller graph for this function:

const G4VPhysicalVolume * B02PVolumeStore::GetPVolume ( const G4String name) const

Definition at line 72 of file B02PVolumeStore.cc.

72  {
73  const G4VPhysicalVolume *pvol = 0;
74  for (B02SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
75  it != fSetGeometryCell.end(); ++it) {
76  const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
77  if (vol.GetName() == name) {
78  pvol = &vol;
79  }
80  }
81  if (!pvol) {
82  G4cout << "B02PVolumeStore::GetPVolume: no physical volume named: "
83  << name << ", found" << G4endl;
84  }
85  return pvol;
86 }
const XML_Char * name
Definition: expat.h:151
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4int B02PVolumeStore::Size ( )

Definition at line 111 of file B02PVolumeStore.cc.

111  {
112  return fSetGeometryCell.size();
113 }

Here is the caller graph for this function:


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