DataFormats
Common
src
ThinnedAssociation.cc
Go to the documentation of this file.
1
#include "
DataFormats/Common/interface/ThinnedAssociation.h
"
2
3
#include <algorithm>
4
5
namespace
edm
{
6
7
ThinnedAssociation::ThinnedAssociation
() {}
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
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ThinnedAssociation::ThinnedAssociation
ThinnedAssociation()
Definition:
ThinnedAssociation.cc:7
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition:
cudastdAlgorithm.h:27
edm::ThinnedAssociation::hasParentIndex
bool hasParentIndex(unsigned int parentIndex, unsigned int &thinnedIndex) const
Definition:
ThinnedAssociation.cc:9
edm::ThinnedAssociation::indexesIntoParent_
std::vector< unsigned int > indexesIntoParent_
Definition:
ThinnedAssociation.h:38
ThinnedAssociation.h
Generated for CMSSW Reference Manual by
1.8.16