14 while(cellmap.begin() != cellmap.end())
16 delete cellmap.begin()->second;
17 cellmap.erase(cellmap.begin());
25 map<unsigned int,PHG4CylinderCell *>::const_iterator iter;
26 os <<
"Number of cells: " << size() << endl;
27 for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
29 os <<
"cell key 0x" << hex << iter->first << dec << endl;
30 (iter->second)->identify();
32 set<int>::const_iterator siter;
33 os <<
"Number of layers: " << num_layers() << endl;
34 for (siter = layers.begin(); siter != layers.end(); ++siter)
36 os <<
"layer : " << *siter << endl;
47 cout <<
" detector id too large: " << detid << endl;
51 unsigned int cellid = cellmap.size();
54 if (cellmap.find(newkey) != cellmap.end())
56 cout <<
" duplicate key: " << newkey <<
" exiting now" << endl;
68 cellmap[key] = newcell;
69 return cellmap.find(key);
75 if(cellmap.find(key)!=cellmap.end())
77 cout <<
"PHG4CylinderCellContainer::AddCylinderCellSpecifyKey: duplicate key: " << key <<
" exiting now" << endl;
82 cellmap[key] = newcell;
83 return cellmap.find(key);
91 cout <<
" detector id too large: " << detid << endl;
100 retpair.first = cellmap.lower_bound(keylow);
101 retpair.second = cellmap.upper_bound(keyup);
107 {
return std::make_pair( cellmap.begin(), cellmap.end() ); }
114 if(it == cellmap.end())
117 it = cellmap.find(key);
130 if(it != cellmap.end())
142 double totalenergy = 0;
143 for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
145 totalenergy += iter->second->get_edep();