1 #ifndef DataFormats_Common_RefToBaseProd_h
2 #define DataFormats_Common_RefToBaseProd_h
114 product_(ref.product_) {
132 return * operator->();
140 auto getter = product_.productGetter();
141 if(getter !=
nullptr) {
142 if(product_.isNull()) {
144 "attempting get view from a null RefToBaseProd.\n");
147 std::vector<void const*> pointers;
150 if(prod ==
nullptr) {
152 "attempting to get view from an unavailable RefToBaseProd.");
154 prod->
fillView(tId, pointers, helpers);
155 std::unique_ptr<View<T>>
tmp{
new View<T>(pointers, helpers, getter) };
156 if( product_.tryToSetProductPtrForFirstTime(
tmp.get())) {
173 return lhs.refCore() == rhs.refCore();
180 return !(lhs == rhs);
187 return (lhs.refCore() < rhs.refCore());
203 product_(ref.refCore()) {
204 std::vector<void const*> pointers;
214 product_(handle.id(), handle.product(), 0,
false) {
215 std::vector<void const*> pointers;
217 fillView(* handle, handle.
id(), pointers, helpers);
225 product_(handle.id(), handle.product(), 0,
false) {
226 std::vector<void const*> pointers;
228 fillView(* handle, handle.
id(), pointers, helpers);
View< T > const * viewPtr() const
~RefToBaseProd()
Destructor.
void setProductPtr(void const *prodPtr) const
product_type const * operator->() const
Member dereference operator.
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
#define CMS_CLASS_VERSION(_version_)
void fillView(ProductID const &id, std::vector< void const * > &view, FillViewHelperVector &helpers) const
void swap(Association< C > &lhs, Association< C > &rhs)
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
RefCore const & refCore() const
RefToBaseProd()
Default constructor needed for reading from persistent store. Not for direct use. ...
bool hasCache() const
Checks if product is in memory.
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void const * productPtr() const
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers)
RefToBaseProd< T > & operator=(const RefToBaseProd< T > &other)
ProductID id() const
Accessor for product ID.
EDProductGetter const * productGetter() const
Accessor for product getter.
RefCore const & refCore() const
EDProductGetter const * productGetter() const
product_type const * product() const
std::vector< std::vector< double > > tmp
product_type const * product() const
ProductID id() const
Accessor for product ID.
bool operator!() const
Checks for null.
product_type const & operator*() const
Dereference operator.
volatile std::atomic< bool > shutdown_flag false
bool isNull() const
Checks for null.
void swap(RefToBaseProd< T > &)
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
bool isNonnull() const
Checks for non-null.