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 knownImproperlyMerged () const
 
std::string const & moduleLabel () const
 
std::string const & moduleName () const
 
BranchID const & originalBranchID () const
 
std::string const & processName () const
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenance const * productProvenance () const
 
 Provenance ()
 
 Provenance (StableProvenance const &)
 
 Provenance (std::shared_ptr< BranchDescription const > const &p, ProductID const &pid)
 
void setBranchDescription (std::shared_ptr< BranchDescription const > const &p)
 
void setMergeableRunProductMetadata (MergeableRunProductMetadataBase const *mrpm)
 
void setProductID (ProductID const &pid)
 
void setStore (ProductProvenanceRetriever const *store)
 
StableProvenancestable ()
 
StableProvenance const & stable () const
 
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

◆ Provenance() [1/3]

edm::Provenance::Provenance ( )

Definition at line 18 of file Provenance.cc.

18 : Provenance{StableProvenance()} {}

◆ Provenance() [2/3]

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

Definition at line 20 of file Provenance.cc.

◆ Provenance() [3/3]

edm::Provenance::Provenance ( StableProvenance const &  stable)

Definition at line 23 of file Provenance.cc.

Member Function Documentation

◆ branchAliases()

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

Definition at line 61 of file Provenance.h.

61 { return stable().branchAliases(); }

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

◆ branchDescription()

BranchDescription const& edm::Provenance::branchDescription ( ) const
inline

◆ branchID()

BranchID const& edm::Provenance::branchID ( ) const
inline

Definition at line 52 of file Provenance.h.

52 { return stable().branchID(); }

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

◆ branchName()

std::string const& edm::Provenance::branchName ( ) const
inline

Definition at line 53 of file Provenance.h.

53 { return stable().branchName(); }

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

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

◆ className()

std::string const& edm::Provenance::className ( ) const
inline

Definition at line 54 of file Provenance.h.

54 { return stable().className(); }

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

◆ constBranchDescriptionPtr()

std::shared_ptr<BranchDescription const> const& edm::Provenance::constBranchDescriptionPtr ( ) const
inline

◆ friendlyClassName()

std::string const& edm::Provenance::friendlyClassName ( ) const
inline

Definition at line 59 of file Provenance.h.

59 { return stable().friendlyClassName(); }

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

Referenced by OniaVtxReProducer::OniaVtxReProducer().

◆ knownImproperlyMerged()

bool edm::Provenance::knownImproperlyMerged ( ) const

Definition at line 33 of file Provenance.cc.

33  {
34  if (mergeableRunProductMetadata_ && branchDescription().isMergeable()) {
35  // This part handles the cases where the product is
36  // a mergeable run product from the input.
38  }
39  // All other cases
40  return false;
41  }

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

◆ moduleLabel()

std::string const& edm::Provenance::moduleLabel ( ) const
inline

◆ moduleName()

std::string const& edm::Provenance::moduleName ( ) const
inline

Definition at line 56 of file Provenance.h.

56 { return stable().moduleName(); }

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

◆ originalBranchID()

BranchID const& edm::Provenance::originalBranchID ( ) const
inline

Definition at line 73 of file Provenance.h.

73 { return stable().originalBranchID(); }

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

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

◆ processName()

std::string const& edm::Provenance::processName ( ) const
inline

◆ productID()

ProductID const& edm::Provenance::productID ( ) const
inline

◆ productInstanceName()

std::string const& edm::Provenance::productInstanceName ( ) const
inline

◆ productProvenance()

ProductProvenance const * edm::Provenance::productProvenance ( ) const

◆ setBranchDescription()

void edm::Provenance::setBranchDescription ( std::shared_ptr< BranchDescription const > const &  p)
inline

◆ setMergeableRunProductMetadata()

void edm::Provenance::setMergeableRunProductMetadata ( MergeableRunProductMetadataBase const *  mrpm)
inline

Definition at line 83 of file Provenance.h.

83  {
85  }

References mergeableRunProductMetadata_.

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

◆ setProductID()

void edm::Provenance::setProductID ( ProductID const &  pid)
inline

Definition at line 81 of file Provenance.h.

81 { stable().setProductID(pid); }

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

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

◆ setStore()

void edm::Provenance::setStore ( ProductProvenanceRetriever const *  store)
inline

Definition at line 77 of file Provenance.h.

77 { store_ = store; }

References store(), and store_.

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

◆ stable() [1/2]

StableProvenance& edm::Provenance::stable ( )
inline

Definition at line 43 of file Provenance.h.

43 { return stableProvenance_; }

