22 template<
typename STDTYPE>
39 virtual void set(
HcalDetId const&, STDTYPE);
50 virtual void push(
HcalDetId const&, STDTYPE);
61 virtual void dump(std::vector<Container1D*>
const&);
65 virtual uint32_t
size();
69 typedef boost::unordered_map<uint32_t, STDTYPE>
CompactMap;
75 virtual typename CompactMap::const_iterator
begin()
76 {
return _cmap.begin();}
77 virtual typename CompactMap::const_iterator
end()
81 template<
typename STDTYPE>
86 _cmap.insert(std::make_pair(p.first, p.second));
90 template<
typename STDTYPE>
94 _hashmap.initialize(ht);
95 _logger.set(
"XXX", debug);
98 template<
typename STDTYPE>
101 if (_hashmap.isDHash())
103 std::vector<HcalGenericDetId> dids =
105 for (std::vector<HcalGenericDetId>::const_iterator it=
106 dids.begin(); it!=dids.end(); ++it)
108 if (!it->isHcalDetId())
112 uint32_t
hash = _hashmap.getHash(did);
113 _logger.debug(_hashmap.getName(did));
114 typename CompactMap::iterator mit = _cmap.find(hash);
115 if (mit!=_cmap.end())
119 std::make_pair(hash, STDTYPE(0)));
122 else if (_hashmap.isEHash())
124 std::vector<HcalElectronicsId> eids =
126 for (std::vector<HcalElectronicsId>::const_iterator it=
127 eids.begin(); it!=eids.end(); ++it)
130 uint32_t
hash = _hashmap.getHash(eid);
131 _logger.debug(_hashmap.getName(eid));
132 typename CompactMap::iterator mit = _cmap.find(hash);
133 if (mit!=_cmap.end())
137 std::make_pair(hash, STDTYPE(0)));
140 else if (_hashmap.isTHash())
142 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
143 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
144 tids.begin(); it!=tids.end(); ++it)
147 uint32_t
hash = _hashmap.getHash(tid);
148 _logger.debug(_hashmap.getName(tid));
149 typename CompactMap::iterator mit = _cmap.find(hash);
150 if (mit!=_cmap.end())
154 std::make_pair(hash, STDTYPE(0)));
159 template<
typename STDTYPE>
163 if (_hashmap.isDHash())
165 std::vector<HcalGenericDetId> dids =
167 for (std::vector<HcalGenericDetId>::const_iterator it=
168 dids.begin(); it!=dids.end(); ++it)
170 if (!it->isHcalDetId())
174 uint32_t
hash = _hashmap.getHash(did);
175 typename CompactMap::iterator mit = _cmap.find(hash);
176 if (mit!=_cmap.end())
181 _logger.debug(_hashmap.getName(did));
184 std::make_pair(hash, STDTYPE(0)));
187 else if (_hashmap.isEHash())
189 std::vector<HcalElectronicsId> eids =
191 for (std::vector<HcalElectronicsId>::const_iterator it=
192 eids.begin(); it!=eids.end(); ++it)
195 uint32_t
hash = _hashmap.getHash(eid);
196 typename CompactMap::iterator mit = _cmap.find(hash);
199 if (mit!=_cmap.end())
204 std::make_pair(hash, STDTYPE(0)));
207 else if (_hashmap.isTHash())
209 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
210 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
211 tids.begin(); it!=tids.end(); ++it)
214 uint32_t
hash = _hashmap.getHash(tid);
215 typename CompactMap::iterator mit = _cmap.find(hash);
216 if (mit!=_cmap.end())
220 _logger.debug(_hashmap.getName(tid));
223 std::make_pair(hash, STDTYPE(0)));
228 template<
typename STDTYPE>
231 _cmap[_hashmap.getHash(did)] = x;
234 template<
typename STDTYPE>
238 _cmap[_hashmap.getHash(did)] = x;
241 template<
typename STDTYPE>
245 _cmap[_hashmap.getHash(did)] = x;
248 template<
typename STDTYPE>
251 return _cmap[_hashmap.getHash(did)];
254 template<
typename STDTYPE>
257 return _cmap[_hashmap.getHash(eid)];
260 template<
typename STDTYPE>
263 return _cmap[_hashmap.getHash(tid)];
266 template<
typename STDTYPE>
269 return _cmap.find(
id.rawId())!=_cmap.end();
272 template<
typename STDTYPE>
275 return _cmap.find(
id.rawId())!=_cmap.end();
278 template<
typename STDTYPE>
281 return _cmap.find(
id.rawId())!=_cmap.end();
284 template<
typename STDTYPE>
288 typename CompactMap::iterator mit=_cmap.find(hash);
289 if (mit!=_cmap.end())
292 std::make_pair(hash, x));
295 template<
typename STDTYPE>
299 typename CompactMap::iterator mit=_cmap.find(hash);
300 if (mit!=_cmap.end())
303 std::make_pair(hash, x));
306 template<
typename STDTYPE>
310 typename CompactMap::iterator mit=_cmap.find(hash);
311 if (mit!=_cmap.end())
314 std::make_pair(hash, x));
317 template<
typename STDTYPE>
320 return (uint32_t)(_cmap.size());
323 template<
typename STDTYPE>
328 STDTYPE &
x = p.second;
329 uint32_t
hash = p.first;
330 c->
fill(hash, (
double)x);
334 template<
typename STDTYPE>
339 STDTYPE &
x = p.second;
340 uint32_t
hash = p.first;
342 for (std::vector<Container1D*>::const_iterator it=vc.begin();
344 (*it)->fill(hash, (
double)x);
348 template<
typename STDTYPE>
351 std::cout <<
"Container by " << _hashmap.getHashTypeName() << std::endl;
354 if (_hashmap.isDHash())
356 else if (_hashmap.isEHash())
359 else if (_hashmap.isTHash())
365 template<
typename STDTYPE>
374 template<
typename STDTYPE>
379 STDTYPE &
x = p.second;
380 uint32_t
hash = p.first;
382 if (_hashmap.isDHash())
384 else if (_hashmap.isEHash())
386 else if (_hashmap.isTHash())
static AlgebraicMatrix initialize()
ContainerXXX(hashfunctions::HashType ht)
boost::unordered_map< uint32_t, double > doubleCompactMap
virtual bool exists(HcalDetId const &)
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
tuple cont
load Luminosity info ##
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
virtual CompactMap::const_iterator begin()
virtual void dump(Container1D *)
virtual void push(HcalDetId const &, STDTYPE)
mapper::HashMapper _hashmap
boost::unordered_map< uint32_t, uint32_t > uintCompactMap
uint32_t rawId() const
get the raw id
virtual CompactMap::const_iterator end()
T x() const
Cartesian x coordinate.
virtual void fill(uint32_t)
Container::value_type value_type
boost::unordered_map< uint32_t, int > intCompactMap
std::vector< HcalGenericDetId > allPrecisionId() const
boost::unordered_map< uint32_t, STDTYPE > CompactMap
virtual void book(HcalElectronicsMap const *)
virtual void load(Container1D *)
virtual STDTYPE & get(HcalDetId const &)
virtual double getBinContent(HcalDetId const &)
virtual bool filter(HcalDetId const &) const
virtual void initialize(hashfunctions::HashType, int debug=0)
void reset(double vett[256])
Readout chain identification for Hcal.
tuple size
Write out results.
std::vector< HcalTrigTowerDetId > allTriggerId() const
virtual void set(HcalDetId const &, STDTYPE)