CMS 3D CMS Logo

Provenance.cc
Go to the documentation of this file.
2 
9 
10 #include <algorithm>
11 #include <cassert>
12 
13 /*----------------------------------------------------------------------
14 
15 ----------------------------------------------------------------------*/
16 
17 namespace edm {
18 
20  }
21 
22  Provenance::Provenance(std::shared_ptr<BranchDescription const> const& p, ProductID const& pid) :
23  stableProvenance_(p, pid),
24  store_(),
26  }
27 
29  stableProvenance_(stable),
30  store_(),
32  }
33 
34  ProductProvenance const*
36  if(!store_) {
37  return nullptr;
38  }
40  }
41 
42  bool
44  if (mergeableRunProductMetadata_ && branchDescription().isMergeable()) {
45  // This part handles the cases where the product is
46  // a mergeable run product from the input.
48  }
49  // All other cases
50  return false;
51  }
52 
53  void
54  Provenance::write(std::ostream& os) const {
55  // This is grossly inadequate, but it is not critical for the
56  // first pass.
57  stable().write(os);
58  auto pp = productProvenance();
59  if (pp != nullptr) {
60  pp->write(os);
61  }
62  }
63 
64  bool operator==(Provenance const& a, Provenance const& b) {
65  return a.stable() == b.stable();
66  }
67 
68 
69  void
72  std::swap(store_,iOther.store_);
74  }
75 }
virtual bool knownImproperlyMerged(std::string const &processThatCreatedProduct) const =0
StableProvenance const & stable() const
Definition: Provenance.h:42
void write(std::ostream &os) const
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:35
std::string const & processName() const
Definition: Provenance.h:55
void write(std::ostream &os) const
Definition: Provenance.cc:54
ProductProvenanceRetriever const * store_
Definition: Provenance.h:97
void swap(StableProvenance &)
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
BranchID const & originalBranchID() const
Definition: Provenance.h:75
StableProvenance stableProvenance_
Definition: Provenance.h:96
BranchDescription const & branchDescription() const
Definition: Provenance.h:45
double b
Definition: hdecay.h:120
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:98
HLT enums.
double a
Definition: hdecay.h:121
ProductProvenance const * branchIDToProvenance(BranchID const &bid) const
bool knownImproperlyMerged() const
Definition: Provenance.cc:43
void swap(Provenance &)
Definition: Provenance.cc:70