CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProductData.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_ProductData_h
2 #define DataFormats_Common_ProductData_h
3 
4 /*----------------------------------------------------------------------
5 
6 ProductData: A collection of information related to a single EDProduct. This
7 is the storage unit of such information.
8 
9 ----------------------------------------------------------------------*/
10 
12 #include "boost/shared_ptr.hpp"
13 
14 namespace edm {
15  class ConstBranchDescription;
16  class WrapperOwningHolder;
17  struct ProductData {
18  ProductData();
19 
20  explicit ProductData(boost::shared_ptr<ConstBranchDescription> bd);
21 
22  // For use by FWLite
23  ProductData(void const* product, Provenance const& prov);
24 
26  return prov_.product().getInterface();
27  }
28 
29  boost::shared_ptr<ConstBranchDescription> const& branchDescription() const {
31  }
32 
33  void swap(ProductData& other) {
34  std::swap(wrapper_, other.wrapper_);
35  prov_.swap(other.prov_);
36  }
37 
38  void resetBranchDescription(boost::shared_ptr<ConstBranchDescription> bd);
39 
41  wrapper_.reset();
43  }
44 
45  // "non-const data" (updated every event)
46  mutable boost::shared_ptr<void const> wrapper_;
47  mutable Provenance prov_;
48  };
49 
50  // Free swap function
51  inline void swap(ProductData& a, ProductData& b) {
52  a.swap(b);
53  }
54 }
55 #endif
WrapperInterfaceBase const * getInterface() const
Definition: ProductData.h:25
void resetProductProvenance() const
Definition: Provenance.cc:120
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
Provenance prov_
Definition: ProductData.h:47
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:46
void swap(ProductData &other)
Definition: ProductData.h:33
WrapperInterfaceBase const * getInterface() const
BranchDescription const & product() const
Definition: Provenance.h:44
void resetProductData()
Definition: ProductData.h:40
void resetBranchDescription(boost::shared_ptr< ConstBranchDescription > bd)
Definition: ProductData.cc:26
double b
Definition: hdecay.h:120
boost::shared_ptr< ConstBranchDescription > const & branchDescription() const
Definition: ProductData.h:29
double a
Definition: hdecay.h:121
boost::shared_ptr< ConstBranchDescription > const & constBranchDescriptionPtr() const
Definition: Provenance.h:48
void swap(Provenance &)
Definition: Provenance.cc:132