CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::Provenance Class Reference

#include <Provenance.h>

Public Member Functions

std::set< std::string > const & branchAliases () const
 
BranchDescription const & branchDescription () const
 
BranchID const & branchID () const
 
std::string const & branchName () const
 
std::string const & className () const
 
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr () const
 
std::string const & friendlyClassName () const
 
bool getProcessConfiguration (ProcessConfiguration &pc) const
 
bool knownImproperlyMerged () const
 
std::string const & moduleLabel () const
 
std::string const & moduleName () const
 
BranchID const & originalBranchID () const
 
ProcessHistory const & processHistory () const
 
ProcessHistory const * processHistoryPtr () const
 
std::string const & processName () const
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenance const * productProvenance () const
 
 Provenance ()
 
 Provenance (std::shared_ptr< BranchDescription const > const &p, ProductID const &pid)
 
 Provenance (StableProvenance const &)
 
ReleaseVersion releaseVersion () const
 
void setBranchDescription (std::shared_ptr< BranchDescription const > const &p)
 
void setMergeableRunProductMetadata (MergeableRunProductMetadataBase const *mrpm)
 
void setProcessHistory (ProcessHistory const &ph)
 
void setProductID (ProductID const &pid)
 
void setStore (ProductProvenanceRetriever const *store)
 
StableProvenance const & stable () const
 
StableProvenancestable ()
 
ProductProvenanceRetriever const * store () const
 
void swap (Provenance &)
 
void write (std::ostream &os) const
 

Private Attributes

MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
 
StableProvenance stableProvenance_
 
ProductProvenanceRetriever const * store_
 

Detailed Description

Definition at line 34 of file Provenance.h.

Constructor & Destructor Documentation

edm::Provenance::Provenance ( )

Definition at line 19 of file Provenance.cc.

19 : Provenance{StableProvenance()} {}
edm::Provenance::Provenance ( std::shared_ptr< BranchDescription const > const &  p,
ProductID const &  pid 
)

Definition at line 21 of file Provenance.cc.

ProductProvenanceRetriever const * store_
Definition: Provenance.h:99
StableProvenance stableProvenance_
Definition: Provenance.h:98
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:100
edm::Provenance::Provenance ( StableProvenance const &  stable)

Definition at line 24 of file Provenance.cc.

StableProvenance const & stable() const
Definition: Provenance.h:42
ProductProvenanceRetriever const * store_
Definition: Provenance.h:99
StableProvenance stableProvenance_
Definition: Provenance.h:98
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:100

Member Function Documentation

std::set<std::string> const& edm::Provenance::branchAliases ( ) const
inline

Definition at line 65 of file Provenance.h.

References edm::StableProvenance::branchAliases(), and stable().

65 { return stable().branchAliases(); }
std::set< std::string > const & branchAliases() const
StableProvenance const & stable() const
Definition: Provenance.h:42
BranchDescription const& edm::Provenance::branchDescription ( ) const
inline
BranchID const& edm::Provenance::branchID ( ) const
inline

Definition at line 52 of file Provenance.h.

References edm::StableProvenance::branchID(), and stable().

