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.

References correctionTermsCaloMet_cff::C, runTheMatrix::const, F(), EcalMonitorTask_cff::func, B2GTnPMonitor_cfi::item, crabWrapper::key, dumpMFGeometry_cfg::prod, edm::RefCore::productGetter(), edm::RefCore::productPtr(), and svgfig::template().

Referenced by edm::getRefPtr().

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  }
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
long double T