CommonTools
Utils
interface
RangeSelector.h
Go to the documentation of this file.
1
#ifndef RecoAlgos_RangeSelector_h
2
#define RecoAlgos_RangeSelector_h
3
/* \class RangeSelector
4
*
5
* \author Luca Lista, INFN
6
*
7
* $Id: RangeSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $
8
*/
9
#include <string>
10
11
template
<
typename
T,
double
(T::*fun)() const>
12
struct
RangeSelector
{
13
RangeSelector
(
double
min
,
double
max
) :
min_
(
min
),
max_
(
max
) {}
14
bool
operator()
(
const
T
&
t
)
const
{
15
double
x
= (
t
.*fun)();
16
return
min_
<=
x
&&
x
<=
max_
;
17
}
18
19
private
:
20
double
min_
,
max_
;
21
};
22
23
#endif
RangeSelector::max_
double max_
Definition:
RangeSelector.h:20
RangeSelector
Definition:
RangeSelector.h:12
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
RangeSelector::operator()
bool operator()(const T &t) const
Definition:
RangeSelector.h:14
T
long double T
Definition:
Basic3DVectorLD.h:48
RangeSelector::RangeSelector
RangeSelector(double min, double max)
Definition:
RangeSelector.h:13
Generated for CMSSW Reference Manual by
1.8.16