|
|
Go to the documentation of this file. 1 #ifndef DataFormats_Common_RefItemGet_h
2 #define DataFormats_Common_RefItemGet_h
18 template <
typename C,
typename T,
typename F,
typename K>
25 template <
typename C,
typename T,
typename F,
typename KEY>
29 if (
item !=
nullptr) {
33 if (
nullptr == prodGetter) {
35 if (
item !=
nullptr) {
53 template <
typename C,
typename T,
typename F>
57 if (
item !=
nullptr) {
61 if (getter ==
nullptr) {
63 if (
prod !=
nullptr) {
65 return static_cast<T const*>(
prod);
69 if (
prod !=
nullptr) {
75 unsigned int thinnedKey;
85 template <
typename C,
typename T,
typename F,
typename KEY>
91 template <
typename C,
typename KEY>
106 if (getter !=
nullptr) {
115 template <
typename C,
typename KEY>
128 template <
typename C,
typename T,
typename F>
137 if (std::holds_alternative<unsigned int>(thinnedKey)) {
138 return Ref<C, T, F>(thinned, std::get<unsigned int>(thinnedKey));
139 }
else if (std::holds_alternative<detail::GetThinnedKeyFromExceptionFactory>(thinnedKey)) {
140 auto ex = std::get<detail::GetThinnedKeyFromExceptionFactory>(thinnedKey)();
141 ex.addContext(
"Calling edm::thinnedRefFrom()");
156 template <
typename C,
typename T,
typename F>
165 if (std::holds_alternative<unsigned int>(thinnedKey)) {
166 return Ref<C, T, F>(thinned, std::get<unsigned int>(thinnedKey));
static bool isThinnedAvailable_(RefCore const &product, KEY const &key)
void setProductPtr(void const *prodPtr) const
ProductID id() const
Accessor for product ID.
T const * getRefPtr(RefCore const &product, KEY const &iKey)
Ref< C, T, F > tryThinnedRefFrom(Ref< C, T, F > const &parent, RefProd< C > const &thinned, edm::EDProductGetter const &prodGetter)
Return a Ref to thinned collection corresponding to an element of the Ref to parent collection.
virtual OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const =0
static bool isThinnedAvailable_(RefCore const &ref, unsigned int key)
static T const * getRefPtr_(RefCore const &product, unsigned int key)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
EDProductGetter const * productGetter() const
static T const * getRefPtr_(RefCore const &product, KEY const &key)
def template(fileName, svg, replaceme="REPLACEME")
bool isThinnedAvailable(unsigned int key, EDProductGetter const *prodGetter) const
void const * productPtr() const
void findRefItem(RefCore const &refCore, C const *container, K const &key)
Ref< C, T, F > thinnedRefFrom(Ref< C, T, F > const &parent, RefProd< C > const &thinned, edm::EDProductGetter const &prodGetter)
Return a Ref to thinned collection corresponding to an element of the Ref to parent collection.
bool isThinnedAvailable(RefCore const &product, KEY const &iKey)