CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Attributes
SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder > Class Template Reference

#include <SortCollectionSelector.h>

Classes

struct  PairComparator
 

Public Types

typedef InputCollection collection
 

Public Member Functions

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

Private Types

typedef container::const_iterator const_iterator
 
typedef StoreContainer container
 
typedef std::pair< reference, size_t > pair
 

Private Attributes

RefAdder addRef_
 
PairComparator compare_
 
unsigned int maxNumber_
 
const typedef InputCollection::value_type * reference
 
StoreContainer selected_
 

Detailed Description

template<typename InputCollection, typename Comparator, typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
class SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >

selects the first N elements based on a sorting algorithm

Author
Luca Lista, INFN
Version
Revision
1.1
Id
SortCollectionSelector.h,v 1.1 2009/03/03 13:07:28 llista Exp

Definition at line 34 of file SortCollectionSelector.h.

Member Typedef Documentation

◆ collection

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef InputCollection SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::collection

Definition at line 36 of file SortCollectionSelector.h.

◆ const_iterator

template<typename InputCollection , typename Comparator , 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 SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::const_iterator
private

Definition at line 42 of file SortCollectionSelector.h.

◆ container

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef StoreContainer SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::container
private

Definition at line 41 of file SortCollectionSelector.h.

◆ pair

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
typedef std::pair<reference, size_t> SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::pair
private

Definition at line 40 of file SortCollectionSelector.h.

Constructor & Destructor Documentation

◆ SortCollectionSelector()

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::SortCollectionSelector ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 45 of file SortCollectionSelector.h.

46  : compare_(Comparator()), maxNumber_(cfg.template getParameter<unsigned int>("maxNumber")) {}

Member Function Documentation

◆ begin()

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
const_iterator SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::begin ( void  ) const
inline

◆ end()

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
const_iterator SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::end ( void  ) const
inline

◆ select()

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
void SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::select ( const edm::Handle< InputCollection > &  c,
const edm::Event ,
const edm::EventSetup  
)
inline

Member Data Documentation

◆ addRef_

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
RefAdder SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::addRef_
private

◆ compare_

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
PairComparator SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::compare_
private

◆ maxNumber_

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
unsigned int SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::maxNumber_
private

◆ reference

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
const typedef InputCollection::value_type* SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::reference
private

Definition at line 39 of file SortCollectionSelector.h.

◆ selected_

template<typename InputCollection , typename Comparator , typename OutputCollection = typename helper::SelectedOutputCollectionTrait<InputCollection>::type, typename StoreContainer = typename helper::StoreContainerTrait<OutputCollection>::type, typename RefAdder = typename helper::SelectionAdderTrait<InputCollection, StoreContainer>::type>
StoreContainer SortCollectionSelector< InputCollection, Comparator, OutputCollection, StoreContainer, RefAdder >::selected_
private
mps_fire.i
i
Definition: mps_fire.py:428
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
findQualityFiles.v
v
Definition: findQualityFiles.py:179
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
SortCollectionSelector::addRef_
RefAdder addRef_
Definition: SortCollectionSelector.h:68
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
SortCollectionSelector::maxNumber_
unsigned int maxNumber_
Definition: SortCollectionSelector.h:66
looper.cfg
cfg
Definition: looper.py:297
Comparator
Definition: Comparator.h:15
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
SortCollectionSelector::selected_
StoreContainer selected_
Definition: SortCollectionSelector.h:67
SortCollectionSelector::compare_
PairComparator compare_
Definition: SortCollectionSelector.h:65