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 bid);
29  ParentageID id);
30 
32  std::vector<BranchID> const& parents);
33 
35  std::vector<BranchID>&& parents);
36 
38 
39  void write(std::ostream& os) const;
40 
41  BranchID const& branchID() const {return branchID_;}
42  ParentageID const& parentageID() const {return parentageID_;}
43  Parentage const& parentage() const;
44 
45  private:
46 
49  };
50 
51  inline
52  bool
54  return a.branchID() < b.branchID();
55  }
56 
57  inline
58  std::ostream&
59  operator<<(std::ostream& os, ProductProvenance const& p) {
60  p.write(os);
61  return os;
62  }
63 
64  // Only the 'salient attributes' are testing in equality comparison.
65  bool operator==(ProductProvenance const& a, ProductProvenance const& b);
66  inline bool operator!=(ProductProvenance const& a, ProductProvenance const& b) { return !(a == b); }
67  typedef std::vector<ProductProvenance> ProductProvenanceVector;
68 }
69 #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 &) noexcept
void write(std::ostream &os) const
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
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.