CMS 3D CMS Logo

OtherHashMaps.h
Go to the documentation of this file.
1 #ifndef TrackingTools_TrajectoryCleaning_src_OtherHashMaps
2 #define TrackingTools_TrajectoryCleaning_src_OtherHashMaps
3 
4 #include <functional>
5 #include <iostream>
6 #include <iterator>
7 #include <list>
8 #include <map>
9 #include <memory>
10 #include <type_traits>
11 #include <vector>
12 
13 namespace cmsutil {
14 
15  /*** The concept is the same of std::map<K, std::vector<V>>, but the implementation is much different (and the interface is not really compatible)
16  * It works only for K and V objects with trivial destructors (primitive types and bare pointers are fine)
17  * The main implementation difference w.r.t. unordered_map<K, std::vector<V>> is that this map is optimized to do very few memory allocations
18  * (in particular, clear does not redeme memory so if you just clear the map instead of deleting it you won't call malloc each time you fill it)
19  * The map doesn't rehash, so you should set a reasonable number of buckets (that you can change also when clearing the map)
20  * Note that too many buckets will make your map slow to clear (and possibly more prone to cache misses).
21  * Although it can take an allocator as template argument, it has been tested only with std::allocator.
22  * When used in the TrajectoryCleanerBySharedHits it works and it does improve the performance. Any other usecase was not checked at all.
23  * */
24  template <typename K,
25  typename V,
26  typename Hasher = std::hash<K>,
27  typename Equals = std::equal_to<K>,
28  typename Alloc = std::allocator<V> >
30  // taking Alloc definition from http://www.codeproject.com/KB/cpp/allocator.aspx
31  static_assert(std::conjunction<std::is_trivially_destructible<K>, std::is_trivially_destructible<V> >::value);
32 
33  public:
34  typedef Hasher hasher;
36  typedef typename std::conditional<std::is_pointer<V>::value, V, V const &>::type
37  value_ref; // otherwise we get problems with 'const' if V is a pointer
38 
39  SimpleAllocHashMultiMap(size_t buckets, size_t keyRowSize, size_t valueRowSize, size_t maxRows = 50);
40 
42 
43  void clear(size_t newBucketSize = 0) {
44  if (newBucketSize != 0) {
45  if (newBucketSize > bucketCapacity_) {
46  ptrAlloc_.deallocate(buckets_, bucketCapacity_);
47  bucketCapacity_ = newBucketSize;
49  }
50  bucketSize_ = newBucketSize;
51  }
52  memset(buckets_, 0, bucketSize_ * sizeof(KeyItem *));
53  currentKeyRow_ = keyRows_.begin();
54  nextKeyItem_ = keyRows_.front();
56  currentValueRow_ = valueRows_.begin();
57  nextValueItem_ = valueRows_.front();
59  if ((keyRows_.size() > maxRows_) || (valueRows_.size() > maxRows_))
60  freeRows();
61  }
62  void freeRows();
63 
64  bool empty() const { return nextKeyItem_ == keyRows_.front(); }
65 
66  void insert(K const &key, value_ref value);
67 
68  struct ValueItem {
69  ValueItem(ValueItem *next1, value_ref val) : next(next1), value(val) {}
72  typedef V value_type;
73  const value_type &operator()() const { return value; }
74  };
75 
76  struct KeyItem {
77  KeyItem(KeyItem *next1, K const &key1, ValueItem *val1) : key(key1), next(next1), value(val1) {}
78  K key;
82  const value_type &operator()() const { return *this; }
83  };
84 
85  template <typename Item>
86  class item_iterator {
87  public:
88  typedef ::std::forward_iterator_tag iterator_category;
89  typedef const typename Item::value_type value_type;
90  typedef const value_type &reference;
91  typedef const value_type *pointer;
92  typedef ptrdiff_t difference_type;
94 
95  item_iterator() : it_(nullptr) {}
96  item_iterator(const Item *it) : it_(it) {}
97  const value_type &operator*() const { return (*it_)(); }
98  const value_type *operator->() const { return &(*it_)(); }
100  if (it_ != nullptr)
101  it_ = it_->next;
102  return *this;
103  }
104  bool operator==(const self_type &other) const { return it_ == other.it_; }
105  bool operator!=(const self_type &other) const { return it_ != other.it_; }
106  bool good() const { return (it_ != nullptr); }
107 
108  private:
109  const Item *it_;
110  };
112 
113  value_iterator values(K const &key);
114 
115  private:
119 
120  // --- buckets ---
123  // --- keys ---
124  size_t keyRowSize_;
125  std::list<KeyItem *> keyRows_;
126  typename std::list<KeyItem *>::iterator
127  currentKeyRow_; // last row that is currently in use. nextItem_ and the last valid item are both on this row. it is never rows_.end()
129  // --- values ---
131  std::list<ValueItem *> valueRows_;
132  typename std::list<ValueItem *>::iterator
133  currentValueRow_; // last row that is currently in use. nextItem_ and the last valid item are both on this row. it is never rows_.end()
135  // --- other ---
136  size_t maxRows_;
137  Hasher hasher_;
138  Equals eq_;
142 
143  KeyItem *push_back_(K const &key, KeyItem *next);
145  KeyItem &find_or_insert_(K const &key);
146 
147  public:
148  void dump() {
149  std::cout << "Dumping HASH MULTIMAP" << std::endl;
150  std::cout << " Key items: "
152  << std::endl;
153  std::cout << " Value items: "
156  << std::endl;
157  size_t row = 0;
158  std::cout << " Buckets (size " << bucketSize_ << ", capacity " << bucketCapacity_ << ")";
159  for (KeyItem **p = buckets_; p != buckets_ + bucketSize_; ++p, ++row) {
160  std::cout << " [" << row << "] " << *p << std::endl;
161  }
162  row = 0;
163  std::cout << " Key Items " << std::endl;
164  for (typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end(); it != last;
165  ++it, ++row) {
166  KeyItem *lastI = *it + keyRowSize_;
167  std::cout << " Key Row " << row << " (of size " << keyRowSize_ << ")" << std::endl;
168  for (KeyItem *p = *it; p != lastI; ++p) {
169  std::cout << " @ " << p << " [" << p->key << ", @" << p->value << "], next = " << p->next << std::endl;
170  if ((it == currentKeyRow_) && (p == nextKeyItem_ - 1)) {
171  std::cout << " ^^^ this was the last valid item." << std::endl;
172  last = 0;
173  break;
174  }
175  }
176  if (lastI == 0)
177  break;
178  }
179  row = 0;
180  std::cout << " Value Items " << std::endl;
181  for (typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end(); it != last;
182  ++it, ++row) {
183  ValueItem *lastI = *it + valueRowSize_;
184  std::cout << " Value Row " << row << " (of size " << valueRowSize_ << ")" << std::endl;
185  for (ValueItem *p = *it; p != lastI; ++p) {
186  std::cout << " @ " << p << " [" << p->value << "], next = " << p->next << std::endl;
187  if ((it == currentValueRow_) && (p == nextValueItem_ - 1)) {
188  std::cout << " ^^^ this was the last valid item." << std::endl;
189  last = 0;
190  break;
191  }
192  }
193  if (lastI == 0)
194  break;
195  }
196  std::cout << " End of dump" << std::endl;
197  }
198  };
199 
200  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
202  size_t keyRowSize,
203  size_t valueRowSize,
204  size_t maxRows)
205  : bucketSize_(buckets),
206  bucketCapacity_(bucketSize_),
207  keyRowSize_(keyRowSize),
208  valueRowSize_(valueRowSize),
209  maxRows_(maxRows) {
210  buckets_ = ptrAlloc_.allocate(bucketCapacity_);
211  keyRows_.push_back(keyAlloc_.allocate(keyRowSize_));
212  valueRows_.push_back(valueAlloc_.allocate(valueRowSize_));
213  clear();
214  }
215  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
217  for (typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end(); it != last; ++it) {
218  keyAlloc_.deallocate(*it, keyRowSize_);
219  }
220  for (typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end(); it != last; ++it) {
221  valueAlloc_.deallocate(*it, valueRowSize_);
222  }
223  ptrAlloc_.deallocate(buckets_, bucketCapacity_);
224  }
225 
226  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
228  if (keyRows_.size() > maxRows_) {
229  //std::cerr << "Freeing key rows, current size is " << keyRows_.size() << std::endl;
230  typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end();
231  for (std::advance(it, maxRows_); it != last; ++it) {
232  keyAlloc_.deallocate(*it, keyRowSize_);
233  }
234  keyRows_.resize(maxRows_);
235  }
236  if (valueRows_.size() > maxRows_) {
237  //std::cerr << "Freeing value rows, current size is " << valueRows_.size() << std::endl;
238  typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end();
239  for (std::advance(it, maxRows_); it != last; ++it) {
240  valueAlloc_.deallocate(*it, valueRowSize_);
241  }
242  valueRows_.resize(maxRows_);
243  }
244  }
245 
246  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
249  if (nextKeyItem_ == keyEndMarker_) {
250  ++currentKeyRow_;
251  if (currentKeyRow_ == keyRows_.end()) {
252  keyRows_.push_back(keyAlloc_.allocate(keyRowSize_));
253  currentKeyRow_ = keyRows_.end();
254  --currentKeyRow_; // end - 1 doesn't work!
255  }
256  nextKeyItem_ = *currentKeyRow_;
257  keyEndMarker_ = nextKeyItem_ + keyRowSize_;
258  }
259  keyAlloc_.construct(nextKeyItem_, KeyItem(next, key, nullptr));
260  nextKeyItem_++;
261  return (nextKeyItem_ - 1);
262  }
263  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
266  if (nextValueItem_ == valueEndMarker_) {
267  ++currentValueRow_;
268  if (currentValueRow_ == valueRows_.end()) {
269  valueRows_.push_back(valueAlloc_.allocate(valueRowSize_));
270  currentValueRow_ = valueRows_.end();
271  --currentValueRow_; // end - 1 doesn't work!
272  }
273  nextValueItem_ = *currentValueRow_;
274  valueEndMarker_ = nextValueItem_ + valueRowSize_;
275  }
276  valueAlloc_.construct(nextValueItem_, ValueItem(next, value));
277  nextValueItem_++;
278  return (nextValueItem_ - 1);
279  }
280 
281  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
284  //std::cout << "Find or insert for key " << key << std::endl;
285  size_t hash = hasher_(key);
286  KeyItem *&buck = buckets_[hash % bucketSize_];
287  KeyItem *curr = buck;
288  while (curr) {
289  if (eq_(curr->key, key)) {
290  //std::cout << " Key " << key << " was found." << std::endl;
291  return *curr;
292  }
293  curr = curr->next;
294  }
295  buck = push_back_(key, buck);
296  return *buck;
297  }
298 
299  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
301  //std::cout << "Pushing back value " << value << " for key " << key << std::endl;
302  KeyItem &k = find_or_insert_(key);
303  //std::cout << "Key " << (k.value ? "exists" : " is new") << std::endl;
304  k.value = push_back_(value, k.value);
305  }
306 
307  template <typename K, typename V, typename Hasher, typename Equals, typename Alloc>
310  //std::cout << "Gettinv values for key " << key << std::endl;
311  size_t hash = hasher_(key);
312  for (KeyItem *curr = buckets_[hash % bucketSize_]; curr; curr = curr->next) {
313  if (eq_(curr->key, key))
314  return value_iterator(curr->value);
315  }
316  return value_iterator();
317  }
318 
319  /*** Very very simple map implementation
320  * It's just a std::vector<pair<key,value>>, and the operator[] does a linear search to find the key (it's O(N) time, both if the key exists and if it doesn't)
321  * Anyway, if your map is very small and if you clear it often, it performs better than more complex variants
322  * Semantics is as std::map, except that only very few methods are implemented.
323  * */
324  template <typename K, typename V>
326  public:
327  typedef std::pair<K, V> value_type;
328  typedef typename std::vector<value_type>::const_iterator const_iterator;
329  typedef typename std::vector<value_type>::iterator iterator; // but please don't mutate the keys
330 
331  void clear() { data_.clear(); }
332  bool empty() const { return data_.empty(); }
333  const_iterator begin() const { return data_.begin(); }
334  const_iterator end() const { return data_.end(); }
335  iterator begin() { return data_.begin(); }
336  iterator end() { return data_.end(); }
337 
338  V &operator[](const K &k) {
339  for (typename std::vector<value_type>::iterator it = data_.begin(), ed = data_.end(); it != ed; ++it) {
340  if (it->first == k)
341  return it->second;
342  }
343  data_.push_back(value_type(k, V()));
344  return data_.back().second;
345  }
346 
348 
349  private:
350  std::vector<value_type> data_;
351  };
352 
353 } // namespace cmsutil
354 
355 #endif
cmsutil::SimpleAllocHashMultiMap::SimpleAllocHashMultiMap
SimpleAllocHashMultiMap(size_t buckets, size_t keyRowSize, size_t valueRowSize, size_t maxRows=50)
Definition: OtherHashMaps.h:201
cms::cuda::V
cudaStream_t T uint32_t const T *__restrict__ const uint32_t *__restrict__ uint32_t int cudaStream_t V
Definition: HistoContainer.h:99
cmsutil::SimpleAllocHashMultiMap::ValueItem
Definition: OtherHashMaps.h:68
cmsutil::SimpleAllocHashMultiMap::freeRows
void freeRows()
Definition: OtherHashMaps.h:227
cmsutil::SimpleAllocHashMultiMap::ptrAlloc_
KeyItemPtrAllocator ptrAlloc_
Definition: OtherHashMaps.h:141
cmsutil::SimpleAllocHashMultiMap::KeyItem::KeyItem
KeyItem(KeyItem *next1, K const &key1, ValueItem *val1)
Definition: OtherHashMaps.h:77
cmsutil::SimpleAllocHashMultiMap::push_back_
KeyItem * push_back_(K const &key, KeyItem *next)
Definition: OtherHashMaps.h:248
cmsutil::SimpleAllocHashMultiMap::dump
void dump()
Definition: OtherHashMaps.h:148
cmsutil::SimpleAllocHashMultiMap::item_iterator::operator!=
bool operator!=(const self_type &other) const
Definition: OtherHashMaps.h:105
cond::hash
Definition: Time.h:19
cmsutil::SimpleAllocHashMultiMap::item_iterator::good
bool good() const
Definition: OtherHashMaps.h:106
cmsutil::SimpleAllocHashMultiMap::hasher
Hasher hasher
Definition: OtherHashMaps.h:31
cmsutil::SimpleAllocHashMultiMap::valueRowSize_
size_t valueRowSize_
Definition: OtherHashMaps.h:130
cmsutil::SimpleAllocHashMultiMap::KeyItemPtrAllocator
Alloc::template rebind< KeyItem * >::other KeyItemPtrAllocator
Definition: OtherHashMaps.h:117
cmsutil::UnsortedDumbVectorMap::operator[]
V & operator[](const K &k)
Definition: OtherHashMaps.h:338
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
cmsutil::SimpleAllocHashMultiMap::empty
bool empty() const
Definition: OtherHashMaps.h:64
cmsutil::UnsortedDumbVectorMap::data_
std::vector< value_type > data_
Definition: OtherHashMaps.h:350
cmsutil::SimpleAllocHashMultiMap::item_iterator::item_iterator
item_iterator()
Definition: OtherHashMaps.h:95
cmsutil::SimpleAllocHashMultiMap
Definition: OtherHashMaps.h:29
cmsutil::SimpleAllocHashMultiMap::maxRows_
size_t maxRows_
Definition: OtherHashMaps.h:136
cmsutil::SimpleAllocHashMultiMap::valueRows_
std::list< ValueItem * > valueRows_
Definition: OtherHashMaps.h:131
cmsutil::SimpleAllocHashMultiMap::ValueItem::operator()
const value_type & operator()() const
Definition: OtherHashMaps.h:73
cmsutil::UnsortedDumbVectorMap::empty
bool empty() const
Definition: OtherHashMaps.h:332
cmsutil::SimpleAllocHashMultiMap::currentValueRow_
std::list< ValueItem * >::iterator currentValueRow_
Definition: OtherHashMaps.h:133
cmsutil::UnsortedDumbVectorMap
Definition: OtherHashMaps.h:325
dqmdumpme.last
last
Definition: dqmdumpme.py:56
cmsutil::SimpleAllocHashMultiMap::nextValueItem_
ValueItem * nextValueItem_
Definition: OtherHashMaps.h:134
cmsutil::SimpleAllocHashMultiMap::map_type
SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc > map_type
Definition: OtherHashMaps.h:35
cmsutil::SimpleAllocHashMultiMap::keyEndMarker_
KeyItem * keyEndMarker_
Definition: OtherHashMaps.h:128
cmsutil::SimpleAllocHashMultiMap::KeyItem::next
KeyItem * next
Definition: OtherHashMaps.h:79
cmsutil::SimpleAllocHashMultiMap::item_iterator
Definition: OtherHashMaps.h:86
cmsutil::SimpleAllocHashMultiMap::item_iterator::reference
const typedef value_type & reference
Definition: OtherHashMaps.h:90
cmsutil::SimpleAllocHashMultiMap::item_iterator::it_
const Item * it_
Definition: OtherHashMaps.h:109
cmsutil::SimpleAllocHashMultiMap::~SimpleAllocHashMultiMap
~SimpleAllocHashMultiMap()
Definition: OtherHashMaps.h:216
cmsutil::SimpleAllocHashMultiMap::valueEndMarker_
ValueItem * valueEndMarker_
Definition: OtherHashMaps.h:134
cmsutil::SimpleAllocHashMultiMap::item_iterator::operator++
self_type & operator++()
Definition: OtherHashMaps.h:99
cmsutil::SimpleAllocHashMultiMap::bucketSize_
size_t bucketSize_
Definition: OtherHashMaps.h:121
cmsutil::SimpleAllocHashMultiMap::KeyItem::value
ValueItem * value
Definition: OtherHashMaps.h:80
trackingPlots.other
other
Definition: trackingPlots.py:1460
cmsutil::SimpleAllocHashMultiMap::ValueItem::value_type
V value_type
Definition: OtherHashMaps.h:72
cmsutil::UnsortedDumbVectorMap::begin
const_iterator begin() const
Definition: OtherHashMaps.h:333
dqmdumpme.k
k
Definition: dqmdumpme.py:60
cmsutil
Definition: OtherHashMaps.h:13
cmsutil::SimpleAllocHashMultiMap::value_ref
std::conditional< std::is_pointer< V >::value, V, V const & >::type value_ref
Definition: OtherHashMaps.h:37
cmsutil::SimpleAllocHashMultiMap::item_iterator::operator==
bool operator==(const self_type &other) const
Definition: OtherHashMaps.h:104
cmsutil::SimpleAllocHashMultiMap::item_iterator::operator*
const value_type & operator*() const
Definition: OtherHashMaps.h:97
cmsutil::UnsortedDumbVectorMap::clear
void clear()
Definition: OtherHashMaps.h:331
cmsutil::SimpleAllocHashMultiMap::keyRowSize_
size_t keyRowSize_
Definition: OtherHashMaps.h:124
cmsutil::SimpleAllocHashMultiMap::item_iterator::iterator_category
::std::forward_iterator_tag iterator_category
Definition: OtherHashMaps.h:88
cmsutil::SimpleAllocHashMultiMap::ValueItem::ValueItem
ValueItem(ValueItem *next1, value_ref val)
Definition: OtherHashMaps.h:69
cmsutil::SimpleAllocHashMultiMap::item_iterator::difference_type
ptrdiff_t difference_type
Definition: OtherHashMaps.h:92
cmsutil::UnsortedDumbVectorMap::value_type
std::pair< K, V > value_type
Definition: OtherHashMaps.h:327
cmsutil::SimpleAllocHashMultiMap::keyAlloc_
KeyItemAllocator keyAlloc_
Definition: OtherHashMaps.h:139
cmsutil::SimpleAllocHashMultiMap::keyRows_
std::list< KeyItem * > keyRows_
Definition: OtherHashMaps.h:125
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
cmsutil::UnsortedDumbVectorMap::UnsortedDumbVectorMap
UnsortedDumbVectorMap()
Definition: OtherHashMaps.h:347
cmsutil::SimpleAllocHashMultiMap::item_iterator::pointer
const typedef value_type * pointer
Definition: OtherHashMaps.h:91
cmsutil::UnsortedDumbVectorMap::iterator
std::vector< value_type >::iterator iterator
Definition: OtherHashMaps.h:329
cmsutil::SimpleAllocHashMultiMap::ValueItem::value
V value
Definition: OtherHashMaps.h:71
value
Definition: value.py:1
cmsutil::SimpleAllocHashMultiMap::values
value_iterator values(K const &key)
Definition: OtherHashMaps.h:309
cmsutil::SimpleAllocHashMultiMap::ValueItemAllocator
Alloc::template rebind< ValueItem >::other ValueItemAllocator
Definition: OtherHashMaps.h:118
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
cmsutil::UnsortedDumbVectorMap::const_iterator
std::vector< value_type >::const_iterator const_iterator
Definition: OtherHashMaps.h:328
cmsutil::SimpleAllocHashMultiMap::item_iterator::operator->
const value_type * operator->() const
Definition: OtherHashMaps.h:98
cmsutil::SimpleAllocHashMultiMap::item_iterator::value_type
const typedef Item::value_type value_type
Definition: OtherHashMaps.h:89
cmsutil::SimpleAllocHashMultiMap::value_iterator
item_iterator< ValueItem > value_iterator
Definition: OtherHashMaps.h:111
cmsutil::SimpleAllocHashMultiMap::ValueItem::next
ValueItem * next
Definition: OtherHashMaps.h:70
heppy_batch.val
val
Definition: heppy_batch.py:351
cmsutil::SimpleAllocHashMultiMap::currentKeyRow_
std::list< KeyItem * >::iterator currentKeyRow_
Definition: OtherHashMaps.h:127
cmsutil::SimpleAllocHashMultiMap::hasher_
Hasher hasher_
Definition: OtherHashMaps.h:137
cmsutil::UnsortedDumbVectorMap::end
const_iterator end() const
Definition: OtherHashMaps.h:334
cmsutil::SimpleAllocHashMultiMap::KeyItem::key
K key
Definition: OtherHashMaps.h:78
relativeConstraints.value
value
Definition: relativeConstraints.py:53
cmsutil::SimpleAllocHashMultiMap::clear
void clear(size_t newBucketSize=0)
Definition: OtherHashMaps.h:43
cmsutil::SimpleAllocHashMultiMap::KeyItem::value_type
KeyItem value_type
Definition: OtherHashMaps.h:81
cmsutil::SimpleAllocHashMultiMap::nextKeyItem_
KeyItem * nextKeyItem_
Definition: OtherHashMaps.h:128
cmsutil::UnsortedDumbVectorMap::end
iterator end()
Definition: OtherHashMaps.h:336
cmsutil::SimpleAllocHashMultiMap::KeyItem
Definition: OtherHashMaps.h:76
cmsutil::SimpleAllocHashMultiMap::KeyItemAllocator
Alloc::template rebind< KeyItem >::other KeyItemAllocator
Definition: OtherHashMaps.h:116
cmsutil::SimpleAllocHashMultiMap::eq_
Equals eq_
Definition: OtherHashMaps.h:138
cmsutil::SimpleAllocHashMultiMap::item_iterator::self_type
item_iterator< Item > self_type
Definition: OtherHashMaps.h:93
cmsutil::SimpleAllocHashMultiMap::find_or_insert_
KeyItem & find_or_insert_(K const &key)
Definition: OtherHashMaps.h:283
cmsutil::SimpleAllocHashMultiMap::insert
void insert(K const &key, value_ref value)
Definition: OtherHashMaps.h:300
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733
crabWrapper.key
key
Definition: crabWrapper.py:19
cmsutil::UnsortedDumbVectorMap::begin
iterator begin()
Definition: OtherHashMaps.h:335
cmsutil::SimpleAllocHashMultiMap::KeyItem::operator()
const value_type & operator()() const
Definition: OtherHashMaps.h:82
cmsutil::SimpleAllocHashMultiMap::bucketCapacity_
size_t bucketCapacity_
Definition: OtherHashMaps.h:121
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31
cmsutil::SimpleAllocHashMultiMap::buckets_
KeyItem ** buckets_
Definition: OtherHashMaps.h:122
cmsutil::SimpleAllocHashMultiMap::item_iterator::item_iterator
item_iterator(const Item *it)
Definition: OtherHashMaps.h:96
cmsutil::SimpleAllocHashMultiMap::valueAlloc_
ValueItemAllocator valueAlloc_
Definition: OtherHashMaps.h:140