CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
edm::ThinnedRefSet< C >::Filler Class Reference

#include <ThinnedRefSet.h>

Public Member Functions

 Filler (ThinnedRefSet< C > *set, RefProd< C > thinned, edm::EDProductGetter const &prodGetter)
 
template<typename T , typename F >
void insert (Ref< C, T, F > const &ref)
 

Private Attributes

edm::EDProductGetter const & prodGetter_
 
ThinnedRefSet< C > * set_
 
RefProd< C > thinnedRefProd_
 

Detailed Description

template<typename C>
class edm::ThinnedRefSet< C >::Filler

Definition at line 59 of file ThinnedRefSet.h.

Constructor & Destructor Documentation

template<typename C>
edm::ThinnedRefSet< C >::Filler::Filler ( ThinnedRefSet< C > *  set,
RefProd< C >  thinned,
edm::EDProductGetter const &  prodGetter 
)
inlineexplicit

Definition at line 61 of file ThinnedRefSet.h.

62  : set_(set), thinnedRefProd_(thinned), prodGetter_(prodGetter) {}
ThinnedRefSet< C > * set_
Definition: ThinnedRefSet.h:80
edm::EDProductGetter const & prodGetter_
Definition: ThinnedRefSet.h:82

Member Function Documentation

template<typename C>
template<typename T , typename F >
void edm::ThinnedRefSet< C >::Filler::insert ( Ref< C, T, F > const &  ref)
inline

Definition at line 65 of file ThinnedRefSet.h.

References edm::ignoreInvalidParentRef, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), edm::ThinnedRefSet< C >::Filler::prodGetter_, edm::ThinnedRefSet< C >::Filler::set_, edm::thinnedRefFrom(), edm::ThinnedRefSet< C >::Filler::thinnedRefProd_, and edm::tryThinnedRefFrom().

Referenced by BeautifulSoup.PageElement::_invert(), and SequenceTypes.Schedule::_replaceIfHeldDirectly().

65  {
66  if (ref.isNonnull()) {
67  Ref<C, T, F> thinnedRef;
68  if (set_->invalidParentRefMode_ == ThinnedRefSetMode::ignoreInvalidParentRef) {
69  thinnedRef = tryThinnedRefFrom(ref, thinnedRefProd_, prodGetter_);
70  } else {
71  thinnedRef = thinnedRefFrom(ref, thinnedRefProd_, prodGetter_);
72  }
73  if (thinnedRef.isNonnull()) {
74  set_->keys_.insert(thinnedRef.key());
75  }
76  }
77  }
ThinnedRefSet< C > * set_
Definition: ThinnedRefSet.h:80
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...
Definition: RefItemGet.h:129
edm::EDProductGetter const & prodGetter_
Definition: ThinnedRefSet.h:82
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...
Definition: RefItemGet.h:157

Member Data Documentation

template<typename C>
edm::EDProductGetter const& edm::ThinnedRefSet< C >::Filler::prodGetter_
private

Definition at line 82 of file ThinnedRefSet.h.

Referenced by edm::ThinnedRefSet< C >::Filler::insert().

template<typename C>
ThinnedRefSet<C>* edm::ThinnedRefSet< C >::Filler::set_
private

Definition at line 80 of file ThinnedRefSet.h.

Referenced by edm::ThinnedRefSet< C >::Filler::insert().

template<typename C>
RefProd<C> edm::ThinnedRefSet< C >::Filler::thinnedRefProd_
private

Definition at line 81 of file ThinnedRefSet.h.

Referenced by edm::ThinnedRefSet< C >::Filler::insert().