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 BranchDescription;
16  class WrapperOwningHolder;
17  struct ProductData {
18  ProductData();
19 
20  explicit ProductData(boost::shared_ptr<BranchDescription const> 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<BranchDescription const> 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<BranchDescription const> bd);
39 
41  wrapper_.reset();
43  }
44 
45  // NOTE: We should probably think hard about whether these
46  // variables should be declared "mutable" as part of
47  // the effort to make the Framework multithread capable ...
48 
49  // "non-const data" (updated every event)
50  mutable boost::shared_ptr<void const> wrapper_;
51  mutable Provenance prov_;
52  };
53 
54  // Free swap function
55  inline void swap(ProductData& a, ProductData& b) {
56  a.swap(b);
57  }
58 }
59 #endif
WrapperInterfaceBase const * getInterface() const
Definition: ProductData.h:25
void resetProductProvenance() const
Definition: Provenance.cc:72
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
Provenance prov_
Definition: ProductData.h:51
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:50
void swap(ProductData &other)
Definition: ProductData.h:33
WrapperInterfaceBase const * getInterface() const
BranchDescription const & product() const
Definition: Provenance.h:42
void resetProductData()
Definition: ProductData.h:40
double b
Definition: hdecay.h:120
void resetBranchDescription(boost::shared_ptr< BranchDescription const > bd)
Definition: ProductData.cc:26
boost::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
Definition: Provenance.h:46
double a
Definition: hdecay.h:121
boost::shared_ptr< BranchDescription const > const & branchDescription() const
Definition: ProductData.h:29
void swap(Provenance &)
Definition: Provenance.cc:84