CMS 3D CMS Logo

ProductProvenance.cc
Go to the documentation of this file.
3 
4 #include <cassert>
5 #include <ostream>
6 
7 /*----------------------------------------------------------------------
8 
9 ----------------------------------------------------------------------*/
10 
11 namespace {
12  edm::Parentage const s_emptyParentage;
13 }
14 namespace edm {
15  ProductProvenance::ProductProvenance() : branchID_(), parentageID_() {}
16 
18 
20  : branchID_(std::move(bid)), parentageID_(std::move(edid)) {}
21 
22  ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID> const& parents)
23  : branchID_(std::move(bid)), parentageID_() {
24  Parentage p;
25  p.setParents(parents);
26  parentageID_ = p.id();
28  }
29 
31  : branchID_(std::move(bid)), parentageID_() {
32  Parentage p;
34  parentageID_ = p.id();
36  }
37 
39 
42  if (p) {
43  return *p;
44  }
45  return s_emptyParentage;
46  }
47 
48  void ProductProvenance::write(std::ostream& os) const {
49  os << "branch ID = " << branchID() << '\n';
50  os << "entry description ID = " << parentageID() << '\n';
51  }
52 
54  return a.branchID() == b.branchID() && a.parentageID() == b.parentageID();
55  }
56 } // namespace edm
BranchID const & branchID() const
TPRegexp parents
Definition: eve_filter.cc:21
ParentageID id() const
Definition: Parentage.cc:17
void setParents(std::vector< BranchID > const &parents)
Definition: Parentage.h:46
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
void write(std::ostream &os) const
bool getMapped(key_type const &k, value_type &result) const
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
static ParentageRegistry * instance()
bool insertMapped(value_type const &v)
def move(src, dest)
Definition: eostools.py:511