23#include "G4LogicalVolume.hh"
65 fG4Volumes[iVolume] = g4Volume;
66 fVgmVolumes[g4Volume] = iVolume;
71 G4LogicalVolume* g4Volume,
const std::vector<G4LogicalVolume*>& volumes)
73 fG4ParamVolumes[g4Volume] = volumes;
81 std::cout <<
"Geant4 Volumes Map: " << std::endl;
84 for (
auto i = fG4Volumes.begin(); i != fG4Volumes.end(); i++) {
86 G4LogicalVolume* lv = (*i).second;
88 std::cout <<
" " << counter++ <<
"th entry:"
89 <<
" vgmVolume " << iVolume <<
" " << iVolume->
Name() <<
" LV "
90 << lv <<
" " << lv->GetName() << std::endl;
99 auto i = fG4Volumes.find(iVolume);
100 if (i != fG4Volumes.end())
111 auto i = fVgmVolumes.find(lv);
112 if (i != fVgmVolumes.end())
119const std::vector<G4LogicalVolume*>&
123 auto i = fG4ParamVolumes.find(lv);
124 if (i != fG4ParamVolumes.end())
The map between VGM and Geant4 volumes.
void AddParamVolume(G4LogicalVolume *, const std::vector< G4LogicalVolume * > &)
void AddVolume(VGM::IVolume *, G4LogicalVolume *)
static VolumeMap * Instance()
const std::vector< G4LogicalVolume * > & GetParamVolumes(G4LogicalVolume *lv) const
G4LogicalVolume * GetVolume(VGM::IVolume *iVolume) const
The VGM interface to volumes.
virtual std::string Name() const =0
Return the name of this volume.