CMS 3D CMS Logo

ThinnedAssociation.cc
Go to the documentation of this file.
2 
3 #include <algorithm>
4 
5 namespace edm {
6 
8 
9  bool ThinnedAssociation::hasParentIndex(unsigned int parentIndex, unsigned int& thinnedIndex) const {
10  auto iter = std::lower_bound(indexesIntoParent_.begin(), indexesIntoParent_.end(), parentIndex);
11  if (iter != indexesIntoParent_.end() && *iter == parentIndex) {
12  thinnedIndex = iter - indexesIntoParent_.begin();
13  return true;
14  }
15  return false;
16  }
17 } // namespace edm
std::vector< unsigned int > indexesIntoParent_
HLT enums.
bool hasParentIndex(unsigned int parentIndex, unsigned int &thinnedIndex) const