CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
 
BranchDescription const & constBranchDescription () const
 
std::shared_ptr
< BranchDescription const >
const & 
constBranchDescriptionPtr () const
 
Parentage const & event () const
 
std::string const & friendlyClassName () const
 
bool getProcessConfiguration (ProcessConfiguration &pc) const
 
std::string const & moduleLabel () const
 
Parentage const & parentage () const
 
std::vector< BranchID > const & parents () const
 
ProcessHistory const & processHistory () const
 
std::string const & processName () const
 
BranchDescription const & product () const
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenanceproductProvenance () const
 
bool productProvenanceValid () const
 
 Provenance ()
 
 Provenance (std::shared_ptr< BranchDescription const > const &p, ProductID const &pid)
 
ReleaseVersion releaseVersion () const
 
void resetProductProvenance () const
 
ProductProvenanceresolve () const
 
void setBranchDescription (std::shared_ptr< BranchDescription const > const &p)
 
void setProcessHistory (ProcessHistory const &ph)
 
void setProductID (ProductID const &pid)
 
void setProductProvenance (ProductProvenance const &prov) const
 
void setStore (std::shared_ptr< ProductProvenanceRetriever > store) const
 
std::shared_ptr
< ProductProvenanceRetriever >
const & 
store () const
 
void swap (Provenance &)
 
void write (std::ostream &os) const
 

Private Attributes

std::shared_ptr
< BranchDescription const > 
branchDescription_
 
ProcessHistory const * processHistory_
 
ProductID productID_
 
std::shared_ptr
< ProductProvenance
productProvenancePtr_
 
bool productProvenanceValid_
 
std::shared_ptr
< ProductProvenanceRetriever
store_
 

Detailed Description

Definition at line 35 of file Provenance.h.

Constructor & Destructor Documentation

edm::Provenance::Provenance ( )

Definition at line 17 of file Provenance.cc.

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

Definition at line 20 of file Provenance.cc.

20  :
22  productID_(pid),
25  productProvenancePtr_(new ProductProvenance),
26  store_() {
27  }
std::shared_ptr< ProductProvenanceRetriever > store_
Definition: Provenance.h:100
ProductID productID_
Definition: Provenance.h:96
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
bool productProvenanceValid_
Definition: Provenance.h:98
ProcessHistory const * processHistory_
Definition: Provenance.h:97
tuple pid
Definition: sysUtil.py:22
std::shared_ptr< ProductProvenance > productProvenancePtr_
Definition: Provenance.h:99

Member Function Documentation

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

Definition at line 68 of file Provenance.h.

References edm::BranchDescription::branchAliases(), and product().

68 {return product().branchAliases();}
BranchDescription const & product() const
Definition: Provenance.h:42
std::set< std::string > const & branchAliases() const
BranchDescription const& edm::Provenance::branchDescription ( ) const
inline

Definition at line 44 of file Provenance.h.

References branchDescription_.

Referenced by FWFFMetadataManager::doUpdate(), and FWFFMetadataManager::hasModuleLabel().

44 {return *branchDescription_;}
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
BranchID const& edm::Provenance::branchID ( ) const
inline

Definition at line 57 of file Provenance.h.

References edm::BranchDescription::branchID(), and product().

Referenced by edm::LuminosityBlock::addToGotBranchIDs(), edm::Run::addToGotBranchIDs(), and edm::Event::addToGotBranchIDs().

57 {return product().branchID();}
BranchID const & branchID() const
BranchDescription const & product() const
Definition: Provenance.h:42
std::string const& edm::Provenance::branchName ( ) const
inline

Definition at line 58 of file Provenance.h.

References edm::BranchDescription::branchName(), and product().

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

58 {return product().branchName();}
std::string const & branchName() const
BranchDescription const & product() const
Definition: Provenance.h:42
std::string const& edm::Provenance::className ( ) const
inline

Definition at line 59 of file Provenance.h.

References edm::BranchDescription::className(), and product().

59 {return product().className();}
std::string const & className() const
BranchDescription const & product() const
Definition: Provenance.h:42
BranchDescription const& edm::Provenance::constBranchDescription ( ) const
inline

Definition at line 45 of file Provenance.h.

References branchDescription_.

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

45 {return *branchDescription_;}
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
std::shared_ptr<BranchDescription const> const& edm::Provenance::constBranchDescriptionPtr ( ) const
inline

Definition at line 46 of file Provenance.h.

References branchDescription_.

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

46 {return branchDescription_;}
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
Parentage const& edm::Provenance::event ( ) const
inline

