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

#include <B03PVolumeStore.hh>

Public Member Functions

 B03PVolumeStore ()
 
 ~B03PVolumeStore ()
 
void AddPVolume (const G4GeometryCell &cell)
 
const G4VPhysicalVolumeGetPVolume (const G4String &name) const
 
G4String GetPNames () const
 

Detailed Description

Definition at line 53 of file B03PVolumeStore.hh.

Constructor & Destructor Documentation

B03PVolumeStore::B03PVolumeStore ( )

Definition at line 47 of file B03PVolumeStore.cc.

47 {}
B03PVolumeStore::~B03PVolumeStore ( )

Definition at line 51 of file B03PVolumeStore.cc.

51 {}

Member Function Documentation

void B03PVolumeStore::AddPVolume ( const G4GeometryCell cell)

Definition at line 55 of file B03PVolumeStore.cc.

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

Definition at line 91 of file B03PVolumeStore.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 73 of file B03PVolumeStore.cc.

73  {
74  const G4VPhysicalVolume *pvol = 0;
75  for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
76  it != fSetGeometryCell.end(); ++it) {
77  const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
78  if (vol.GetName() == name) {
79  pvol = &vol;
80  }
81  }
82  if (!pvol) {
83  G4cout << "B03PVolumeStore::GetPVolume: no physical volume named: "
84  << name << ", found" << G4endl;
85  }
86  return pvol;
87 }
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:


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