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  void set(ParentageID id) { parentageID_ = std::move(id); }
44 
45  private:
48  };
49 
50  inline bool operator<(ProductProvenance const& a, ProductProvenance const& b) { return a.branchID() < b.branchID(); }
51 
52  inline std::ostream& operator<<(std::ostream& os, ProductProvenance const& p) {
53  p.write(os);
54  return os;
55  }
56 
57  // Only the 'salient attributes' are testing in equality comparison.
58  bool operator==(ProductProvenance const& a, ProductProvenance const& b);
59  inline bool operator!=(ProductProvenance const& a, ProductProvenance const& b) { return !(a == b); }
60  typedef std::vector<ProductProvenance> ProductProvenanceVector;
61 } // namespace edm
62 #endif
ProvenanceFwd.h
edm::ProductProvenance::write
void write(std::ostream &os) const
Definition: ProductProvenance.cc:47
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProductProvenance::moveParentageID
ParentageID moveParentageID()
Definition: ProductProvenance.h:43
BranchID.h
edm::ProductProvenance::parentageID_
ParentageID parentageID_
Definition: ProductProvenance.h:47
ParentageID.h
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
edm::operator!=
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition: debugging_allocator.h:75
edm::ProductProvenance
Definition: ProductProvenance.h:24
edm::ProductProvenance::makeProductProvenance
ProductProvenance makeProductProvenance() const
Definition: ProductProvenance.cc:37
edm::operator==
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition: debugging_allocator.h:72
edm::BranchID
Definition: BranchID.h:14
edm::ProductProvenance::set
void set(ParentageID id)
Definition: ProductProvenance.h:42
edm::operator<
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:89
edm::ProductProvenance::branchID
BranchID const & branchID() const
Definition: ProductProvenance.h:38
edm::Hash< ParentageType >
b
double b
Definition: hdecay.h:118
edm::ProductProvenance::ProductProvenance
ProductProvenance()
Definition: ProductProvenance.cc:15
edm::Parentage
Definition: Parentage.h:25
a
double a
Definition: hdecay.h:119
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ProductProvenanceVector
std::vector< ProductProvenance > ProductProvenanceVector
Definition: ProductProvenance.h:60
edm::ProductProvenance::parentageID
ParentageID const & parentageID() const
Definition: ProductProvenance.h:39
edm::ProductProvenance::branchID_
BranchID branchID_
Definition: ProductProvenance.h:46
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ProductProvenance::parentage
Parentage const & parentage() const
Definition: ProductProvenance.cc:39
parents
TPRegexp parents
Definition: eve_filter.cc:21