test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ThinnedAssociation.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_ThinnedAssociation_h
2 #define DataFormats_Common_ThinnedAssociation_h
3 
9 
10 #include <vector>
11 
12 namespace edm {
13 
15  public:
16 
18 
21  std::vector<unsigned int> const& indexesIntoParent() const { return indexesIntoParent_; }
22 
23  bool hasParentIndex(unsigned int parentIndex, unsigned int& thinnedIndex) const;
24 
27  void push_back(unsigned int index) { indexesIntoParent_.push_back(index); }
28 
29  private:
30 
33 
34  // The size of indexesIntoParent_ is the same as
35  // the size of the thinned collection and each
36  // element of indexesIntoParent corresponds to the
37  // element of the thinned collection at the same position.
38  // The values give the index of the corresponding element
39  // in the parent collection.
40  std::vector<unsigned int> indexesIntoParent_;
41  };
42 }
43 #endif
void setThinnedCollectionID(ProductID const &v)
std::vector< unsigned int > const & indexesIntoParent() const
std::vector< unsigned int > indexesIntoParent_
ProductID const & thinnedCollectionID() const
void push_back(unsigned int index)
void setParentCollectionID(ProductID const &v)
ProductID const & parentCollectionID() const
bool hasParentIndex(unsigned int parentIndex, unsigned int &thinnedIndex) const