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
edm::BranchDescription::productInstanceName
std::string const & productInstanceName() const
Definition: BranchDescription.h:81
edm::StableProvenance::branchDescription_
std::shared_ptr< BranchDescription const > branchDescription_
Definition: StableProvenance.h:61
edm::StableProvenance::friendlyClassName
std::string const & friendlyClassName() const
Definition: StableProvenance.h:47
edm::StableProvenance::branchID
BranchID const & branchID() const
Definition: StableProvenance.h:39
edm::StableProvenance::setBranchDescription
void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
Definition: StableProvenance.h:56
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::StableProvenance::originalBranchID
BranchID const & originalBranchID() const
Definition: StableProvenance.h:40
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::StableProvenance::productInstanceName
std::string const & productInstanceName() const
Definition: StableProvenance.h:46
ReleaseVersion.h
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
ProcessHistory.h
edm::BranchDescription::processName
std::string const & processName() const
Definition: BranchDescription.h:73
edm::operator==
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition: debugging_allocator.h:72
edm::BranchID
Definition: BranchID.h:14
edm::BranchDescription::originalBranchID
BranchID const & originalBranchID() const
Definition: BranchDescription.h:77
ProductID.h
edm::StableProvenance::branchDescription
BranchDescription const & branchDescription() const
Definition: StableProvenance.h:36
edm::BranchDescription::friendlyClassName
std::string const & friendlyClassName() const
Definition: BranchDescription.h:80
edm::StableProvenance::className
std::string const & className() const
Definition: StableProvenance.h:42
edm::StableProvenance::processName
std::string const & processName() const
Definition: StableProvenance.h:45
b
double b
Definition: hdecay.h:118
edm::StableProvenance::moduleLabel
std::string const & moduleLabel() const
Definition: StableProvenance.h:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BranchDescription.h
a
double a
Definition: hdecay.h:119
edm::StableProvenance::swap
void swap(StableProvenance &)
Definition: StableProvenance.cc:27
edm::StableProvenance
Definition: StableProvenance.h:30
edm::StableProvenance::moduleName
std::string const & moduleName() const
Definition: StableProvenance.h:44
edm::StableProvenance::write
void write(std::ostream &os) const
Definition: StableProvenance.cc:18
edm::StableProvenance::setProductID
void setProductID(ProductID const &pid)
Definition: StableProvenance.h:54
edm::StableProvenance::branchName
std::string const & branchName() const
Definition: StableProvenance.h:41
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:119
edm::StableProvenance::StableProvenance
StableProvenance()
Definition: StableProvenance.cc:13
edm::StableProvenance::productID
ProductID const & productID() const
Definition: StableProvenance.h:52
edm::BranchDescription::moduleName
std::string const & moduleName() const
Definition: BranchDescription.h:115
edm::BranchDescription::moduleLabel
std::string const & moduleLabel() const
Definition: BranchDescription.h:72
edm::BranchDescription::branchAliases
std::set< std::string > const & branchAliases() const
Definition: BranchDescription.h:117
edm::StableProvenance::constBranchDescriptionPtr
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
Definition: StableProvenance.h:37
edm::BranchDescription
Definition: BranchDescription.h:32
ParameterSetID.h
edm::StableProvenance::productID_
ProductID productID_
Definition: StableProvenance.h:62
edm::BranchDescription::className
std::string const & className() const
Definition: BranchDescription.h:79
edm::StableProvenance::branchAliases
std::set< std::string > const & branchAliases() const
Definition: StableProvenance.h:48
edm::BranchDescription::branchID
BranchID const & branchID() const
Definition: BranchDescription.h:74
edm::ProductID
Definition: ProductID.h:27