CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

edm::ThinnedAssociation::ThinnedAssociation ( )

Definition at line 7 of file ThinnedAssociation.cc.

7 {}

Member Function Documentation

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

Definition at line 9 of file ThinnedAssociation.cc.

References indexesIntoParent_, and cuda_std::lower_bound().

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

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  }
std::vector< unsigned int > indexesIntoParent_
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::vector<unsigned int> const& edm::ThinnedAssociation::indexesIntoParent ( ) const
inline

Definition at line 21 of file ThinnedAssociation.h.

References indexesIntoParent_.

21 { return indexesIntoParent_; }
std::vector< unsigned int > indexesIntoParent_
ProductID const& edm::ThinnedAssociation::parentCollectionID ( ) const
inline
void edm::ThinnedAssociation::push_back ( unsigned int  index)
inline

Definition at line 30 of file ThinnedAssociation.h.

References indexesIntoParent_.

Referenced by edm::detail::fillCollectionForThinning().

30 { indexesIntoParent_.push_back(index); }
std::vector< unsigned int > indexesIntoParent_
void edm::ThinnedAssociation::setParentCollectionID ( ProductID const &  v)
inline
void edm::ThinnedAssociation::setThinnedCollectionID ( ProductID const &  v)
inline
ProductID const& edm::ThinnedAssociation::thinnedCollectionID ( ) const
inline

Member Data Documentation

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

Definition at line 42 of file ThinnedAssociation.h.

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

ProductID edm::ThinnedAssociation::parentCollectionID_
private

Definition at line 33 of file ThinnedAssociation.h.

Referenced by parentCollectionID(), and setParentCollectionID().

ProductID edm::ThinnedAssociation::thinnedCollectionID_
private

Definition at line 34 of file ThinnedAssociation.h.

Referenced by setThinnedCollectionID(), and thinnedCollectionID().