CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientProductLookupMap.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_TransientProductLookupMap_h
2 #define DataFormats_Provenance_TransientProductLookupMap_h
3 // -*- C++ -*-
4 //
5 // Package: Provenance
6 // Class : TransientProductLookupMap
7 //
25 //
26 // Original Author: Chris Jones
27 // Created: Fri May 1 11:15:08 CDT 2009
28 //
29 
30 // system include files
31 #include <map>
32 #include <vector>
33 
34 // user include files
39 
40 // forward declarations
41 namespace edm {
42  class ProcessHistory;
43 
45  bool operator()(std::pair<TypeInBranchType, ConstBranchDescription const*> const& iLHS,
46  std::pair<TypeInBranchType, ConstBranchDescription const*> const& iRHS) const;
47  };
48 
50 
51  public:
52  typedef std::vector<std::pair<TypeInBranchType, BranchDescriptionIndex> > TypeInBranchTypeLookup;
53  typedef std::vector<ProductLookupIndex> ProductLookupIndexList;
54 
55  typedef ProductLookupIndexList::const_iterator const_iterator;
56 
57  typedef std::map<std::pair<TypeInBranchType, ConstBranchDescription const*>,
60 
62 
63  void reset();
64 
65  // ---------- const member functions ---------------------
66 
68  std::pair<const_iterator, const_iterator> equal_range(TypeInBranchType const&) const;
69 
72  std::pair<const_iterator, const_iterator> equal_range(TypeInBranchType const&,
73  std::string const&,
74  std::string const&) const;
75 
76  // ---------- static member functions --------------------
77 
78  // ---------- member functions ---------------------------
79 
81  void reorderIfNecessary(BranchType, ProcessHistory const&, std::string const& iNewProcessName);
82 
83  void fillFrom(FillFromMap const&);
84 
85  const_iterator begin() const {return productLookupIndexList_.begin();}
86 
87  const_iterator end() const {return productLookupIndexList_.end();}
88 
89  int fillCount() const {return fillCount_;}
90 
91  private:
92  // ---------- member data --------------------------------
95  std::vector<ProcessHistoryID> historyIDsForBranchType_;
96  std::vector<std::vector<std::string> > processNameOrderingForBranchType_;
98  };
99 
100 }
101 
102 #endif
void reorderIfNecessary(BranchType, ProcessHistory const &, std::string const &iNewProcessName)
reorders the ProductLookupIndexes for the BranchType based on the processing ordering ...
ProductLookupIndexList productLookupIndexList_
unsigned int ProductTransientIndex
BranchType
Definition: BranchType.h:11
ProductLookupIndexList::const_iterator const_iterator
std::vector< ProcessHistoryID > historyIDsForBranchType_
std::vector< ProductLookupIndex > ProductLookupIndexList
std::vector< std::vector< std::string > > processNameOrderingForBranchType_
bool operator()(std::pair< TypeInBranchType, ConstBranchDescription const * > const &iLHS, std::pair< TypeInBranchType, ConstBranchDescription const * > const &iRHS) const
std::pair< const_iterator, const_iterator > equal_range(TypeInBranchType const &) const
returns a pair of iterators that define the range for items matching the TypeInBranchType ...
std::map< std::pair< TypeInBranchType, ConstBranchDescription const * >, ProductTransientIndex, CompareTypeInBranchTypeConstBranchDescription > FillFromMap
std::vector< std::pair< TypeInBranchType, BranchDescriptionIndex > > TypeInBranchTypeLookup