CMS 3D CMS Logo

CountBits.h
Go to the documentation of this file.
1 namespace {
2 
3  template <int INDEX>
4  struct CountBits {
5  static const unsigned int value = INDEX % 2 + CountBits<(INDEX >> 1)>::value;
6  };
7 
8  template <>
9  struct CountBits<0> {
10  static const unsigned int value = 0;
11  };
12 } // namespace
13 
14 static const unsigned int s_refsBefore[] = {CountBits<0>::value,
4622 
4623 };
4624 
4632  kRefV0Bit = 0x40,
4635  kRefPhotonBit = 0x200,
4639 };
4654 };
4655 
4656 #define GETREF(_class_, _mask_, _bit_) \
4657  edm::ProductID prodID; \
4658  size_t index, aIndex; \
4659  typedef edm::Ref<std::vector<_class_> > RefType; \
4660  if (getRefInfo(_mask_, _bit_, prodID, index, aIndex)) { \
4661  if (refsCollectionCache_.size() == 0 || refsCollectionCache_[aIndex] == 0) \
4662  return RefType(prodID, index, getter_); \
4663  else { \
4664  _class_ const* t = reinterpret_cast<_class_ const*>(refsCollectionCache_[aIndex]); \
4665  return RefType(prodID, t, index); \
4666  } \
4667  } \
4668  return RefType()
PFRefBits
Definition: CountBits.h:4625
Definition: value.py:1
PFRefMasks
Definition: CountBits.h:4640
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14