Definition at line 41 of file Provenance.h.

References parentage().

Referenced by Types.EventID::cppID().

41 {return parentage();}
Parentage const & parentage() const
Definition: Provenance.h:56
std::string const& edm::Provenance::friendlyClassName ( ) const
inline

Definition at line 63 of file Provenance.h.

References edm::BranchDescription::friendlyClassName(), and product().

63 {return product().friendlyClassName();}
std::string const & friendlyClassName() const
BranchDescription const & product() const
Definition: Provenance.h:42
bool edm::Provenance::getProcessConfiguration ( ProcessConfiguration pc) const

Definition at line 45 of file Provenance.cc.

References edm::ProcessHistory::getConfigurationForProcess(), processHistory_, and processName().

Referenced by edm::parameterSet(), and releaseVersion().

45  {
47  }
std::string const & processName() const
Definition: Provenance.h:61
bool getConfigurationForProcess(std::string const &name, ProcessConfiguration &config) const
ProcessHistory const * processHistory_
Definition: Provenance.h:97
std::string const& edm::Provenance::moduleLabel ( ) const
inline
Parentage const& edm::Provenance::parentage ( ) const
inline

Definition at line 56 of file Provenance.h.

References edm::ProductProvenance::parentage(), and productProvenance().

Referenced by event(), and parents().

56 {return productProvenance()->parentage();}
ProductProvenance * productProvenance() const
Definition: Provenance.h:49
Parentage const & parentage() const
std::vector<BranchID> const& edm::Provenance::parents ( ) const
inline

Definition at line 70 of file Provenance.h.

References parentage(), and edm::Parentage::parents().

70 {return parentage().parents();}
std::vector< BranchID > const & parents() const
Definition: Parentage.h:37
Parentage const & parentage() const
Definition: Provenance.h:56
ProcessHistory const& edm::Provenance::processHistory ( ) const
inline

Definition at line 65 of file Provenance.h.

References processHistory_.

Referenced by edm::SubProcess::propagateProducts().

65 {return *processHistory_;}
ProcessHistory const * processHistory_
Definition: Provenance.h:97
std::string const& edm::Provenance::processName ( ) const
inline
BranchDescription const& edm::Provenance::product ( ) const
inline
ProductID const& edm::Provenance::productID ( ) const
inline
std::string const& edm::Provenance::productInstanceName ( ) const
inline
ProductProvenance* edm::Provenance::productProvenance ( ) const
inline
bool edm::Provenance::productProvenanceValid ( ) const
inline

Definition at line 53 of file Provenance.h.

References productProvenanceValid_.

Referenced by edm::SubProcess::propagateProducts().

53  {
55  }
bool productProvenanceValid_
Definition: Provenance.h:98
ReleaseVersion edm::Provenance::releaseVersion ( ) const

Definition at line 50 of file Provenance.cc.

References assert(), getProcessConfiguration(), and edm::ProcessConfiguration::releaseVersion().

50  {
51  ProcessConfiguration pc;
53  return pc.releaseVersion();
54  }
assert(m_qm.get())
bool getProcessConfiguration(ProcessConfiguration &pc) const
Definition: Provenance.cc:45
void edm::Provenance::resetProductProvenance ( ) const

Definition at line 72 of file Provenance.cc.

References productProvenancePtr_, and productProvenanceValid_.

Referenced by edm::SubProcess::propagateProducts(), and edm::ProductData::resetProductData().

72  {
73  *productProvenancePtr_ = ProductProvenance();
75  }
bool productProvenanceValid_
Definition: Provenance.h:98
std::shared_ptr< ProductProvenance > productProvenancePtr_
Definition: Provenance.h:99
ProductProvenance * edm::Provenance::resolve ( ) const

Definition at line 30 of file Provenance.cc.

References branchDescription_, productProvenancePtr_, productProvenanceValid_, and store_.

Referenced by SequenceTypes._ModuleSequenceType::insertInto(), and productProvenance().

30  {
31  if(!store_) {
32  return nullptr;
33  }
35  ProductProvenance const* prov = store_->branchIDToProvenance(branchDescription_->branchID());
36  if (prov) {
37  *productProvenancePtr_ = *prov;
39  }
40  }
41  return productProvenancePtr_.get();
42  }
std::shared_ptr< ProductProvenanceRetriever > store_
Definition: Provenance.h:100
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
bool productProvenanceValid_
Definition: Provenance.h:98
std::shared_ptr< ProductProvenance > productProvenancePtr_
Definition: Provenance.h:99
void edm::Provenance::setBranchDescription ( std::shared_ptr< BranchDescription const > const &  p)
inline

