CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

edm::Provenance::Provenance ( )

Definition at line 16 of file Provenance.cc.

16 : Provenance{StableProvenance()} {}
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
edm::Provenance::Provenance ( StableProvenance const &  stable)

Definition at line 21 of file Provenance.cc.

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

Member Function Documentation

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 const& edm::Provenance::branchDescription ( ) const
inline

Definition at line 45 of file Provenance.h.

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

Referenced by edm::check(), GlobalHitsProdHist::fillG4MC(), GlobalHitsAnalyzer::fillG4MC(), GlobalHitsProducer::fillG4MC(), and knownImproperlyMerged().

45 { return stable().branchDescription(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
BranchDescription const & branchDescription() const
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().

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(), 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::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
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 73 of file Provenance.h.

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

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

73 { return stable().originalBranchID(); }
StableProvenance const & stable() const
Definition: Provenance.h:42
BranchID const & originalBranchID() const
std::string const& edm::Provenance::processName ( ) const
inline
ProductID const& edm::Provenance::productID ( ) const
inline

Definition at line 79 of file Provenance.h.

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

Referenced by edm::BasicHandle::id(), edm::Handle< GenericObject >::id(), edm::Handle< FWGenericObject >::id(), and edm::ProductResolverBase::productID().

79 { 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
void edm::Provenance::setBranchDescription ( std::shared_ptr< BranchDescription const > const &  p)
inline

Definition at line 87 of file Provenance.h.

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

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

References mergeableRunProductMetadata_.

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

83  {
85  }
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94
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); }
StableProvenance const & stable() const
Definition: Provenance.h:42
void setProductID(ProductID const &pid)
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
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:92
ProductProvenanceLookup const* edm::Provenance::store ( ) const
inline

Definition at line 60 of file Provenance.h.

References store_.

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

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

Definition at line 53 of file Provenance.cc.

References mergeableRunProductMetadata_, stableProvenance_, store_, edm::StableProvenance::swap(), and std::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(StableProvenance &)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
StableProvenance stableProvenance_
Definition: Provenance.h:92
MergeableRunProductMetadataBase const * mergeableRunProductMetadata_
Definition: Provenance.h:94
void edm::Provenance::write ( std::ostream &  os) const

Definition at line 41 of file Provenance.cc.

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

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

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  }
tuple pp
Definition: createTree.py:17
StableProvenance const & stable() const
Definition: Provenance.h:42
void write(std::ostream &os) const
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:24

Member Data Documentation

MergeableRunProductMetadataBase const* edm::Provenance::mergeableRunProductMetadata_
private

Definition at line 94 of file Provenance.h.

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

StableProvenance edm::Provenance::stableProvenance_
private

Definition at line 92 of file Provenance.h.

Referenced by stable(), and swap().

ProductProvenanceLookup const* edm::Provenance::store_
private

Definition at line 93 of file Provenance.h.

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