CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RangeSelector< T, fun > Struct Template Reference

#include <RangeSelector.h>

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.

13 : min_(min), max_(max) {}
T min(T a, T b)
Definition: MathUtil.h:58

Member Function Documentation

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

Definition at line 14 of file RangeSelector.h.

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

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

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()().