52 { return stable().branchID(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
BranchID const & branchID() const
std::string const& edm::Provenance::branchName ( ) const
inline

Definition at line 53 of file Provenance.h.

References edm::StableProvenance::branchName(), and stable().

Referenced by HLTJetTag< T >::hltFilter(), and HLTJetTagWithMatching< T >::hltFilter().

53 { return stable().branchName(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
std::string const & branchName() const
std::string const& edm::Provenance::className ( ) const
inline

Definition at line 54 of file Provenance.h.

References edm::StableProvenance::className(), and stable().

54 { return stable().className(); }
std::string const & className() const
StableProvenance const & stable() const
Definition: Provenance.h:42
std::shared_ptr<BranchDescription const> const& edm::Provenance::constBranchDescriptionPtr ( ) const
inline

Definition at line 46 of file Provenance.h.

References edm::StableProvenance::constBranchDescriptionPtr(), knownImproperlyMerged(), productProvenance(), and stable().

Referenced by edm::ProductData::branchDescription(), and edm::getProducerParameterSet().

46  {
48  }
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
StableProvenance const & stable() const
Definition: Provenance.h:42
std::string const& edm::Provenance::friendlyClassName ( ) const
inline

Definition at line 59 of file Provenance.h.

References edm::StableProvenance::friendlyClassName(), and stable().

Referenced by OniaVtxReProducer::OniaVtxReProducer().

59 { return stable().friendlyClassName(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
std::string const & friendlyClassName() const
bool edm::Provenance::getProcessConfiguration ( ProcessConfiguration pc) const
inline

Definition at line 63 of file Provenance.h.

References edm::StableProvenance::getProcessConfiguration(), and stable().

Referenced by edm::parameterSet().

63 { return stable().getProcessConfiguration(pc); }
StableProvenance const & stable() const
Definition: Provenance.h:42
bool getProcessConfiguration(ProcessConfiguration &pc) const
bool edm::Provenance::knownImproperlyMerged ( ) const

Definition at line 34 of file Provenance.cc.

References branchDescription(), edm::MergeableRunProductMetadataBase::knownImproperlyMerged(), mergeableRunProductMetadata_, and processName().

Referenced by constBranchDescriptionPtr().

34  {
35  if (mergeableRunProductMetadata_ && branchDescription().isMergeable()) {
36  // This part handles the cases where the product is
37  // a mergeable run product from the input.
39  }
40  // All other cases
41  return false;
42  }
virtual bool knownImproperlyMerged(std::string const &processThatCreatedProduct) const =0
std::string const & processName() const
Definition: Provenance.h:57
BranchDescription const & branchDescription() const
Definition: Provenance.h:45
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:100
std::string const& edm::Provenance::moduleLabel ( ) const
inline
std::string const& edm::Provenance::moduleName ( ) const
inline

Definition at line 56 of file Provenance.h.

References edm::StableProvenance::moduleName(), and stable().

56 { return stable().moduleName(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
std::string const & moduleName() const
BranchID const& edm::Provenance::originalBranchID ( ) const
inline

Definition at line 77 of file Provenance.h.

References edm::StableProvenance::originalBranchID(), stable(), and write().

Referenced by edm::Event::addToGotBranchIDs(), and productProvenance().

77 { return stable().originalBranchID(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
BranchID const & originalBranchID() const
ProcessHistory const& edm::Provenance::processHistory ( ) const
inline

Definition at line 61 of file Provenance.h.

References edm::StableProvenance::processHistory(), and stable().

61 { return stable().processHistory(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
ProcessHistory const & processHistory() const
ProcessHistory const* edm::Provenance::processHistoryPtr ( ) const
inline

Definition at line 62 of file Provenance.h.

References edm::StableProvenance::processHistoryPtr(), and stable().

Referenced by edm::getProducerParameterSet().

62 { return stable().processHistoryPtr(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
ProcessHistory const * processHistoryPtr() const
std::string const& edm::Provenance::processName ( ) const
inline
ProductID const& edm::Provenance::productID ( ) const
inline

Definition at line 85 of file Provenance.h.

References edm::StableProvenance::productID(), and stable().

Referenced by edm::HandleBase::id(), and edm::ProductResolverBase::productID().

85 { return stable().productID(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
ProductID const & productID() const
std::string const& edm::Provenance::productInstanceName ( ) const
inline
ProductProvenance const * edm::Provenance::productProvenance ( ) const
ReleaseVersion edm::Provenance::releaseVersion ( ) const
inline

Definition at line 64 of file Provenance.h.

References edm::StableProvenance::releaseVersion(), and stable().

64 { return stable().releaseVersion(); }
ReleaseVersion releaseVersion() const
StableProvenance const & stable() const
Definition: Provenance.h:42
void edm::Provenance::setBranchDescription ( std::shared_ptr< BranchDescription const > const &  p)
inline

Definition at line 93 of file Provenance.h.

References edm::StableProvenance::setBranchDescription(), stable(), and swap().

Referenced by edm::ProductData::resetBranchDescription().

StableProvenance const & stable() const
Definition: Provenance.h:42
void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
void edm::Provenance::setMergeableRunProductMetadata ( MergeableRunProductMetadataBase const *  mrpm)
inline

Definition at line 89 of file Provenance.h.

References mergeableRunProductMetadata_.

Referenced by edm::ProductData::setMergeableRunProductMetadata().

89  {
91  }
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:100
void edm::Provenance::setProcessHistory ( ProcessHistory const &  ph)
inline

Definition at line 83 of file Provenance.h.

References edm::StableProvenance::setProcessHistory(), and stable().

Referenced by edm::ProductData::setProcessHistory(), and edm::ProductData::setProvenance().

83 { stable().setProcessHistory(ph); }
StableProvenance const & stable() const
Definition: Provenance.h:42
void setProcessHistory(ProcessHistory const &ph)
void edm::Provenance::setProductID ( ProductID const &  pid)
inline

Definition at line 87 of file Provenance.h.

References edm::StableProvenance::setProductID(), and stable().

Referenced by edm::ProductData::setProvenance().

87 { stable().setProductID(pid); }
StableProvenance const & stable() const
Definition: Provenance.h:42
void setProductID(ProductID const &pid)
void edm::Provenance::setStore ( ProductProvenanceRetriever const *  store)
inline

Definition at line 81 of file Provenance.h.

References store(), and store_.

Referenced by edm::ProductData::setProvenance().

81 { store_ = store; }
ProductProvenanceRetriever const * store() const
Definition: Provenance.h:60
ProductProvenanceRetriever const * store_
Definition: Provenance.h:99
StableProvenance const& edm::Provenance::stable ( ) const
inline
StableProvenance& edm::Provenance::stable ( )
inline

Definition at line 43 of file Provenance.h.

References stableProvenance_.

43 { return stableProvenance_; }
StableProvenance stableProvenance_
Definition: Provenance.h:98
ProductProvenanceRetriever const* edm::Provenance::store ( ) const
inline

Definition at line 60 of file Provenance.h.

References store_.

Referenced by setStore().

60 { return store_; }
ProductProvenanceRetriever const * store_
Definition: Provenance.h:99
void edm::Provenance::swap ( Provenance iOther)

Definition at line 56 of file Provenance.cc.

References mergeableRunProductMetadata_, stableProvenance_, store_, edm::StableProvenance::swap(), and std::swap().

Referenced by setBranchDescription(), and edm::ProductData::swap().

56  {
57  stableProvenance_.swap(iOther.stableProvenance_);
58  std::swap(store_, iOther.store_);
59  std::swap(mergeableRunProductMetadata_, iOther.mergeableRunProductMetadata_);
60  }
ProductProvenanceRetriever const * store_
Definition: Provenance.h:99
void swap(StableProvenance &)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
StableProvenance stableProvenance_
Definition: Provenance.h:98
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:100
void edm::Provenance::write ( std::ostream &  os) const

Definition at line 44 of file Provenance.cc.

References createTree::pp, productProvenance(), stable(), and edm::StableProvenance::write().

Referenced by pkg.AbstractPkg::generate(), edm::operator<<(), and originalBranchID().

44  {
45  // This is grossly inadequate, but it is not critical for the
46  // first pass.
47  stable().write(os);
48  auto pp = productProvenance();
49  if (pp != nullptr) {
50  pp->write(os);
51  }
52  }
StableProvenance const & stable() const
Definition: Provenance.h:42
void write(std::ostream &os) const
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:27

Member Data Documentation

MergeableRunProductMetadataBase const* edm::Provenance::mergeableRunProductMetadata_
private

Definition at line 100 of file Provenance.h.

Referenced by knownImproperlyMerged(), setMergeableRunProductMetadata(), and swap().

StableProvenance edm::Provenance::stableProvenance_
private

Definition at line 98 of file Provenance.h.

Referenced by stable(), and swap().

ProductProvenanceRetriever const* edm::Provenance::store_
private

Definition at line 99 of file Provenance.h.

Referenced by productProvenance(), setStore(), store(), and swap().