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::ProductData Class Reference

#include <ProductData.h>

Public Member Functions

std::shared_ptr
< BranchDescription const >
const & 
branchDescription () const
 
void connectTo (ProductData const &iOther)
 
 ProductData ()
 
 ProductData (std::shared_ptr< BranchDescription const > bd)
 
 ProductData (WrapperBase *product, Provenance const &prov)
 
Provenance const & provenance () const
 
void resetBranchDescription (std::shared_ptr< BranchDescription const > bd)
 
void resetProductData ()
 
void setProcessHistory (ProcessHistory const &ph)
 
void setProvenance (ProductProvenanceRetriever const *provRetriever, ProcessHistory const &ph, ProductID const &pid)
 
void setWrapper (std::unique_ptr< WrapperBase > iValue)
 
std::shared_ptr< WrapperBase
const > 
sharedConstWrapper () const
 
void swap (ProductData &other)
 
void unsafe_resetProductData () const
 
void unsafe_setWrapper (std::unique_ptr< WrapperBase > iValue) const
 
WrapperBaseunsafe_wrapper () const
 
WrapperBase const * wrapper () const
 
WrapperBasewrapper ()
 

Private Attributes

Provenance prov_
 
std::shared_ptr< WrapperBasewrapper_
 

Detailed Description

Definition at line 17 of file ProductData.h.

Constructor & Destructor Documentation

edm::ProductData::ProductData ( )

Definition at line 10 of file ProductData.cc.

10  :
11  wrapper_(),
12  prov_() {
13  }
Provenance prov_
Definition: ProductData.h:84
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
edm::ProductData::ProductData ( std::shared_ptr< BranchDescription const >  bd)
explicit

Definition at line 15 of file ProductData.cc.

15  :
16  wrapper_(),
17  prov_(bd, ProductID()) {
18  }
Provenance prov_
Definition: ProductData.h:84
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
edm::ProductData::ProductData ( WrapperBase product,
Provenance const &  prov 
)

Definition at line 21 of file ProductData.cc.

21  :
22  wrapper_(product, do_nothing_deleter()),
23  prov_(prov) {
24  }
Provenance prov_
Definition: ProductData.h:84
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83

Member Function Documentation

std::shared_ptr<BranchDescription const> const& edm::ProductData::branchDescription ( ) const
inline

Definition at line 26 of file ProductData.h.

References edm::Provenance::constBranchDescriptionPtr(), and prov_.

Referenced by edm::InputProductHolder::branchDescription_(), and edm::ProducedProductHolder::branchDescription_().

26  {
28  }
Provenance prov_
Definition: ProductData.h:84
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
Definition: Provenance.h:45
void edm::ProductData::connectTo ( ProductData const &  iOther)
inline

Definition at line 69 of file ProductData.h.

References edm::Provenance::processHistory(), edm::Provenance::productID(), prov_, edm::Provenance::setProcessHistory(), edm::Provenance::setProductID(), edm::Provenance::setStore(), edm::Provenance::store(), and wrapper_.

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

69  {
70  wrapper_ = iOther.wrapper_;
71  // Then the product ID and the ProcessHistory
72  prov_.setProductID(iOther.prov_.productID());
73  prov_.setProcessHistory(iOther.prov_.processHistory());
74  // Then the store, in case the product needs reading in a subprocess.
75  prov_.setStore(iOther.prov_.store());
76  }
Provenance prov_
Definition: ProductData.h:84
void setStore(ProductProvenanceRetriever const *store)
Definition: Provenance.h:63
void setProductID(ProductID const &pid)
Definition: Provenance.h:69
void setProcessHistory(ProcessHistory const &ph)
Definition: Provenance.h:65
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
Provenance const& edm::ProductData::provenance ( ) const
inline

Definition at line 30 of file ProductData.h.

References prov_.

Referenced by edm::ProductHolderBase::productID(), and edm::ProductHolderBase::provenance().

30 { return prov_;}
Provenance prov_
Definition: ProductData.h:84
void edm::ProductData::resetBranchDescription ( std::shared_ptr< BranchDescription const >  bd)

Definition at line 27 of file ProductData.cc.

