CMS 3D CMS Logo

Public Member Functions | Private Attributes

RangeSelector< T, fun > Struct Template Reference

#include <RangeSelector.h>

List of all members.

Public Member Functions

bool operator() (const T &t) const
 RangeSelector (double min, double max)

Private Attributes

double max_
double min_

Detailed Description

template<typename T, double(T::*)() const fun>
struct RangeSelector< T, fun >

Definition at line 12 of file RangeSelector.h.


Constructor & Destructor Documentation

template<typename T , double(T::*)() const fun>
RangeSelector< T, fun >::RangeSelector ( double  min,
double  max 
) [inline]

Definition at line 13 of file RangeSelector.h.

                                          : 
    min_( min ), max_( max ) { }

Member Function Documentation

template<typename T , double(T::*)() const fun>
bool RangeSelector< T, fun >::operator() ( const T t) const [inline]

Definition at line 15 of file RangeSelector.h.

References RangeSelector< T, fun >::max_, RangeSelector< T, fun >::min_, and x.

                                       { 
    double x = (t.*fun)();
    return min_ <= x && x <= max_; 
  }

Member Data Documentation

template<typename T , double(T::*)() const fun>
double RangeSelector< T, fun >::max_ [private]

Definition at line 20 of file RangeSelector.h.

Referenced by RangeSelector< T, fun >::operator()().

template<typename T , double(T::*)() const fun>
double RangeSelector< T, fun >::min_ [private]

Definition at line 20 of file RangeSelector.h.

Referenced by RangeSelector< T, fun >::operator()().