CMS 3D CMS Logo

StableProvenance.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_StableProvenance_h
2 #define DataFormats_Provenance_StableProvenance_h
3 
4 /*----------------------------------------------------------------------
5 
6 StableProvenance: The full description of a product, excluding the parentage.
7 The parentage can change from event to event.
8 
9 ----------------------------------------------------------------------*/
10 
16 
17 #include <memory>
18 
19 #include <iosfwd>
20 /*
21  StableProvenance
22 
23  definitions:
24  Product: The EDProduct to which a provenance object is associated
25 
26  Creator: The EDProducer that made the product.
27 */
28 
29 namespace edm {
31  public:
33 
34  StableProvenance(std::shared_ptr<BranchDescription const> const& p, ProductID const& pid);
35 
37  std::shared_ptr<BranchDescription const> const& constBranchDescriptionPtr() const { return branchDescription_; }
38 
39  BranchID const& branchID() const { return branchDescription().branchID(); }
41  std::string const& branchName() const { return branchDescription().branchName(); }
42  std::string const& className() const { return branchDescription().className(); }
43  std::string const& moduleLabel() const { return branchDescription().moduleLabel(); }
44  std::string const& moduleName() const { return branchDescription().moduleName(); }
45  std::string const& processName() const { return branchDescription().processName(); }
48  std::set<std::string> const& branchAliases() const { return branchDescription().branchAliases(); }
49 
50  void write(std::ostream& os) const;
51 
52  ProductID const& productID() const { return productID_; }
53 
54  void setProductID(ProductID const& pid) { productID_ = pid; }
55 
56  void setBranchDescription(std::shared_ptr<BranchDescription const> const& p) { branchDescription_ = p; }
57 
58  void swap(StableProvenance&);
59 
60  private:
61  std::shared_ptr<BranchDescription const> branchDescription_;
63  };
64 
65  inline std::ostream& operator<<(std::ostream& os, StableProvenance const& p) {
66  p.write(os);
67  return os;
68  }
69 
70  bool operator==(StableProvenance const& a, StableProvenance const& b);
71 
72 } // namespace edm
73 #endif
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::set< std::string > const & branchAliases() const
BranchID const & branchID() const
void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
BranchID const & branchID() const
std::string const & productInstanceName() const
BranchID const & originalBranchID() const
std::string const & moduleName() const
std::string const & processName() const
std::string const & friendlyClassName() const
BranchDescription const & branchDescription() const
void swap(StableProvenance &)
std::string const & className() const
std::string const & branchName() const
std::string const & moduleLabel() const
void write(std::ostream &os) const
std::string const & productInstanceName() const
std::string const & processName() const
std::string const & className() const
void setProductID(ProductID const &pid)
std::string const & branchName() const
double b
Definition: hdecay.h:120
std::string const & moduleName() const
HLT enums.
double a
Definition: hdecay.h:121
ProductID const & productID() const
std::string const & friendlyClassName() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.
std::string const & moduleLabel() const
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
std::set< std::string > const & branchAliases() const
BranchID const & originalBranchID() const
std::shared_ptr< BranchDescription const > branchDescription_