CMS 3D CMS Logo

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

#include <ThinnedAssociation.h>

Public Member Functions

bool hasParentIndex (unsigned int parentIndex, unsigned int &thinnedIndex) 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 14 of file ThinnedAssociation.h.

Constructor & Destructor Documentation

edm::ThinnedAssociation::ThinnedAssociation ( )

Definition at line 7 of file ThinnedAssociation.cc.

7  {
8  }

Member Function Documentation

bool edm::ThinnedAssociation::hasParentIndex ( unsigned int  parentIndex,
unsigned int &  thinnedIndex 
) const

Definition at line 11 of file ThinnedAssociation.cc.

References indexesIntoParent_.

Referenced by BareRootProductGetter::getThinnedProduct(), fwlite::DataGetterHelper::getThinnedProduct(), edm::EventPrincipal::getThinnedProduct(), BareRootProductGetter::getThinnedProducts(), fwlite::DataGetterHelper::getThinnedProducts(), edm::EventPrincipal::getThinnedProducts(), and indexesIntoParent().

12  {
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  }
std::vector< unsigned int > indexesIntoParent_
std::vector<unsigned int> const& edm::ThinnedAssociation::indexesIntoParent ( ) const
inline

Definition at line 21 of file ThinnedAssociation.h.

References hasParentIndex(), and 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
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 40 of file ThinnedAssociation.h.

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

ProductID edm::ThinnedAssociation::parentCollectionID_
private

Definition at line 31 of file ThinnedAssociation.h.

Referenced by parentCollectionID(), and setParentCollectionID().

ProductID edm::ThinnedAssociation::thinnedCollectionID_
private

Definition at line 32 of file ThinnedAssociation.h.

Referenced by setThinnedCollectionID(), and thinnedCollectionID().