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_;}
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) {
61  productID_ = pid;
62  }
63 
64  void setBranchDescription(std::shared_ptr<BranchDescription const> const& p) {
66  }
67 
68  void swap(StableProvenance&);
69 
70  private:
71  std::shared_ptr<BranchDescription const> branchDescription_;
73  ProcessHistory const* processHistory_; // We don't own this
74  };
75 
76  inline
77  std::ostream&
78  operator<<(std::ostream& os, StableProvenance const& p) {
79  p.write(os);
80  return os;
81  }
82 
83  bool operator==(StableProvenance const& a, StableProvenance const& b);
84 
85 }
86 #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: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_