CMS 3D CMS Logo

List of all members | Static Public Member Functions
edm::refitem::GetRefPtrImpl< C, T, F, KEY > Struct Template Reference

#include <RefItemGet.h>

Static Public Member Functions

static T const * getRefPtr_ (RefCore const &product, KEY const &key)
 

Detailed Description

template<typename C, typename T, typename F, typename KEY>
struct edm::refitem::GetRefPtrImpl< C, T, F, KEY >

Definition at line 26 of file RefItemGet.h.

Member Function Documentation

◆ getRefPtr_()

template<typename C , typename T , typename F , typename KEY >
static T const* edm::refitem::GetRefPtrImpl< C, T, F, KEY >::getRefPtr_ ( RefCore const &  product,
KEY const &  key 
)
inlinestatic

Definition at line 27 of file RefItemGet.h.

27  {
28  T const* item = static_cast<T const*>(product.productPtr());
29  if (item != nullptr) {
30  return item;
31  }
32  auto prodGetter = product.productGetter();
33  if (nullptr == prodGetter) {
34  item = static_cast<T const*>(product.productPtr());
35  if (item != nullptr) {
36  //Another thread updated the value since we checked
37  return item;
38  }
39  }
40  C const* prod = edm::template getProductWithCoreFromRef<C>(product, prodGetter);
41  /*
42  typename C::const_iterator it = prod->begin();
43  std::advance(it, item.key());
44  T const* p = it.operator->();
45  */
46  F func;
47  item = func(*prod, key);
48  product.setProductPtr(item);
49  return item;
50  }

References gen::C, F(), TrackCollections2monitor_cff::func, B2GTnPMonitor_cfi::item, crabWrapper::key, dumpMFGeometry_cfg::prod, edm::RefCore::productGetter(), edm::RefCore::productPtr(), edm::RefCore::setProductPtr(), and svgfig::template().

Referenced by edm::getRefPtr().

F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
gen::C
C
Definition: PomwigHadronizer.cc:78
T
long double T
Definition: Basic3DVectorLD.h:48
crabWrapper.key
key
Definition: crabWrapper.py:19