Definition at line 86 of file Provenance.h.

References branchDescription_, and AlCaHLTBitMon_ParallelJobs::p.

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

86  {
88  }
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
void edm::Provenance::setProcessHistory ( ProcessHistory const &  ph)
inline
void edm::Provenance::setProductID ( ProductID const &  pid)
inline
void edm::Provenance::setProductProvenance ( ProductProvenance const &  prov) const

Definition at line 78 of file Provenance.cc.

References productProvenancePtr_, and productProvenanceValid_.

Referenced by edm::SubProcess::propagateProducts(), and edm::ProductHolderBase::setProductProvenance().

78  {
79  *productProvenancePtr_ = prov;
81  }
bool productProvenanceValid_
Definition: Provenance.h:98
std::shared_ptr< ProductProvenance > productProvenancePtr_
Definition: Provenance.h:99
void edm::Provenance::setStore ( std::shared_ptr< ProductProvenanceRetriever store) const
inline

Definition at line 74 of file Provenance.h.

References store(), and store_.

Referenced by edm::SubProcess::propagateProducts(), edm::InputProductHolder::setProvenance_(), edm::ProducedProductHolder::setProvenance_(), and edm::AliasProductHolder::setProvenance_().

74 {store_ = store;}
std::shared_ptr< ProductProvenanceRetriever > store_
Definition: Provenance.h:100
std::shared_ptr< ProductProvenanceRetriever > const & store() const
Definition: Provenance.h:64
std::shared_ptr<ProductProvenanceRetriever> const& edm::Provenance::store ( ) const
inline

Definition at line 64 of file Provenance.h.

References store_.

Referenced by edm::SubProcess::propagateProducts(), and setStore().

64 {return store_;}
std::shared_ptr< ProductProvenanceRetriever > store_
Definition: Provenance.h:100
void edm::Provenance::swap ( Provenance iOther)

Definition at line 84 of file Provenance.cc.

References branchDescription_, processHistory_, productID_, productProvenancePtr_, productProvenanceValid_, store_, edm::ProductID::swap(), and std::swap().

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

84  {
85  branchDescription_.swap(iOther.branchDescription_);
86  productID_.swap(iOther.productID_);
87  std::swap(processHistory_, iOther.processHistory_);
88  std::swap(productProvenanceValid_, iOther.productProvenanceValid_);
89  productProvenancePtr_.swap(iOther.productProvenancePtr_);
90  store_.swap(iOther.store_);
91  }
std::shared_ptr< ProductProvenanceRetriever > store_
Definition: Provenance.h:100
ProductID productID_
Definition: Provenance.h:96
std::shared_ptr< BranchDescription const > branchDescription_
Definition: Provenance.h:95
void swap(ProductID &other)
Definition: ProductID.cc:17
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool productProvenanceValid_
Definition: Provenance.h:98
ProcessHistory const * processHistory_
Definition: Provenance.h:97
std::shared_ptr< ProductProvenance > productProvenancePtr_
Definition: Provenance.h:99
void edm::Provenance::write ( std::ostream &  os) const

Definition at line 57 of file Provenance.cc.

References createTree::pp, product(), productProvenance(), edm::ProductProvenance::write(), and edm::BranchDescription::write().

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

57  {
58  // This is grossly inadequate, but it is not critical for the
59  // first pass.
60  product().write(os);
61  ProductProvenance* pp = productProvenance();
62  if (pp != nullptr) {
63  pp->write(os);
64  }
65  }
tuple pp
Definition: createTree.py:15
ProductProvenance * productProvenance() const
Definition: Provenance.h:49
void write(std::ostream &os) const
BranchDescription const & product() const
Definition: Provenance.h:42

Member Data Documentation

std::shared_ptr<BranchDescription const> edm::Provenance::branchDescription_
private
ProcessHistory const* edm::Provenance::processHistory_
private

Definition at line 97 of file Provenance.h.

Referenced by getProcessConfiguration(), processHistory(), setProcessHistory(), and swap().

ProductID edm::Provenance::productID_
private

Definition at line 96 of file Provenance.h.

Referenced by productID(), setProductID(), and swap().

std::shared_ptr<ProductProvenance> edm::Provenance::productProvenancePtr_
mutableprivate
bool edm::Provenance::productProvenanceValid_
mutableprivate
std::shared_ptr<ProductProvenanceRetriever> edm::Provenance::store_
mutableprivate

Definition at line 100 of file Provenance.h.

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