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()} {
20  }
edm::Provenance::Provenance ( std::shared_ptr< BranchDescription const > const &  p,
ProductID const &  pid 
)

Definition at line 22 of file Provenance.cc.

22  :
24  store_(),
26  }
ProductProvenanceRetriever const * store_
Definition: Provenance.h:97
StableProvenance stableProvenance_
Definition: Provenance.h:96
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:98
edm::Provenance::Provenance ( StableProvenance const &  stable)

Definition at line 28 of file Provenance.cc.

28  :
30  store_(),
32  }
StableProvenance const & stable() const
Definition: Provenance.h:42
ProductProvenanceRetriever const * store_
Definition: Provenance.h:97
StableProvenance stableProvenance_
Definition: Provenance.h:96
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:98

Member Function Documentation

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

Definition at line 63 of file Provenance.h.

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

63 {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 50 of file Provenance.h.

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

50 {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 51 of file Provenance.h.

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

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

51 {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 52 of file Provenance.h.

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

52 {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().

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 57 of file Provenance.h.

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

Referenced by OniaVtxReProducer::OniaVtxReProducer().

57 {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 61 of file Provenance.h.

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

Referenced by edm::parameterSet().

61 {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 43 of file Provenance.cc.

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

Referenced by constBranchDescriptionPtr().

43  {
44  if (mergeableRunProductMetadata_ && branchDescription().isMergeable()) {
45  // This part handles the cases where the product is
46  // a mergeable run product from the input.
48  }
49  // All other cases
50  return false;
51  }
virtual bool knownImproperlyMerged(std::string const &processThatCreatedProduct) const =0
std::string const & processName() const
Definition: Provenance.h:55
BranchDescription const & branchDescription() const
Definition: Provenance.h:45
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:98
std::string const& edm::Provenance::moduleLabel ( ) const
inline
std::string const& edm::Provenance::moduleName ( ) const
inline

Definition at line 54 of file Provenance.h.

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

54 {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 75 of file Provenance.h.

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

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

75 {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 59 of file Provenance.h.

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

59 {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 60 of file Provenance.h.

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

Referenced by edm::getProducerParameterSet().

60 {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 83 of file Provenance.h.

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

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

83 {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 62 of file Provenance.h.

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

62 {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 91 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 87 of file Provenance.h.

References mergeableRunProductMetadata_.

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

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

Definition at line 81 of file Provenance.h.

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

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

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

Definition at line 85 of file Provenance.h.

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

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

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

Definition at line 79 of file Provenance.h.

References store(), and store_.

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

79 {store_ = store;}
ProductProvenanceRetriever const * store() const
Definition: Provenance.h:58
ProductProvenanceRetriever const * store_
Definition: Provenance.h:97
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:96
ProductProvenanceRetriever const* edm::Provenance::store ( ) const
inline

Definition at line 58 of file Provenance.h.

References store_.

Referenced by setStore().

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

Definition at line 70 of file Provenance.cc.

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

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

70  {
71  stableProvenance_.swap(iOther.stableProvenance_);
72  std::swap(store_,iOther.store_);
73  std::swap(mergeableRunProductMetadata_,iOther.mergeableRunProductMetadata_);
74  }
ProductProvenanceRetriever const * store_
Definition: Provenance.h:97
void swap(StableProvenance &)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
StableProvenance stableProvenance_
Definition: Provenance.h:96
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:98
void edm::Provenance::write ( std::ostream &  os) const

Definition at line 54 of file Provenance.cc.

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

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

54  {
55  // This is grossly inadequate, but it is not critical for the
56  // first pass.
57  stable().write(os);
58  auto pp = productProvenance();
59  if (pp != nullptr) {
60  pp->write(os);
61  }
62  }
StableProvenance const & stable() const
Definition: Provenance.h:42
void write(std::ostream &os) const
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:35

Member Data Documentation

MergeableRunProductMetadataBase const* edm::Provenance::mergeableRunProductMetadata_
private

Definition at line 98 of file Provenance.h.

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

StableProvenance edm::Provenance::stableProvenance_
private

Definition at line 96 of file Provenance.h.

Referenced by stable(), and swap().

ProductProvenanceRetriever const* edm::Provenance::store_
private

Definition at line 97 of file Provenance.h.

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