14 while(layergeoms.begin() != layergeoms.end())
16 delete layergeoms.begin()->second;
17 layergeoms.erase(layergeoms.begin());
25 map<int,PHG4CylinderCellGeom *>::const_iterator iter;
26 for (iter=layergeoms.begin(); iter != layergeoms.end(); ++iter)
28 cout <<
"layer " << iter->first << endl;
29 (iter->second)->identify(os);
37 if (layergeoms.find(i) != layergeoms.end())
39 cout <<
"layer " << i <<
" already added to PHCylinderCellGeomContainer" << endl;
43 layergeoms[i] = mygeom;
51 if (layergeoms.find(layer) != layergeoms.end())
53 cout <<
"layer " << layer <<
" already added to PHCylinderCellGeomContainer" << endl;
56 layergeoms[layer] = mygeom;
63 map<int,PHG4CylinderCellGeom *>::const_iterator iter = layergeoms.find(i);
64 if (iter != layergeoms.end())
68 cout <<
"Could not locate layer " << i <<
" in PHG4CylinderCellGeomContainer" << endl;
75 if (layergeoms.empty())
79 return layergeoms.begin()->second;
PHG4CylinderCellGeomContainer()
PHG4CylinderCellGeom * GetLayerCellGeom(const int i)
PHG4CylinderCellGeom * GetFirstLayerCellGeom()
int AddLayerCellGeom(const int i, PHG4CylinderCellGeom *mygeom)
void identify(std::ostream &os=std::cout) const
virtual ~PHG4CylinderCellGeomContainer()
void set_layer(const int i)