CMS 3D CMS Logo

SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder > Class Template Reference

selects a subset of a collection based on single element selection done via functor More...

#include <PhysicsTools/UtilAlgos/interface/SingleElementCollectionRefSelector.h>

List of all members.

Public Types

typedef InputCollection collection
typedef container::const_iterator const_iterator
typedef StoreContainer container
typedef edm::View< InputType > InputCollection
typedef Selector selector

Public Member Functions

const_iterator begin () const
const_iterator end () const
void select (const edm::Handle< InputCollection > &c, const edm::Event &, const edm::EventSetup &)
 SingleElementCollectionRefSelector (const edm::ParameterSet &cfg)

Private Attributes

RefAdder addRef_
selector select_
container selected_

Friends

class reco::modules::SingleElementCollectionRefSelectorEventSetupInit< SingleElementCollectionRefSelector >


Detailed Description

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
class SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >

selects a subset of a collection based on single element selection done via functor

Author:
Luca Lista, INFN
Version:
Revision
1.1

Id
SingleElementCollectionRefSelector.h,v 1.1 2008/07/23 14:13:10 llista Exp

Definition at line 28 of file SingleElementCollectionRefSelector.h.


Member Typedef Documentation

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
typedef InputCollection SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::collection

Definition at line 30 of file SingleElementCollectionRefSelector.h.

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
typedef container::const_iterator SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::const_iterator

Definition at line 33 of file SingleElementCollectionRefSelector.h.

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
typedef StoreContainer SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::container

Definition at line 31 of file SingleElementCollectionRefSelector.h.

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
typedef edm::View<InputType> SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::InputCollection

Definition at line 29 of file SingleElementCollectionRefSelector.h.

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
typedef Selector SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::selector

Definition at line 32 of file SingleElementCollectionRefSelector.h.


Constructor & Destructor Documentation

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::SingleElementCollectionRefSelector ( const edm::ParameterSet cfg  )  [inline]

Definition at line 34 of file SingleElementCollectionRefSelector.h.

00034                                                                   : 
00035     select_(reco::modules::make<Selector>(cfg)) { }


Member Function Documentation

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
const_iterator SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::begin ( void   )  const [inline]

Definition at line 36 of file SingleElementCollectionRefSelector.h.

00036 { return selected_.begin(); }

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
const_iterator SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::end ( void   )  const [inline]

Definition at line 37 of file SingleElementCollectionRefSelector.h.

00037 { return selected_.end(); }

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
void SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::select ( const edm::Handle< InputCollection > &  c,
const edm::Event ,
const edm::EventSetup  
) [inline]

Definition at line 38 of file SingleElementCollectionRefSelector.h.

00038                                                                                             {
00039     selected_.clear();    
00040     for(size_t idx = 0; idx < c->size(); ++ idx) {
00041       if(select_(c->refAt(idx))) addRef_(selected_, c, idx);
00042     }
00043   }


Friends And Related Function Documentation

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
friend class reco::modules::SingleElementCollectionRefSelectorEventSetupInit< SingleElementCollectionRefSelector > [friend]

Definition at line 48 of file SingleElementCollectionRefSelector.h.


Member Data Documentation

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
RefAdder SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::addRef_ [private]

Definition at line 47 of file SingleElementCollectionRefSelector.h.

Referenced by SingleElementCollectionRefSelector< InputType, Selector, std::vector< ProtoJet >, StoreContainer, RefAdder >::select().

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
selector SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::select_ [private]

Definition at line 46 of file SingleElementCollectionRefSelector.h.

Referenced by SingleElementCollectionRefSelector< InputType, Selector, std::vector< ProtoJet >, StoreContainer, RefAdder >::select().

template<typename InputType, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<edm::View<InputType> >::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<edm::View<InputType>, StoreContainer>::type>
container SingleElementCollectionRefSelector< InputType, Selector, OutputCollection, StoreContainer, RefAdder >::selected_ [private]

Definition at line 45 of file SingleElementCollectionRefSelector.h.

Referenced by SingleElementCollectionRefSelector< InputType, Selector, std::vector< ProtoJet >, StoreContainer, RefAdder >::begin(), SingleElementCollectionRefSelector< InputType, Selector, std::vector< ProtoJet >, StoreContainer, RefAdder >::end(), and SingleElementCollectionRefSelector< InputType, Selector, std::vector< ProtoJet >, StoreContainer, RefAdder >::select().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:31:45 2009 for CMSSW by  doxygen 1.5.4