References prov_, and edm::Provenance::setBranchDescription().

Referenced by edm::InputProductHolder::resetBranchDescription_(), and edm::ProducedProductHolder::resetBranchDescription_().

27  {
29  }
void setBranchDescription(std::shared_ptr< BranchDescription const > const &p)
Definition: Provenance.h:73
Provenance prov_
Definition: ProductData.h:84
void edm::ProductData::resetProductData ( )
inline

Definition at line 51 of file ProductData.h.

References wrapper_.

Referenced by edm::InputProductHolder::resetProductData_(), edm::ProducedProductHolder::resetProductData_(), and edm::AliasProductHolder::resetProductData_().

51  {
52  wrapper_.reset();
53  }
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
void edm::ProductData::setProcessHistory ( ProcessHistory const &  ph)
inline
void edm::ProductData::setProvenance ( ProductProvenanceRetriever const *  provRetriever,
ProcessHistory const &  ph,
ProductID const &  pid 
)
inline

Definition at line 63 of file ProductData.h.

References prov_, edm::Provenance::setProcessHistory(), edm::Provenance::setProductID(), and edm::Provenance::setStore().

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

63  {
65  prov_.setStore(provRetriever);
67  }
Provenance prov_
Definition: ProductData.h:84
void setStore(ProductProvenanceRetriever const *store)
Definition: Provenance.h:63
tuple pid
Definition: sysUtil.py:22
void setProductID(ProductID const &pid)
Definition: Provenance.h:69
void setProcessHistory(ProcessHistory const &ph)
Definition: Provenance.h:65
void edm::ProductData::setWrapper ( std::unique_ptr< WrapperBase iValue)

Definition at line 31 of file ProductData.cc.

References eostools::move(), and wrapper_.

31  {
32  wrapper_ = std::move(iValue);
33  }
def move
Definition: eostools.py:510
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
std::shared_ptr<WrapperBase const> edm::ProductData::sharedConstWrapper ( ) const
inline

Definition at line 35 of file ProductData.h.

References wrapper_.

Referenced by edm::getProductByTag().

35  {
36  return wrapper_;
37  }
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
void edm::ProductData::swap ( ProductData other)
inline

Definition at line 39 of file ProductData.h.

References prov_, edm::Provenance::swap(), std::swap(), and wrapper_.

Referenced by edm::swap().

39  {
40  std::swap(wrapper_, other.wrapper_);
41  prov_.swap(other.prov_);
42  }
Provenance prov_
Definition: ProductData.h:84
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void swap(Provenance &)
Definition: Provenance.cc:64
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
void edm::ProductData::unsafe_resetProductData ( ) const
inline

Definition at line 55 of file ProductData.h.

References wrapper_.

Referenced by edm::ProductHolderBase::unsafe_deleteProduct().

55  {
56  wrapper_.reset();
57  }
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
void edm::ProductData::unsafe_setWrapper ( std::unique_ptr< WrapperBase iValue) const

Definition at line 36 of file ProductData.cc.

References eostools::move(), and wrapper_.

Referenced by edm::ProducedProductHolder::putProduct_(), and edm::InputProductHolder::setProduct().

36  {
37  wrapper_ = std::move(iValue);
38  }
def move
Definition: eostools.py:510
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
WrapperBase* edm::ProductData::unsafe_wrapper ( ) const
inline

Definition at line 34 of file ProductData.h.

References wrapper_.

Referenced by edm::ProductHolderBase::unsafe_product().

34 { return wrapper_.get(); }
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
WrapperBase const* edm::ProductData::wrapper ( ) const
inline

Definition at line 32 of file ProductData.h.

References wrapper_.

Referenced by edm::getProductByTag(), edm::EventPrincipal::getThinnedAssociation(), and edm::ProductHolderBase::product().

32 { return wrapper_.get();}
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83
WrapperBase* edm::ProductData::wrapper ( )
inline

Definition at line 33 of file ProductData.h.

References wrapper_.

33 { return wrapper_.get(); }
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:83

Member Data Documentation

Provenance edm::ProductData::prov_
private
std::shared_ptr<WrapperBase> edm::ProductData::wrapper_
mutableprivate