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 
30  ProductProvenance(BranchID bid, std::vector<BranchID> const& parents);
31 
32  ProductProvenance(BranchID bid, std::vector<BranchID>&& parents);
33 
35 
36  void write(std::ostream& os) const;
37 
38  BranchID const& branchID() const { return branchID_; }
39  ParentageID const& parentageID() const { return parentageID_; }
40  Parentage const& parentage() const;
41 
42  private:
45  };
46 
47  inline bool operator<(ProductProvenance const& a, ProductProvenance const& b) { return a.branchID() < b.branchID(); }
48 
49  inline std::ostream& operator<<(std::ostream& os, ProductProvenance const& p) {
50  p.write(os);
51  return os;
52  }
53 
54  // Only the 'salient attributes' are testing in equality comparison.
55  bool operator==(ProductProvenance const& a, ProductProvenance const& b);
56  inline bool operator!=(ProductProvenance const& a, ProductProvenance const& b) { return !(a == b); }
57  typedef std::vector<ProductProvenance> ProductProvenanceVector;
58 } // namespace edm
59 #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:118
ParentageID const & parentageID() const
HLT enums.
double a
Definition: hdecay.h:119
Parentage const & parentage() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.