CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SingleElementCollectionSelectorPlusEvent.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_SingleElementCollectionSelectorPlusEvent_h
2 #define RecoAlgos_SingleElementCollectionSelectorPlusEvent_h
3 
19 
20 template<typename InputCollection, typename Selector,
21  typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type,
22  typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type,
25  typedef InputCollection collection;
26  typedef StoreContainer container;
27  typedef typename container::const_iterator const_iterator;
29  select_( reco::modules::make<Selector>( cfg, iC ) ) { }
30  const_iterator begin() const { return selected_.begin(); }
31  const_iterator end() const { return selected_.end(); }
33  selected_.clear();
34  for(size_t idx = 0; idx < c->size(); ++ idx) {
35  if(select_((*c)[idx], ev))
36  addRef_(selected_, c, idx);
37  }
38  }
39 private:
40  StoreContainer selected_;
42  RefAdder addRef_;
43 };
44 
45 #endif
46 
std::vector< const typename OutputCollection::value_type * > type
S make(const edm::ParameterSet &cfg)
void select(const edm::Handle< InputCollection > &c, const edm::Event &ev, const edm::EventSetup &)
bool ev
SingleElementCollectionSelectorPlusEvent(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Functor that operates on &lt;T&gt;
Definition: Selector.h:24
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...