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 
17  ProductProvenance::ProductProvenance(BranchID bid) : branchID_(bid), parentageID_() {}
18 
20  : branchID_(bid), parentageID_(std::move(edid)) {}
21 
22  ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID> const& parents)
23  : branchID_(bid), parentageID_() {
24  Parentage p;
25  p.setParents(parents);
26  parentageID_ = p.id();
28  }
29 
30  ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID>&& parents) : branchID_(bid), parentageID_() {
31  Parentage p;
32  p.setParents(std::move(parents));
33  parentageID_ = p.id();
35  }
36 
38 
41  if (p) {
42  return *p;
43  }
44  return s_emptyParentage;
45  }
46 
47  void ProductProvenance::write(std::ostream& os) const {
48  os << "branch ID = " << branchID() << '\n';
49  os << "entry description ID = " << parentageID() << '\n';
50  }
51 
53  return a.branchID() == b.branchID() && a.parentageID() == b.parentageID();
54  }
55 } // namespace edm
edm::ProductProvenance::write
void write(std::ostream &os) const
Definition: ProductProvenance.cc:47
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParentageRegistry::instance
static ParentageRegistry * instance()
Definition: ParentageRegistry.cc:5
edm::ProductProvenance::parentageID_
ParentageID parentageID_
Definition: ProductProvenance.h:47
ParentageRegistry.h
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
ProductProvenance.h
edm::BranchID
Definition: BranchID.h:14
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::ParentageRegistry::getMapped
bool getMapped(key_type const &k, value_type &result) const
Definition: ParentageRegistry.cc:10
edm::ProductProvenance::parentageID
ParentageID const & parentageID() const
Definition: ProductProvenance.h:39
edm::ParentageRegistry::insertMapped
bool insertMapped(value_type const &v)
Definition: ParentageRegistry.cc:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::ProductProvenance::parentage
Parentage const & parentage() const
Definition: ProductProvenance.cc:39
parents
TPRegexp parents
Definition: eve_filter.cc:21