CMS 3D CMS Logo

ProductProvenance.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_ProductProvenance_h
2 #define DataFormats_Provenance_ProductProvenance_h
3 
4 /*----------------------------------------------------------------------
5 
6 ProductProvenance: The event dependent portion of the description of a product
7 and how it came into existence.
8 
9 ----------------------------------------------------------------------*/
13 
14 #include <memory>
15 
16 #include <iosfwd>
17 #include <vector>
18 
19 /*
20  ProductProvenance
21 */
22 
23 namespace edm {
25  public:
27  explicit ProductProvenance(BranchID const& bid);
28  ProductProvenance(BranchID const& bid,
29  ParentageID const& id);
30 
31  ProductProvenance(BranchID const& bid,
32  std::vector<BranchID> const& parents);
33 
34  ProductProvenance(BranchID const& bid,
35  std::vector<BranchID>&& parents);
36 
38 
40 
41  void write(std::ostream& os) const;
42 
43  BranchID const& branchID() const {return branchID_;}
44  ParentageID const& parentageID() const {return parentageID_;}
45  Parentage const& parentage() const;
46 
47  private:
48 
51  };
52 
53  inline
54  bool
56  return a.branchID() < b.branchID();
57  }
58 
59  inline
60  std::ostream&
61  operator<<(std::ostream& os, ProductProvenance const& p) {
62  p.write(os);
63  return os;
64  }
65 
66  // Only the 'salient attributes' are testing in equality comparison.
67  bool operator==(ProductProvenance const& a, ProductProvenance const& b);
68  inline bool operator!=(ProductProvenance const& a, ProductProvenance const& b) { return !(a == b); }
69  typedef std::vector<ProductProvenance> ProductProvenanceVector;
70 }
71 #endif
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:90
BranchID const & branchID() const
TPRegexp parents
Definition: eve_filter.cc:21
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void write(std::ostream &os) const
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
std::vector< ProductProvenance > ProductProvenanceVector
ProductProvenance makeProductProvenance() const
double b
Definition: hdecay.h:120
ParentageID const & parentageID() const
HLT enums.
double a
Definition: hdecay.h:121
Parentage const & parentage() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.