15 while(_layergeoms.begin() != _layergeoms.end())
17 delete _layergeoms.begin()->second;
18 _layergeoms.erase(_layergeoms.begin());
26 os <<
"mag field: " << _magfield << endl;
27 os <<
"number of layers: " << _layergeoms.size() << endl;
28 map<int,PHG4BlockGeom *>::const_iterator iter;
29 for (iter=_layergeoms.begin(); iter != _layergeoms.end(); ++iter)
31 (iter->second)->identify(os);
39 if (_layergeoms.find(i) != _layergeoms.end())
41 cout <<
"layer " << i <<
" already added to PHBlockGeomContainer" << endl;
45 _layergeoms[i] = mygeom;
53 if (_layergeoms.find(layer) != _layergeoms.end())
55 cout <<
"layer " << layer <<
" already added to PHBlockGeomContainer" << endl;
58 _layergeoms[layer] = mygeom;
65 map<int,PHG4BlockGeom *>::const_iterator iter = _layergeoms.find(i);
66 if (iter != _layergeoms.end())
70 cout <<
"Could not locate layer " << i <<
" in PHG4BlockGeomContainer" << endl;
void identify(std::ostream &os=std::cout) const
int AddLayerGeom(const int i, PHG4BlockGeom *mygeom)
PHG4BlockGeom * GetLayerGeom(const int i)
virtual ~PHG4BlockGeomContainer()
virtual void set_layer(const int i)
virtual int get_layer() const