12 <<
"RefCore: Request to resolve a null or invalid reference to a product of type '" 14 <<
"' has been detected.\n" 15 <<
"Please modify the calling code to test validity before dereferencing.\n";
22 <<
"RefCore: A request to resolve a reference to a product of type '" 24 <<
"' with ProductID '" << prodID
25 <<
"' cannot be satisfied.\n" 26 <<
"The reference has neither a valid product pointer nor an EDProductGetter.\n" 27 <<
"The calling code must be modified to establish a functioning EDProducterGetter\n" 28 <<
"for the context in which this call is mode\n";
36 processIndex_(theId.processIndex()),
37 productIndex_(theId.productIndex())
42 if(prodPtr==
nullptr && prodGetter!=
nullptr) {
50 cachePtr_.store(iOther.
cachePtr_.load(std::memory_order_relaxed), std::memory_order_relaxed);
54 cachePtr_.store(iOther.
cachePtr_.load(std::memory_order_relaxed), std::memory_order_relaxed);
87 if (product ==
nullptr) {
120 if (product ==
nullptr) {
132 if(!tId.
isValid() || prodGetter ==
nullptr) {
137 return product !=
nullptr;
143 <<
"RefCore: A request to resolve a reference to a product of type '" 145 <<
"' with ProductID '" <<
id() <<
"'" 146 <<
"\ncan not be satisfied because the product cannot be found." 147 <<
"\nProbably the branch containing the product is not stored in the input file.\n";
153 <<
"RefCore: A request to convert a contained product of type '" 154 <<
TypeID(actualType) <<
"'\n" 155 <<
" to type '" <<
TypeID(expectedType) <<
"'" 156 <<
"\nfor ProductID '" <<
id()
157 <<
"' can not be satisfied\n";
163 <<
"RefCore: A request to resolve a transient reference to a product of type: " 165 <<
"\ncan not be satisfied because the pointer to the product is null.\n";
176 return prodPtr !=
nullptr || (tId.
isValid() && prodGetter !=
nullptr && prodGetter->getIt(tId) !=
nullptr);
188 processIndex_ |= head;
197 <<
"RefCore::pushBackItem: Ref or Ptr has invalid (zero) product ID, so it cannot be added to RefVector (PtrVector). " 198 <<
"id should be (" <<
id() <<
")\n";
204 <<
"RefCore::pushBackItem: Transient Ref or Ptr cannot be added to persistable RefVector (PtrVector). " 205 <<
"id should be (" <<
id() <<
")\n";
208 <<
"RefCore::pushBackItem: Persistable Ref or Ptr cannot be added to transient RefVector (PtrVector). " 209 <<
"id is (" << productToBeInserted.
id() <<
")\n";
212 if (!productToBeInserted.
isTransient() &&
id() != productToBeInserted.
id()) {
214 <<
"RefCore::pushBackItem: Ref or Ptr is inconsistent with RefVector (PtrVector)" 215 <<
"id = (" << productToBeInserted.
id() <<
") should be (" <<
id() <<
")\n";
217 if (productToBeInserted.
isTransient() && checkPointer && productToBeInserted.
isNonnull() && productToBeInserted != *
this) {
219 <<
"RefCore::pushBackItem: Ref points into different collection than the RefVector.\n";
226 setId(productToBeInserted.
id());
246 <<
"RefCore::pushBackRefItem: Ref has invalid (zero) product ID, so it cannot be added to RefVector." 247 <<
"id should be (" <<
id() <<
")\n";
253 <<
"RefCore::pushBackRefItem: Transient Ref cannot be added to persistable RefVector. " 254 <<
"id should be (" <<
id() <<
")\n";
257 <<
"RefCore::pushBackRefItem: Persistable Ref cannot be added to transient RefVector. " 258 <<
"id is (" << productToBeInserted.
id() <<
")\n";
261 if (!productToBeInserted.
isTransient() &&
id() != productToBeInserted.
id()) {
263 <<
"RefCore::pushBackRefItem: Ref is inconsistent with RefVector" 264 <<
"id = (" << productToBeInserted.
id() <<
") should be (" <<
id() <<
")\n";
271 setId(productToBeInserted.
id());
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
void setProductPtr(void const *prodPtr) const
std::type_info const & dynamicTypeInfo() const
bool isThinnedAvailable(unsigned int thinnedKey, EDProductGetter const *prodGetter) const
virtual WrapperBase const * getThinnedProduct(ProductID const &, unsigned int &key) const =0
WrapperBase const * getProductPtr(std::type_info const &type, EDProductGetter const *prodGetter) const
ProcessIndex productIndex() const
WrapperBase const * tryToGetProductPtr(std::type_info const &type, EDProductGetter const *prodGetter) const
ProductIndex productIndex_
bool cachePtrIsInvalid() const
WrapperBase const * getThinnedProductPtr(std::type_info const &type, unsigned int &thinnedKey, EDProductGetter const *prodGetter) const
void const * productPtr() const
virtual WrapperBase const * getIt(ProductID const &) const =0
void productNotFoundException(std::type_info const &type) const
ProcessIndex processIndex_
RefCore & operator=(RefCore const &)
static void throwInvalidRefFromNullOrInvalidRef(const edm::TypeID &id)
void setId(ProductID const &iId)
EDProductGetter const * productGetter() const
const std::uintptr_t kCacheIsProductPtrBit
std::atomic< void const * > cachePtr_
const unsigned short kTransientBit
static void throwInvalidRefFromNoCache(const edm::TypeID &id, edm::ProductID const &prodID)
void setProductGetter(EDProductGetter const *prodGetter) const
void pushBackRefItem(RefCore const &productToBeInserted)
void setCacheIsProductGetter(EDProductGetter const *iGetter) const
ProcessIndex processIndex() const
void wrongTypeException(std::type_info const &expectedType, std::type_info const &actualType) const
void nullPointerForTransientException(std::type_info const &type) const