00001 #ifndef RecoAlgos_MinFunctionSelector_h 00002 #define RecoAlgos_MinFunctionSelector_h 00003 /* \class MinFunctionSelector 00004 * 00005 * \author Luca Lista, INFN 00006 * 00007 * $Id: MinFunctionSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $ 00008 */ 00009 00010 template<typename T, double (T::*fun)() const> 00011 struct MinFunctionSelector { 00012 MinFunctionSelector( double min ) : 00013 min_( min ) { } 00014 bool operator()( const T & t ) const { return (t.*fun)() >= min_; } 00015 private: 00016 double min_; 00017 }; 00018 00019 #endif