Geant4  10.02.p03
B03PVolumeStore Class Reference

#include <B03PVolumeStore.hh>

Collaboration diagram for B03PVolumeStore:

Public Member Functions

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

Private Attributes

B03SetGeometryCell fSetGeometryCell
 

Detailed Description

Definition at line 53 of file B03PVolumeStore.hh.

Constructor & Destructor Documentation

◆ B03PVolumeStore()

B03PVolumeStore::B03PVolumeStore ( )

Definition at line 48 of file B03PVolumeStore.cc.

48 {}

◆ ~B03PVolumeStore()

B03PVolumeStore::~B03PVolumeStore ( )

Definition at line 52 of file B03PVolumeStore.cc.

52 {}

Member Function Documentation

◆ AddPVolume()

void B03PVolumeStore::AddPVolume ( const G4GeometryCell cell)

Definition at line 56 of file B03PVolumeStore.cc.

56  {
57 
58  B03SetGeometryCell::iterator it =
59  fSetGeometryCell.find(cell);
60  if (it != fSetGeometryCell.end()) {
61  G4cout << "B03PVolumeStore::AddPVolume: cell already stored"
62  << G4endl;
63  return;
64  }
65 
66  fSetGeometryCell.insert(cell);
67 
68 
69 }
B03SetGeometryCell fSetGeometryCell
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPNames()

G4String B03PVolumeStore::GetPNames ( ) const

Definition at line 92 of file B03PVolumeStore.cc.

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

◆ GetPVolume()

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

Definition at line 74 of file B03PVolumeStore.cc.

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

Member Data Documentation

◆ fSetGeometryCell

B03SetGeometryCell B03PVolumeStore::fSetGeometryCell
private

Definition at line 63 of file B03PVolumeStore.hh.


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