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_.empty() || 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()
kRefPFPhotonExtraMask
Definition: CountBits.h:4651
kRefV0Bit
Definition: CountBits.h:4632
kRefConversionMask
Definition: CountBits.h:4646
kRefV0Mask
Definition: CountBits.h:4647
kRefSuperClusterBit
Definition: CountBits.h:4637
kRefDisplacedVertexDauBit
Definition: CountBits.h:4629
kRefDisplacedVertexDauMask
Definition: CountBits.h:4644
kRefPFElectronExtraMask
Definition: CountBits.h:4649
PFRefMasks
PFRefMasks
Definition: CountBits.h:4640
kRefDisplacedVertexMotBit
Definition: CountBits.h:4630
kRefConversionBit
Definition: CountBits.h:4631
kRefTrackMask
Definition: CountBits.h:4641
s_refsBefore
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14
kRefPFEGammaExtraMask
Definition: CountBits.h:4653
kRefPFElectronExtraBit
Definition: CountBits.h:4634
kRefTrackBit
Definition: CountBits.h:4626
kRefGsfElectronMask
Definition: CountBits.h:4648
value
Definition: value.py:1
kRefPhotonMask
Definition: CountBits.h:4650
kRefSuperClusterMask
Definition: CountBits.h:4652
kRefGsfTrackMask
Definition: CountBits.h:4642
PFRefBits
PFRefBits
Definition: CountBits.h:4625
kRefPFPhotonExtraBit
Definition: CountBits.h:4636
kRefMuonMask
Definition: CountBits.h:4643
relativeConstraints.value
value
Definition: relativeConstraints.py:53
kRefPhotonBit
Definition: CountBits.h:4635
kRefDisplacedVertexMotMask
Definition: CountBits.h:4645
kRefMuonBit
Definition: CountBits.h:4628
kRefGsfTrackBit
Definition: CountBits.h:4627
kRefPFEGammaExtraBit
Definition: CountBits.h:4638
kRefGsfElectronBit
Definition: CountBits.h:4633