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 
18 
19 template<typename InputCollection, typename Selector,
21  typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type,
25  typedef StoreContainer container;
26  typedef typename container::const_iterator const_iterator;
28  select_( reco::modules::make<Selector>( cfg ) ) { }
29  const_iterator begin() const { return selected_.begin(); }
30  const_iterator end() const { return selected_.end(); }
31  void select(const edm::Handle<InputCollection> & c, const edm::Event &ev, const edm::EventSetup &) {
32  selected_.clear();
33  for(size_t idx = 0; idx < c->size(); ++ idx) {
34  if(select_((*c)[idx], ev))
35  addRef_(selected_, c, idx);
36  }
37  }
38 private:
39  StoreContainer selected_;
41  RefAdder addRef_;
42 };
43 
44 #endif
45 
std::vector< ProtoJet > OutputCollection
Definition: JetRecoTypes.h:63
std::vector< const typename OutputCollection::value_type * > type
std::vector< InputItem > InputCollection
Definition: JetRecoTypes.h:62
S make(const edm::ParameterSet &cfg)
void select(const edm::Handle< InputCollection > &c, const edm::Event &ev, const edm::EventSetup &)
Functor that operates on &lt;T&gt;
Definition: Selector.h:25
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...