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();}
44  std::string const& moduleName() const {return branchDescription().moduleName();}
48  ProcessHistory const& processHistory() const {return *processHistory_;}
51  std::set<std::string> const& branchAliases() const {return branchDescription().branchAliases();}
52 
53  void write(std::ostream& os) const;
54 
56 
57  ProductID const& productID() const {return productID_;}
58 
59  void setProductID(ProductID const& pid) {
60  productID_ = pid;
61  }
62 
63  void setBranchDescription(std::shared_ptr<BranchDescription const> const& p) {
65  }
66 
67  void swap(StableProvenance&);
68 
69  private:
70  std::shared_ptr<BranchDescription const> branchDescription_;
72  ProcessHistory const* processHistory_; // We don't own this
73  };
74 
75  inline
76  std::ostream&
77  operator<<(std::ostream& os, StableProvenance const& p) {
78  p.write(os);
79  return os;
80  }
81 
82  bool operator==(StableProvenance const& a, StableProvenance const& b);
83 
84 }
85 #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
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:120
std::string ReleaseVersion
Definition: ReleaseVersion.h:7
std::set< std::string > const & branchAliases() const
std::string const & friendlyClassName() const
std::string const & branchName() const
HLT enums.
double a
Definition: hdecay.h:121
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_