CMS 3D CMS Logo

AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder > Class Template Reference

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

List of all members.

Public Types

typedef InputCollection collection
typedef container::const_iterator const_iterator
typedef StoreContainer container
typedef Selector selector

Public Member Functions

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

Private Attributes

RefAdder addRef_
selector select_
container selected_
edm::InputTag var_

Friends

class reco::modules::AssociatedVariableCollectionSelectorEventSetupInit< AssociatedVariableCollectionSelector >


Detailed Description

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
class AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >

Definition at line 29 of file AssociatedVariableCollectionSelector.h.


Member Typedef Documentation

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef InputCollection AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::collection

Definition at line 31 of file AssociatedVariableCollectionSelector.h.

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef container::const_iterator AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::const_iterator

Definition at line 34 of file AssociatedVariableCollectionSelector.h.

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef StoreContainer AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::container

Definition at line 32 of file AssociatedVariableCollectionSelector.h.

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef Selector AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::selector

Definition at line 33 of file AssociatedVariableCollectionSelector.h.


Constructor & Destructor Documentation

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

Definition at line 35 of file AssociatedVariableCollectionSelector.h.

00035                                                                     : 
00036     var_(cfg.template getParameter<edm::InputTag>("var")),
00037     select_(reco::modules::make<Selector>(cfg)) { }


Member Function Documentation

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
const_iterator AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::begin ( void   )  const [inline]

Definition at line 38 of file AssociatedVariableCollectionSelector.h.

References AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::selected_.

00038 { return selected_.begin(); }

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
const_iterator AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::end ( void   )  const [inline]

Definition at line 39 of file AssociatedVariableCollectionSelector.h.

References AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::selected_.

00039 { return selected_.end(); }

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

Definition at line 40 of file AssociatedVariableCollectionSelector.h.

References AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::addRef_, edm::Event::getByLabel(), edm::getRef(), AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select_, AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::selected_, and AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::var_.

00040                                                                                               {
00041     selected_.clear();    
00042     edm::Handle<VarCollection> var;
00043     evt.getByLabel(var_, var);
00044     for(size_t idx = 0; idx < c->size(); ++idx) {
00045       if (select_((*c)[idx], (*var)[edm::getRef(c,idx)])) 
00046         addRef_(selected_, c, idx);
00047     }
00048   }


Friends And Related Function Documentation

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
friend class reco::modules::AssociatedVariableCollectionSelectorEventSetupInit< AssociatedVariableCollectionSelector > [friend]

Definition at line 54 of file AssociatedVariableCollectionSelector.h.


Member Data Documentation

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
RefAdder AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::addRef_ [private]

Definition at line 53 of file AssociatedVariableCollectionSelector.h.

Referenced by AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select().

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
selector AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select_ [private]

Definition at line 52 of file AssociatedVariableCollectionSelector.h.

Referenced by AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select().

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
container AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::selected_ [private]

Definition at line 51 of file AssociatedVariableCollectionSelector.h.

Referenced by AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::begin(), AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::end(), and AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select().

template<typename InputCollection, typename VarCollection, typename Selector, typename OutputCollection = typename ::helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename ::helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename ::helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
edm::InputTag AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::var_ [private]

Definition at line 50 of file AssociatedVariableCollectionSelector.h.

Referenced by AssociatedVariableCollectionSelector< InputCollection, VarCollection, Selector, OutputCollection, StoreContainer, RefAdder >::select().


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