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 <memory>
13 
14 namespace edm {
15  class BranchDescription;
16  class WrapperBase;
17  struct ProductData {
18  ProductData();
19 
20  explicit ProductData(std::shared_ptr<BranchDescription const> bd);
21 
22  // For use by FWLite
23  ProductData(WrapperBase* product, Provenance const& prov);
24 
25  std::shared_ptr<BranchDescription const> const& branchDescription() const {
27  }
28 
29  void swap(ProductData& other) {
30  std::swap(wrapper_, other.wrapper_);
31  prov_.swap(other.prov_);
32  }
33 
34  void resetBranchDescription(std::shared_ptr<BranchDescription const> bd);
35 
37  wrapper_.reset();
39  }
40 
41  // NOTE: We should probably think hard about whether these
42  // variables should be declared "mutable" as part of
43  // the effort to make the Framework multithread capable ...
44 
45  // "non-const data" (updated every event)
46  mutable std::shared_ptr<WrapperBase> 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
void resetBranchDescription(std::shared_ptr< BranchDescription const > bd)
Definition: ProductData.cc:26
std::shared_ptr< BranchDescription const > const & branchDescription() 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:47
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:46
void swap(ProductData &other)
Definition: ProductData.h:29
void resetProductData()
Definition: ProductData.h:36
std::shared_ptr< BranchDescription const > const & constBranchDescriptionPtr() const
Definition: Provenance.h:46
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void swap(Provenance &)
Definition: Provenance.cc:84