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 {
16  branchID_(),
17  parentageID_()
18  {}
19 
21  branchID_(std::move(bid)),
22  parentageID_()
23  {}
24 
26  ParentageID edid) :
27  branchID_(std::move(bid)),
28  parentageID_(std::move(edid))
29  {}
30 
32  std::vector<BranchID> const& parents) :
33  branchID_(std::move(bid)),
34  parentageID_() {
35  Parentage p;
36  p.setParents(parents);
37  parentageID_ = p.id();
39  }
40 
42  std::vector<BranchID>&& parents) :
43  branchID_(std::move(bid)),
44  parentageID_() {
45  Parentage p;
47  parentageID_ = p.id();
49  }
50 
53  return *this;
54  }
55 
56  Parentage const &
59  if(p) {
60  return *p;
61  }
62  return s_emptyParentage;
63  }
64 
65  void
66  ProductProvenance::write(std::ostream& os) const {
67  os << "branch ID = " << branchID() << '\n';
68  os << "entry description ID = " << parentageID() << '\n';
69  }
70 
71  bool
73  return
74  a.branchID() == b.branchID() && a.parentageID() == b.parentageID();
75  }
76 }
BranchID const & branchID() const
TPRegexp parents
Definition: eve_filter.cc:21
ParentageID id() const
Definition: Parentage.cc:23
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:120
ParentageID const & parentageID() const
HLT enums.
double a
Definition: hdecay.h:121
Parentage const & parentage() const
static ParentageRegistry * instance()
bool insertMapped(value_type const &v)
def move(src, dest)
Definition: eostools.py:511