20 template<
typename STDTYPE>
37 virtual void set(
HcalDetId const&, STDTYPE);
42 virtual STDTYPE&
get(HcalDetId
const&);
43 virtual STDTYPE&
get(HcalElectronicsId
const&);
44 virtual STDTYPE&
get(HcalTrigTowerDetId
const&);
48 virtual void push(HcalDetId
const&, STDTYPE);
49 virtual void push(HcalElectronicsId
const&, STDTYPE);
50 virtual void push(HcalTrigTowerDetId
const&, STDTYPE);
54 virtual bool exists(HcalDetId
const&);
55 virtual bool exists(HcalElectronicsId
const&);
56 virtual bool exists(HcalTrigTowerDetId
const&);
59 virtual void dump(std::vector<Container1D*>
const&);
63 virtual uint32_t
size();
67 typedef boost::unordered_map<uint32_t, STDTYPE>
CompactMap;
73 virtual typename CompactMap::const_iterator
begin()
74 {
return _cmap.begin();}
75 virtual typename CompactMap::const_iterator
end()
79 template<
typename STDTYPE>
84 _cmap.insert(std::make_pair(p.first, p.second));
88 template<
typename STDTYPE>
96 template<
typename STDTYPE>
101 std::vector<HcalGenericDetId> dids =
103 for (std::vector<HcalGenericDetId>::const_iterator it=
104 dids.begin(); it!=dids.end(); ++it)
106 if (!it->isHcalDetId())
112 typename CompactMap::iterator mit =
_cmap.find(hash);
113 if (mit!=
_cmap.end())
117 std::make_pair(hash, STDTYPE(0)));
122 std::vector<HcalElectronicsId> eids =
124 for (std::vector<HcalElectronicsId>::const_iterator it=
125 eids.begin(); it!=eids.end(); ++it)
130 typename CompactMap::iterator mit =
_cmap.find(hash);
131 if (mit!=
_cmap.end())
135 std::make_pair(hash, STDTYPE(0)));
140 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
141 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
142 tids.begin(); it!=tids.end(); ++it)
147 typename CompactMap::iterator mit =
_cmap.find(hash);
148 if (mit!=
_cmap.end())
152 std::make_pair(hash, STDTYPE(0)));
157 template<
typename STDTYPE>
163 std::vector<HcalGenericDetId> dids =
165 for (std::vector<HcalGenericDetId>::const_iterator it=
166 dids.begin(); it!=dids.end(); ++it)
168 if (!it->isHcalDetId())
173 typename CompactMap::iterator mit =
_cmap.find(hash);
174 if (mit!=
_cmap.end())
182 std::make_pair(hash, STDTYPE(0)));
187 std::vector<HcalElectronicsId> eids =
189 for (std::vector<HcalElectronicsId>::const_iterator it=
190 eids.begin(); it!=eids.end(); ++it)
194 typename CompactMap::iterator mit =
_cmap.find(hash);
197 if (mit!=
_cmap.end())
202 std::make_pair(hash, STDTYPE(0)));
207 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
208 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
209 tids.begin(); it!=tids.end(); ++it)
213 typename CompactMap::iterator mit =
_cmap.find(hash);
214 if (mit!=
_cmap.end())
221 std::make_pair(hash, STDTYPE(0)));
226 template<
typename STDTYPE>
232 template<
typename STDTYPE>
239 template<
typename STDTYPE>
246 template<
typename STDTYPE>
252 template<
typename STDTYPE>
258 template<
typename STDTYPE>
264 template<
typename STDTYPE>
270 template<
typename STDTYPE>
276 template<
typename STDTYPE>
282 template<
typename STDTYPE>
286 typename CompactMap::iterator mit=
_cmap.find(hash);
287 if (mit!=
_cmap.end())
290 std::make_pair(hash, x));
293 template<
typename STDTYPE>
297 typename CompactMap::iterator mit=
_cmap.find(hash);
298 if (mit!=
_cmap.end())
301 std::make_pair(hash, x));
304 template<
typename STDTYPE>
308 typename CompactMap::iterator mit=
_cmap.find(hash);
309 if (mit!=
_cmap.end())
312 std::make_pair(hash, x));
315 template<
typename STDTYPE>
318 return (uint32_t)(
_cmap.size());
321 template<
typename STDTYPE>
326 STDTYPE &x = p.second;
327 uint32_t
hash = p.first;
328 c->
fill(hash, (
double)x);
332 template<
typename STDTYPE>
337 STDTYPE &x = p.second;
338 uint32_t
hash = p.first;
340 for (std::vector<Container1D*>::const_iterator it=vc.begin();
342 (*it)->fill(hash, (
double)x);
346 template<
typename STDTYPE>
363 template<
typename STDTYPE>
372 template<
typename STDTYPE>
377 STDTYPE &x = p.second;
378 uint32_t
hash = p.first;
constexpr uint32_t rawId() const
ContainerXXX(hashfunctions::HashType ht)
boost::unordered_map< uint32_t, double > doubleCompactMap
virtual bool exists(HcalDetId const &)
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
virtual bool isTHash() const
virtual void initialize(hashfunctions::HashType htype)
void debug(STDTYPE const &msg) const
virtual CompactMap::const_iterator begin()
constexpr uint32_t rawId() const
get the raw id
virtual void dump(Container1D *)
virtual void push(HcalDetId const &, STDTYPE)
mapper::HashMapper _hashmap
boost::unordered_map< uint32_t, uint32_t > uintCompactMap
virtual std::string getHashTypeName() const
virtual CompactMap::const_iterator end()
virtual void fill(uint32_t)
Container::value_type value_type
void set(std::string const &name, int debug=0)
boost::unordered_map< uint32_t, int > intCompactMap
std::vector< HcalGenericDetId > allPrecisionId() const
boost::unordered_map< uint32_t, STDTYPE > CompactMap
uint32_t getHash(HcalDetId const &did) const override
virtual void book(HcalElectronicsMap const *)
virtual bool isDHash() const
virtual void load(Container1D *)
virtual STDTYPE & get(HcalDetId const &)
virtual double getBinContent(HcalDetId const &)
virtual bool filter(HcalDetId const &) const
virtual bool isEHash() const
virtual void initialize(hashfunctions::HashType, int debug=0)
Readout chain identification for Hcal.
std::vector< HcalTrigTowerDetId > allTriggerId() const
std::string getName(HcalDetId const &did) const override
virtual void set(HcalDetId const &, STDTYPE)