22 template<
typename STDTYPE>
39 virtual void set(
HcalDetId const&, STDTYPE);
50 virtual void push(
HcalDetId const&, STDTYPE);
55 virtual void dump(std::vector<Container1D*>
const&);
59 virtual uint32_t
size();
63 typedef boost::unordered_map<uint32_t, STDTYPE>
CompactMap;
69 virtual typename CompactMap::const_iterator
begin()
70 {
return _cmap.begin();}
71 virtual typename CompactMap::const_iterator
end()
75 template<
typename STDTYPE>
80 _cmap.insert(std::make_pair(p.first, p.second));
84 template<
typename STDTYPE>
88 _hashmap.initialize(ht);
89 _logger.set(
"XXX", debug);
92 template<
typename STDTYPE>
95 if (_hashmap.isDHash())
97 std::vector<HcalGenericDetId> dids =
99 for (std::vector<HcalGenericDetId>::const_iterator it=
100 dids.begin(); it!=dids.end(); ++it)
102 if (!it->isHcalDetId())
106 uint32_t
hash = _hashmap.getHash(did);
107 _logger.debug(_hashmap.getName(did));
108 typename CompactMap::iterator mit = _cmap.find(hash);
109 if (mit!=_cmap.end())
113 std::make_pair(hash, STDTYPE(0)));
116 else if (_hashmap.isEHash())
118 std::vector<HcalElectronicsId> eids =
120 for (std::vector<HcalElectronicsId>::const_iterator it=
121 eids.begin(); it!=eids.end(); ++it)
124 uint32_t
hash = _hashmap.getHash(eid);
125 _logger.debug(_hashmap.getName(eid));
126 typename CompactMap::iterator mit = _cmap.find(hash);
127 if (mit!=_cmap.end())
131 std::make_pair(hash, STDTYPE(0)));
134 else if (_hashmap.isTHash())
136 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
137 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
138 tids.begin(); it!=tids.end(); ++it)
141 uint32_t
hash = _hashmap.getHash(tid);
142 _logger.debug(_hashmap.getName(tid));
143 typename CompactMap::iterator mit = _cmap.find(hash);
144 if (mit!=_cmap.end())
148 std::make_pair(hash, STDTYPE(0)));
153 template<
typename STDTYPE>
157 if (_hashmap.isDHash())
159 std::vector<HcalGenericDetId> dids =
161 for (std::vector<HcalGenericDetId>::const_iterator it=
162 dids.begin(); it!=dids.end(); ++it)
164 if (!it->isHcalDetId())
168 uint32_t
hash = _hashmap.getHash(did);
169 typename CompactMap::iterator mit = _cmap.find(hash);
170 if (mit!=_cmap.end())
175 _logger.debug(_hashmap.getName(did));
178 std::make_pair(hash, STDTYPE(0)));
181 else if (_hashmap.isEHash())
183 std::vector<HcalElectronicsId> eids =
185 for (std::vector<HcalElectronicsId>::const_iterator it=
186 eids.begin(); it!=eids.end(); ++it)
189 uint32_t
hash = _hashmap.getHash(eid);
190 typename CompactMap::iterator mit = _cmap.find(hash);
193 if (mit!=_cmap.end())
198 std::make_pair(hash, STDTYPE(0)));
201 else if (_hashmap.isTHash())
203 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
204 for (std::vector<HcalTrigTowerDetId>::const_iterator it=
205 tids.begin(); it!=tids.end(); ++it)
208 uint32_t
hash = _hashmap.getHash(tid);
209 typename CompactMap::iterator mit = _cmap.find(hash);
210 if (mit!=_cmap.end())
214 _logger.debug(_hashmap.getName(tid));
217 std::make_pair(hash, STDTYPE(0)));
222 template<
typename STDTYPE>
225 _cmap[_hashmap.getHash(did)] = x;
228 template<
typename STDTYPE>
232 _cmap[_hashmap.getHash(did)] = x;
235 template<
typename STDTYPE>
239 _cmap[_hashmap.getHash(did)] = x;
242 template<
typename STDTYPE>
245 return _cmap[_hashmap.getHash(did)];
248 template<
typename STDTYPE>
251 return _cmap[_hashmap.getHash(eid)];
254 template<
typename STDTYPE>
257 return _cmap[_hashmap.getHash(tid)];
260 template<
typename STDTYPE>
264 typename CompactMap::iterator mit=_cmap.find(hash);
265 if (mit!=_cmap.end())
268 std::make_pair(hash, x));
271 template<
typename STDTYPE>
275 typename CompactMap::iterator mit=_cmap.find(hash);
276 if (mit!=_cmap.end())
279 std::make_pair(hash, x));
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>
296 return (uint32_t)(_cmap.size());
299 template<
typename STDTYPE>
304 STDTYPE &
x = p.second;
305 uint32_t
hash = p.first;
306 c->
fill(hash, (
double)x);
310 template<
typename STDTYPE>
315 STDTYPE &
x = p.second;
316 uint32_t
hash = p.first;
318 for (std::vector<Container1D*>::const_iterator it=vc.begin();
320 (*it)->fill(hash, (
double)x);
324 template<
typename STDTYPE>
327 std::cout <<
"Container by " << _hashmap.getHashTypeName() << std::endl;
330 if (_hashmap.isDHash())
332 else if (_hashmap.isEHash())
335 else if (_hashmap.isTHash())
341 template<
typename STDTYPE>
350 template<
typename STDTYPE>
355 STDTYPE &
x = p.second;
356 uint32_t
hash = p.first;
358 if (_hashmap.isDHash())
360 else if (_hashmap.isEHash())
362 else if (_hashmap.isTHash())
static AlgebraicMatrix initialize()
ContainerXXX(hashfunctions::HashType ht)
boost::unordered_map< uint32_t, double > doubleCompactMap
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)