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 (std::shared_ptr< BranchDescription const > const &p, ProductID const &pid)
 
 Provenance (StableProvenance const &)
 
void setBranchDescription (std::shared_ptr< BranchDescription const > const &p)
 
void setMergeableRunProductMetadata (MergeableRunProductMetadataBase const *mrpm)
 
void setProductID (ProductID const &pid)
 
void setStore (ProductProvenanceLookup const *store)
 
StableProvenance const & stable () const
 
StableProvenancestable ()
 
ProductProvenanceLookup const * store () const
 
void swap (Provenance &)
 
void write (std::ostream &os) const
 

Private Attributes

MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
 
StableProvenance stableProvenance_
 
ProductProvenanceLookup const * store_
 

Detailed Description

Definition at line 34 of file Provenance.h.

Constructor & Destructor Documentation

◆ Provenance() [1/3]

edm::Provenance::Provenance ( )

Definition at line 16 of file Provenance.cc.

16 : Provenance{StableProvenance()} {}

◆ Provenance() [2/3]

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

Definition at line 18 of file Provenance.cc.

ProductProvenanceLookup const * store_
Definition: Provenance.h:93
StableProvenance stableProvenance_
Definition: Provenance.h:92
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94

◆ Provenance() [3/3]

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

Definition at line 21 of file Provenance.cc.

ProductProvenanceLookup const * store_
Definition: Provenance.h:93
StableProvenance stableProvenance_
Definition: Provenance.h:92
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94
StableProvenance const & stable() const
Definition: Provenance.h:42

Member Function Documentation

◆ branchAliases()

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

Definition at line 61 of file Provenance.h.

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

61 { return stable().branchAliases(); }
std::set< std::string > const & branchAliases() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ branchDescription()

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

◆ branchID()

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

Definition at line 52 of file Provenance.h.

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

Referenced by edmtest::TestParentage::analyze().

52 { return stable().branchID(); }
BranchID const & branchID() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ branchName()

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

Definition at line 53 of file Provenance.h.

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

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

◆ className()

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

◆ constBranchDescriptionPtr()

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

Definition at line 46 of file Provenance.h.

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

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

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

◆ friendlyClassName()

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(); }
std::string const & friendlyClassName() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ knownImproperlyMerged()

bool edm::Provenance::knownImproperlyMerged ( ) const

Definition at line 31 of file Provenance.cc.

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

31  {
32  if (mergeableRunProductMetadata_ && branchDescription().isMergeable()) {
33  // This part handles the cases where the product is
34  // a mergeable run product from the input.
36  }
37  // All other cases
38  return false;
39  }
std::string const & processName() const
Definition: Provenance.h:57
BranchDescription const & branchDescription() const
Definition: Provenance.h:45
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94
virtual bool knownImproperlyMerged(std::string const &processThatCreatedProduct) const =0

◆ moduleLabel()

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

Definition at line 55 of file Provenance.h.

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

Referenced by OniaVtxReProducer::OniaVtxReProducer(), HectorProducer::produce(), and PPSSimTrackProducer::produce().

55 { return stable().moduleLabel(); }
std::string const & moduleLabel() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ moduleName()

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(); }
std::string const & moduleName() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ originalBranchID()

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

Definition at line 73 of file Provenance.h.

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

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

73 { return stable().originalBranchID(); }
BranchID const & originalBranchID() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ processName()

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

Definition at line 57 of file Provenance.h.

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

Referenced by knownImproperlyMerged(), and OniaVtxReProducer::OniaVtxReProducer().

57 { return stable().processName(); }
std::string const & processName() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ productID()

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

◆ productInstanceName()

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

Definition at line 58 of file Provenance.h.

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

Referenced by OniaVtxReProducer::OniaVtxReProducer().

58 { return stable().productInstanceName(); }
std::string const & productInstanceName() const
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ productProvenance()

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

◆ setBranchDescription()

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

Definition at line 87 of file Provenance.h.

References AlCaHLTBitMon_ParallelJobs::p, edm::StableProvenance::setBranchDescription(), and stable().

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

void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ setMergeableRunProductMetadata()

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

Definition at line 83 of file Provenance.h.

References mergeableRunProductMetadata_.

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

83  {
85  }
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94

◆ setProductID()

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

Definition at line 81 of file Provenance.h.

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

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

81 { stable().setProductID(pid); }
void setProductID(ProductID const &pid)
StableProvenance const & stable() const
Definition: Provenance.h:42

◆ setStore()

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

Definition at line 77 of file Provenance.h.

References store(), and store_.

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

77 { store_ = store; }
ProductProvenanceLookup const * store_
Definition: Provenance.h:93
ProductProvenanceLookup const * store() const
Definition: Provenance.h:60

◆ stable() [1/2]

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

◆ stable() [2/2]

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

Definition at line 43 of file Provenance.h.

References stableProvenance_.

43 { return stableProvenance_; }
StableProvenance stableProvenance_
Definition: Provenance.h:92

◆ store()

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

Definition at line 60 of file Provenance.h.

References store_.

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

60 { return store_; }
ProductProvenanceLookup const * store_
Definition: Provenance.h:93

◆ swap()

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

Definition at line 53 of file Provenance.cc.

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

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

53  {
54  stableProvenance_.swap(iOther.stableProvenance_);
55  std::swap(store_, iOther.store_);
56  std::swap(mergeableRunProductMetadata_, iOther.mergeableRunProductMetadata_);
57  }
ProductProvenanceLookup const * store_
Definition: Provenance.h:93
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
void swap(StableProvenance &)
StableProvenance stableProvenance_
Definition: Provenance.h:92
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94

◆ write()

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

Definition at line 41 of file Provenance.cc.

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

Referenced by pkg.AbstractPkg::generate().

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

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_

ProductProvenanceLookup const* edm::Provenance::store_
private

Definition at line 93 of file Provenance.h.

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