CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  :
14  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 15 of file RangeSelector.h.

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

15  {
16  double x = (t.*fun)();
17  return min_ <= x && x <= max_;
18  }
Definition: DDAxes.h:10

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