Go to the documentation of this file. 1 #ifndef DataFormats_Common_ThinnedRefSet_h
2 #define DataFormats_Common_ThinnedRefSet_h
49 #include <unordered_set>
64 template <
typename T,
typename F>
74 set_->keys_.insert(thinnedRef.
key());
89 return Filler(
this, thinned, prodGetter);
97 std::unordered_set<unsigned int>
keys_;
ThinnedRefSetMode invalidParentRefMode_
ThinnedRefSet(ThinnedRefSetMode mode=ThinnedRefSetMode::throwOnInvalidParentRef)
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.
edm::EDProductGetter const & prodGetter_
bool contains(unsigned int key) const
std::unordered_set< unsigned int > keys_
RefProd< C > thinnedRefProd_
bool isNonnull() const
Checks for non-null.
void insert(Ref< C, T, F > const &ref)
Filler(ThinnedRefSet< C > *set, RefProd< C > thinned, edm::EDProductGetter const &prodGetter)
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.
ThinnedRefSet< C > * set_
key_type key() const
Accessor for product key.
Filler fill(RefProd< C > thinned, edm::EDProductGetter const &prodGetter)