CMS 3D CMS Logo

MaxFunctionSelector.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_MaxFunctionSelector_h
2 #define RecoAlgos_MaxFunctionSelector_h
3 /* \class MaxSelector
4  *
5  * \author Luca Lista, INFN
6  *
7  * $Id: MaxFunctionSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $
8  */
9 
10 template<typename T, double (T::*fun)() const>
12  MaxFunctionSelector( double max ) :
13  max_( max ) { }
14  bool operator()( const T & t ) const { return (t.*fun)() <= max_; }
15 
16 private:
17  double max_;
18 };
19 
20 #endif
MaxFunctionSelector(double max)
bool operator()(const T &t) const
long double T