1 #include "HGCal/CondObjects/interface/HGCalElectronicsMap.h"
7 DetIdMatch(uint32_t matchTo) : m_id(matchTo) { }
10 return a.
detid == m_id;
23 DetIdMatch x(did.rawId());
24 return std::find_if(m_map.begin(), m_map.end(), x) == m_map.end();
32 std::vector<HGCalElectronicsMap::MapEntry>::const_iterator where = std::lower_bound(m_map.begin(), m_map.end(), me);
33 return (where != m_map.end() && where->eid == eid);
41 std::vector<HGCalElectronicsMap::MapEntry>::const_iterator where = std::lower_bound(m_map.begin(), m_map.end(), me);
42 return (where == m_map.end() || where->eid != eid) ? (DetId(0)) : (DetId(where->detid));
47 DetIdMatch x(did.rawId());
48 std::vector<MapEntry>::const_iterator i = std::find_if(m_map.begin(), m_map.end(), x);
49 if (i == m_map.end())
return 0;
57 me.
detid = did.rawId();
59 std::vector<HGCalElectronicsMap::MapEntry>::const_iterator where = std::lower_bound(m_map.begin(), m_map.end(), me);
61 if (where != m_map.end() && where->eid == eid)
return;
62 m_map.insert(where, me);
67 return (i >= m_map.size()) ? (0) : (m_map[i].eid);
71 return (i >= m_map.size()) ? (DetId(0)) : (DetId(m_map[i].detid));
void insert(uint32_t, DetId did)
uint32_t eidAt(size_t i) const
DetId didAt(size_t i) const
DetId eid2detId(uint32_t eid) const
bool existsEId(uint32_t eid) const
uint32_t detId2eid(DetId did) const
bool operator<(const MapEntry &) const
bool existsDetId(DetId did) const