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

◆ RangeSelector()

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) {}

Member Function Documentation

◆ operator()()

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.

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

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

Member Data Documentation

◆ max_

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

◆ min_

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

RangeSelector::max_
double max_
Definition: RangeSelector.h:20
min
T min(T a, T b)
Definition: MathUtil.h:58
DDAxes::x
RangeSelector::min_
double min_
Definition: RangeSelector.h:20
OrderedSet.t
t
Definition: OrderedSet.py:90
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169