References stableProvenance_.

◆ stable() [2/2]

StableProvenance const& edm::Provenance::stable ( ) const
inline

◆ store()

ProductProvenanceRetriever const* edm::Provenance::store ( ) const
inline

Definition at line 60 of file Provenance.h.

60 { return store_; }

References store_.

Referenced by setStore(), and edm::SwitchBaseProductResolver::unsafe_setWrapperAndProvenance().

◆ swap()

void edm::Provenance::swap ( Provenance iOther)

Definition at line 55 of file Provenance.cc.

55  {
56  stableProvenance_.swap(iOther.stableProvenance_);
57  std::swap(store_, iOther.store_);
58  std::swap(mergeableRunProductMetadata_, iOther.mergeableRunProductMetadata_);
59  }

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

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

◆ write()

void edm::Provenance::write ( std::ostream &  os) const

Definition at line 43 of file Provenance.cc.

43  {
44  // This is grossly inadequate, but it is not critical for the
45  // first pass.
46  stable().write(os);
47  auto pp = productProvenance();
48  if (pp != nullptr) {
49  pp->write(os);
50  }
51  }

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

Referenced by pkg.AbstractPkg::generate().

Member Data Documentation

◆ mergeableRunProductMetadata_

MergeableRunProductMetadataBase const* edm::Provenance::mergeableRunProductMetadata_
private

Definition at line 94 of file Provenance.h.

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

◆ stableProvenance_

StableProvenance edm::Provenance::stableProvenance_
private

Definition at line 92 of file Provenance.h.

Referenced by stable(), and swap().

◆ store_

ProductProvenanceRetriever const* edm::Provenance::store_
private

Definition at line 93 of file Provenance.h.

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

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::StableProvenance::originalBranchID
BranchID const & originalBranchID() const
Definition: StableProvenance.h:40
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::Provenance::productProvenance
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:26
edm::StableProvenance::productInstanceName
std::string const & productInstanceName() const
Definition: StableProvenance.h:46
edm::Provenance::store_
ProductProvenanceRetriever const * store_
Definition: Provenance.h:93
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
edm::Provenance::processName
std::string const & processName() const
Definition: Provenance.h:57
edm::Provenance::branchDescription
BranchDescription const & branchDescription() const
Definition: Provenance.h:45
edm::StableProvenance::branchDescription
BranchDescription const & branchDescription() const
Definition: StableProvenance.h:36
edm::StableProvenance::className
std::string const & className() const
Definition: StableProvenance.h:42
edm::StableProvenance::processName
std::string const & processName() const
Definition: StableProvenance.h:45
edm::StableProvenance::moduleLabel
std::string const & moduleLabel() const
Definition: StableProvenance.h:43
edm::StableProvenance::swap
void swap(StableProvenance &)
Definition: StableProvenance.cc:28
edm::Provenance::Provenance
Provenance()
Definition: Provenance.cc:18
edm::StableProvenance::moduleName
std::string const & moduleName() const
Definition: StableProvenance.h:44
edm::StableProvenance::write
void write(std::ostream &os) const
Definition: StableProvenance.cc:19
edm::StableProvenance::setProductID
void setProductID(ProductID const &pid)
Definition: StableProvenance.h:54
edm::Provenance::store
ProductProvenanceRetriever const * store() const
Definition: Provenance.h:60
edm::StableProvenance::branchName
std::string const & branchName() const
Definition: StableProvenance.h:41
edm::StableProvenance::productID
ProductID const & productID() const
Definition: StableProvenance.h:52
edm::Provenance::stableProvenance_
StableProvenance stableProvenance_
Definition: Provenance.h:92
edm::Provenance::originalBranchID
BranchID const & originalBranchID() const
Definition: Provenance.h:73
edm::Provenance::stable
StableProvenance const & stable() const
Definition: Provenance.h:42
edm::ProductProvenanceRetriever::branchIDToProvenance
ProductProvenance const * branchIDToProvenance(BranchID const &bid) const
Definition: ProductProvenanceRetriever.cc:148
edm::StableProvenance::constBranchDescriptionPtr
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
Definition: StableProvenance.h:37
edm::StableProvenance::branchAliases
std::set< std::string > const & branchAliases() const
Definition: StableProvenance.h:48
createTree.pp
pp
Definition: createTree.py:17
edm::Provenance::mergeableRunProductMetadata_
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94
edm::MergeableRunProductMetadataBase::knownImproperlyMerged
virtual bool knownImproperlyMerged(std::string const &processThatCreatedProduct) const =0