17 while(cellmap.begin() != cellmap.end())
19 delete cellmap.begin()->second;
20 cellmap.erase(cellmap.begin());
29 os <<
"Number of cells: " << size() << endl;
30 for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
32 os <<
"cell key 0x" << hex << iter->first << dec << endl;
33 (iter->second)->identify();
42 if (cellmap.find(key) != cellmap.end())
44 cout <<
"overwriting cell 0x" << hex << key << dec << endl;
47 cellmap[key] = newcell;
48 return cellmap.find(key);
54 if(cellmap.find(key)!=cellmap.end())
56 cout <<
"PHG4CellContainer::AddCellSpecifyKey: duplicate key: " << key <<
" exiting now" << endl;
60 cellmap[key] = newcell;
61 return cellmap.find(key);
73 retpair.first = cellmap.lower_bound(keylow);
74 retpair.second = cellmap.upper_bound(keyup);
80 {
return std::make_pair( cellmap.begin(), cellmap.end() ); }
87 if(it == cellmap.end())
90 it = cellmap.find(key);
102 if(it != cellmap.end())
114 double totalenergy = 0;
115 for (iter = cellmap.begin(); iter != cellmap.end(); ++iter)
117 totalenergy += iter->second->get_edep();