CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::ThinnedAssociation Class Reference

#include <ThinnedAssociation.h>

Public Member Functions

std::optional< unsigned int > getThinnedIndex (unsigned int parentIndex) const
 
std::vector< unsigned int > const & indexesIntoParent () const
 
ProductID const & parentCollectionID () const
 
void push_back (unsigned int index)
 
void setParentCollectionID (ProductID const &v)
 
void setThinnedCollectionID (ProductID const &v)
 
 ThinnedAssociation ()
 
ProductID const & thinnedCollectionID () const
 

Private Attributes

std::vector< unsigned int > indexesIntoParent_
 
ProductID parentCollectionID_
 
ProductID thinnedCollectionID_
 

Detailed Description

Author
W. David Dagenhart, created 11 June 2014

Definition at line 15 of file ThinnedAssociation.h.

Constructor & Destructor Documentation

◆ ThinnedAssociation()

edm::ThinnedAssociation::ThinnedAssociation ( )

Definition at line 7 of file ThinnedAssociation.cc.

7 {}

Member Function Documentation

◆ getThinnedIndex()

std::optional< unsigned int > edm::ThinnedAssociation::getThinnedIndex ( unsigned int  parentIndex) const

Definition at line 9 of file ThinnedAssociation.cc.

9  {
10  auto iter = std::lower_bound(indexesIntoParent_.begin(), indexesIntoParent_.end(), parentIndex);
11  if (iter != indexesIntoParent_.end() && *iter == parentIndex) {
12  return iter - indexesIntoParent_.begin();
13  }
14  return std::nullopt;
15  }

References indexesIntoParent_, and pfDeepBoostedJetPreprocessParams_cfi::lower_bound.

Referenced by edm::detail::getThinnedProductOnSlimmingDepth(), and edm::detail::makeThinnedIndexes().

◆ indexesIntoParent()

std::vector<unsigned int> const& edm::ThinnedAssociation::indexesIntoParent ( ) const
inline

Definition at line 21 of file ThinnedAssociation.h.

21 { return indexesIntoParent_; }

References indexesIntoParent_.

◆ parentCollectionID()

ProductID const& edm::ThinnedAssociation::parentCollectionID ( ) const
inline

◆ push_back()

void edm::ThinnedAssociation::push_back ( unsigned int  index)
inline

Definition at line 30 of file ThinnedAssociation.h.

30 { indexesIntoParent_.push_back(index); }

References indexesIntoParent_.

◆ setParentCollectionID()

void edm::ThinnedAssociation::setParentCollectionID ( ProductID const &  v)
inline

◆ setThinnedCollectionID()

void edm::ThinnedAssociation::setThinnedCollectionID ( ProductID const &  v)
inline

◆ thinnedCollectionID()

ProductID const& edm::ThinnedAssociation::thinnedCollectionID ( ) const
inline

Member Data Documentation

◆ indexesIntoParent_

std::vector<unsigned int> edm::ThinnedAssociation::indexesIntoParent_
private

Definition at line 42 of file ThinnedAssociation.h.

Referenced by getThinnedIndex(), indexesIntoParent(), and push_back().

◆ parentCollectionID_

ProductID edm::ThinnedAssociation::parentCollectionID_
private

Definition at line 33 of file ThinnedAssociation.h.

Referenced by parentCollectionID(), and setParentCollectionID().

◆ thinnedCollectionID_

ProductID edm::ThinnedAssociation::thinnedCollectionID_
private

Definition at line 34 of file ThinnedAssociation.h.

Referenced by setThinnedCollectionID(), and thinnedCollectionID().

findQualityFiles.v
v
Definition: findQualityFiles.py:179
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
edm::ThinnedAssociation::indexesIntoParent_
std::vector< unsigned int > indexesIntoParent_
Definition: ThinnedAssociation.h:42
edm::ThinnedAssociation::thinnedCollectionID_
ProductID thinnedCollectionID_
Definition: ThinnedAssociation.h:34
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::ThinnedAssociation::parentCollectionID_
ProductID parentCollectionID_
Definition: ThinnedAssociation.h:33