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  ProcessHistory const& processHistory() const { return *processHistory_; }
52  std::set<std::string> const& branchAliases() const { return branchDescription().branchAliases(); }
53 
54  void write(std::ostream& os) const;
55 
57 
58  ProductID const& productID() const { return productID_; }
59 
60  void setProductID(ProductID const& pid) { productID_ = pid; }
61 
62  void setBranchDescription(std::shared_ptr<BranchDescription const> const& p) { branchDescription_ = p; }
63 
64  void swap(StableProvenance&);
65 
66  private:
67  std::shared_ptr<BranchDescription const> branchDescription_;
69  ProcessHistory const* processHistory_; // We don't own this
70  };
71 
72  inline std::ostream& operator<<(std::ostream& os, StableProvenance const& p) {
73  p.write(os);
74  return os;
75  }
76 
77  bool operator==(StableProvenance const& a, StableProvenance const& b);
78 
79 } // namespace edm
80 #endif
std::set< std::string > const & branchAliases() const
std::string const & branchName() const
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
std::string const & className() const
ReleaseVersion releaseVersion() const
std::string const & moduleName() const
BranchDescription const & branchDescription() const
void setProcessHistory(ProcessHistory const &ph)
void write(std::ostream &os) const
std::string const & processName() const
bool getProcessConfiguration(ProcessConfiguration &pc) const
ProcessHistory const * processHistoryPtr() const
void swap(StableProvenance &)
std::string const & productInstanceName() const
ProcessHistory const & processHistory() const
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
std::string const & className() const
std::string const & moduleLabel() const
std::string const & productInstanceName() const
std::string const & friendlyClassName() const
BranchID const & branchID() const
std::string const & moduleName() const
void setProductID(ProductID const &pid)
BranchID const & branchID() const
double b
Definition: hdecay.h:118
std::string ReleaseVersion
Definition: ReleaseVersion.h:6
std::set< std::string > const & branchAliases() const
std::string const & friendlyClassName() const
std::string const & branchName() const
HLT enums.
double a
Definition: hdecay.h:119
std::string const & processName() const
BranchID const & originalBranchID() const
ProductID const & productID() const
std::string const & moduleLabel() const
void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
BranchID const & originalBranchID() const
ProcessHistory const * processHistory_
std::shared_ptr< BranchDescription const > branchDescription_