CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes
Selection< C, Selector, StoreContainer > Class Template Reference

#include <Selection.h>

Classes

class  const_iterator
 

Public Types

typedef value_typereference
 
typedef C::size_type size_type
 
typedef C::value_type value_type
 

Public Member Functions

const_iterator begin () const
 
bool empty () const
 
const_iterator end () const
 
const_reference operator[] (size_type i)
 
 Selection (const C &c, const Selector &sel)
 
size_type size () const
 

Public Attributes

const typedef value_typeconst_reference
 

Private Attributes

Selector select_
 
StoreContainer selected_
 

Detailed Description

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
class Selection< C, Selector, StoreContainer >

Definition at line 6 of file Selection.h.

Member Typedef Documentation

◆ reference

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
typedef value_type& Selection< C, Selector, StoreContainer >::reference

Definition at line 10 of file Selection.h.

◆ size_type

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
typedef C::size_type Selection< C, Selector, StoreContainer >::size_type

Definition at line 9 of file Selection.h.

◆ value_type

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
typedef C::value_type Selection< C, Selector, StoreContainer >::value_type

Definition at line 8 of file Selection.h.

Constructor & Destructor Documentation

◆ Selection()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
Selection< C, Selector, StoreContainer >::Selection ( const C &  c,
const Selector sel 
)
inline

Definition at line 12 of file Selection.h.

12  : select_(sel) {
13  for (typename C::const_iterator i = c.begin(); i != c.end(); ++i) {
14  if (select_(*i))
15  selected_.push_back(&*i);
16  }
17  }

References c, mps_fire::i, Selection< C, Selector, StoreContainer >::select_, and Selection< C, Selector, StoreContainer >::selected_.

Member Function Documentation

◆ begin()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
const_iterator Selection< C, Selector, StoreContainer >::begin ( void  ) const
inline

Definition at line 70 of file Selection.h.

70 { return const_iterator(selected_.begin()); }

References Selection< C, Selector, StoreContainer >::selected_.

◆ empty()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
bool Selection< C, Selector, StoreContainer >::empty ( ) const
inline

Definition at line 73 of file Selection.h.

73 { return selected_.empty(); }

References Selection< C, Selector, StoreContainer >::selected_.

◆ end()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
const_iterator Selection< C, Selector, StoreContainer >::end ( void  ) const
inline

Definition at line 71 of file Selection.h.

71 { return const_iterator(selected_.end()); }

References Selection< C, Selector, StoreContainer >::selected_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

◆ operator[]()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
const_reference Selection< C, Selector, StoreContainer >::operator[] ( size_type  i)
inline

Definition at line 74 of file Selection.h.

74 { return *selected_[i]; }

References mps_fire::i, and Selection< C, Selector, StoreContainer >::selected_.

◆ size()

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
size_type Selection< C, Selector, StoreContainer >::size ( void  ) const
inline

Member Data Documentation

◆ const_reference

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
const typedef value_type& Selection< C, Selector, StoreContainer >::const_reference

Definition at line 11 of file Selection.h.

◆ select_

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
Selector Selection< C, Selector, StoreContainer >::select_
private

Definition at line 77 of file Selection.h.

Referenced by Selection< C, Selector, StoreContainer >::Selection().

◆ selected_

template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type*>>
StoreContainer Selection< C, Selector, StoreContainer >::selected_
private
mps_fire.i
i
Definition: mps_fire.py:428
Selection::selected_
StoreContainer selected_
Definition: Selection.h:78
Selection::select_
Selector select_
Definition: Selection.h:77
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56