CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RefCoreWithIndex.cc
Go to the documentation of this file.
5 #include <cassert>
6 #include <iostream>
7 #include <ostream>
8 
9 namespace edm {
10 
11  RefCoreWithIndex::RefCoreWithIndex(ProductID const& theId, void const* prodPtr, EDProductGetter const* prodGetter, bool transient, unsigned int iIndex) :
12  cachePtr_(prodPtr),
13  processIndex_(theId.processIndex()),
14  productIndex_(theId.productIndex()),
15  elementIndex_(iIndex)
16  {
17  if(transient) {
18  setTransient();
19  }
20  if(prodPtr==nullptr && prodGetter!=nullptr) {
21  setCacheIsProductGetter(prodGetter);
22  }
23  }
24 
25  RefCoreWithIndex::RefCoreWithIndex(RefCore const& iCore, unsigned int iIndex):
26  cachePtr_(iCore.cachePtr_.load()),
27  processIndex_(iCore.processIndex_),
28  productIndex_(iCore.productIndex_),
29  elementIndex_(iIndex){}
30 
32  cachePtr_(iOther.cachePtr_.load()),
33  processIndex_(iOther.processIndex_),
34  productIndex_(iOther.productIndex_),
35  elementIndex_(iOther.elementIndex_){}
36 
38  cachePtr_ = iOther.cachePtr_.load();
42  return *this;
43  }
44 
45 }
46 
std::atomic< void const * > cachePtr_
void setCacheIsProductGetter(EDProductGetter const *iGetter) const
RefCoreWithIndex & operator=(RefCoreWithIndex const &)
def load
Definition: svgfig.py:546