CMS 3D CMS Logo

List of all members | Static Public Member Functions
edm::refitem::IsThinnedAvailableImpl< C, unsigned int > Struct Template Reference

#include <RefItemGet.h>

Static Public Member Functions

static bool isThinnedAvailable_ (RefCore const &ref, unsigned int key)
 

Detailed Description

template<typename C>
struct edm::refitem::IsThinnedAvailableImpl< C, unsigned int >

Definition at line 99 of file RefItemGet.h.

Member Function Documentation

template<typename C >
static bool edm::refitem::IsThinnedAvailableImpl< C, unsigned int >::isThinnedAvailable_ ( RefCore const &  ref,
unsigned int  key 
)
inlinestatic

Definition at line 100 of file RefItemGet.h.

References edm::RefCore::isThinnedAvailable(), edm::RefCore::isTransient(), edm::RefCore::productGetter(), and edm::RefCore::productPtr().

100  {
101  if(ref.productPtr() != nullptr) {
102  return true;
103  }
104  if (ref.isTransient()) {
105  return false;
106  }
107  auto getter = ref.productGetter();
108  if(getter != nullptr) {
109  return ref.isThinnedAvailable(key,getter);
110  }
111  //another thread may have updated the cache
112  return nullptr != ref.productPtr();
113  }