19 template <
typename STDTYPE>
33 virtual void set(
HcalDetId const &, STDTYPE);
38 virtual STDTYPE &
get(HcalDetId
const &);
39 virtual STDTYPE &
get(HcalElectronicsId
const &);
40 virtual STDTYPE &
get(HcalTrigTowerDetId
const &);
44 virtual void push(HcalDetId
const &, STDTYPE);
45 virtual void push(HcalElectronicsId
const &, STDTYPE);
46 virtual void push(HcalTrigTowerDetId
const &, STDTYPE);
50 virtual bool exists(HcalDetId
const &);
51 virtual bool exists(HcalElectronicsId
const &);
52 virtual bool exists(HcalTrigTowerDetId
const &);
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() {
return _cmap.begin(); }
70 virtual typename CompactMap::const_iterator
end() {
return _cmap.end(); }
73 template <
typename STDTYPE>
76 _cmap.insert(std::make_pair(
p.first,
p.second));
80 template <
typename STDTYPE>
86 template <
typename STDTYPE>
90 for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
91 if (!it->isHcalDetId())
97 typename CompactMap::iterator mit =
_cmap.find(hash);
98 if (mit !=
_cmap.end())
101 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
105 for (std::vector<HcalElectronicsId>::const_iterator it = eids.begin(); it != eids.end(); ++it) {
109 typename CompactMap::iterator mit =
_cmap.find(hash);
110 if (mit !=
_cmap.end())
113 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
116 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
117 for (std::vector<HcalTrigTowerDetId>::const_iterator it = tids.begin(); it != tids.end(); ++it) {
121 typename CompactMap::iterator mit =
_cmap.find(hash);
122 if (mit !=
_cmap.end())
125 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
130 template <
typename STDTYPE>
134 for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
135 if (!it->isHcalDetId())
140 typename CompactMap::iterator mit =
_cmap.find(hash);
141 if (mit !=
_cmap.end())
148 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
152 for (std::vector<HcalElectronicsId>::const_iterator it = eids.begin(); it != eids.end(); ++it) {
155 typename CompactMap::iterator mit =
_cmap.find(hash);
158 if (mit !=
_cmap.end())
162 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
165 std::vector<HcalTrigTowerDetId> tids = emap->
allTriggerId();
166 for (std::vector<HcalTrigTowerDetId>::const_iterator it = tids.begin(); it != tids.end(); ++it) {
169 typename CompactMap::iterator mit =
_cmap.find(hash);
170 if (mit !=
_cmap.end())
176 _cmap.insert(std::make_pair(hash, STDTYPE(0)));
181 template <
typename STDTYPE>
186 template <
typename STDTYPE>
191 template <
typename STDTYPE>
196 template <
typename STDTYPE>
201 template <
typename STDTYPE>
206 template <
typename STDTYPE>
211 template <
typename STDTYPE>
216 template <
typename STDTYPE>
221 template <
typename STDTYPE>
226 template <
typename STDTYPE>
229 typename CompactMap::iterator mit =
_cmap.find(hash);
230 if (mit !=
_cmap.end())
232 _cmap.insert(std::make_pair(hash, x));
235 template <
typename STDTYPE>
238 typename CompactMap::iterator mit =
_cmap.find(hash);
239 if (mit !=
_cmap.end())
241 _cmap.insert(std::make_pair(hash, x));
244 template <
typename STDTYPE>
247 typename CompactMap::iterator mit =
_cmap.find(hash);
248 if (mit !=
_cmap.end())
250 _cmap.insert(std::make_pair(hash, x));
253 template <
typename STDTYPE>
255 return (uint32_t)(
_cmap.size());
258 template <
typename STDTYPE>
261 STDTYPE &x =
p.second;
262 uint32_t
hash =
p.first;
263 c->
fill(hash, (
double)x);
267 template <
typename STDTYPE>
270 STDTYPE &x =
p.second;
271 uint32_t
hash =
p.first;
273 for (std::vector<Container1D *>::const_iterator it = vc.begin(); it != vc.end(); ++it)
274 (*it)->fill(hash, (
double)x);
278 template <
typename STDTYPE>
291 template <
typename STDTYPE>
298 template <
typename STDTYPE>
301 STDTYPE &x =
p.second;
302 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)
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)