CMS 3D CMS Logo

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

#include <Selection.h>

Classes

class  const_iterator
 

Public Types

typedef const value_typeconst_reference
 
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
 

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 8 of file Selection.h.

Member Typedef Documentation

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

Definition at line 13 of file Selection.h.

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 12 of file Selection.h.

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 11 of file Selection.h.

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 10 of file Selection.h.

Constructor & Destructor Documentation

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 14 of file Selection.h.

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

14  :
15  select_( sel ) {
16  for( typename C::const_iterator i = c.begin(); i != c.end(); ++i ) {
17  if ( select_( *i ) ) selected_.push_back( & * i );
18  }
19  }
Selector select_
Definition: Selection.h:54
StoreContainer selected_
Definition: Selection.h:55

Member Function Documentation

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 48 of file Selection.h.

References Selection< C, Selector, StoreContainer >::const_iterator::const_iterator(), and Selection< C, Selector, StoreContainer >::selected_.

48 { return const_iterator( selected_.begin() ); }
StoreContainer selected_
Definition: Selection.h:55
template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type *>>
bool Selection< C, Selector, StoreContainer >::empty ( ) const
inline
template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type *>>
const_iterator Selection< C, Selector, StoreContainer >::end ( void  ) const
inline
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
template<typename C, typename Selector, typename StoreContainer = std::vector<const typename C::value_type *>>
size_type Selection< C, Selector, StoreContainer >::size ( void  ) const
inline

Definition at line 50 of file Selection.h.

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

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

50 { return selected_.size(); }
StoreContainer selected_
Definition: Selection.h:55

Member Data Documentation

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

Definition at line 54 of file Selection.h.

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

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