CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ThinnedAssociation.cc
Go to the documentation of this file.
2 
3 #include <algorithm>
4 
5 namespace edm {
6 
8  }
9 
10  bool
11  ThinnedAssociation::hasParentIndex(unsigned int parentIndex,
12  unsigned int& thinnedIndex) const {
13  auto iter = std::lower_bound(indexesIntoParent_.begin(), indexesIntoParent_.end(), parentIndex);
14  if(iter != indexesIntoParent_.end() && *iter == parentIndex) {
15  thinnedIndex = iter - indexesIntoParent_.begin();
16  return true;
17  }
18  return false;
19  }
20 }
std::vector< unsigned int > indexesIntoParent_
bool hasParentIndex(unsigned int parentIndex, unsigned int &thinnedIndex) const