CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/CommonTools/Utils/interface/FunctionMinSelector.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_FunctionMinSelector_h
00002 #define CommonTools_Utils_FunctionMinSelector_h
00003 /* \class FunctionMinSelector
00004  *
00005  * \author Luca Lista, INFN
00006  *
00007  * $Id: FunctionMinSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $
00008  */
00009 
00010 template<typename F>
00011 struct FunctionMinSelector {
00012   explicit FunctionMinSelector( double minCut ) :
00013     minCut_( minCut ) { }
00014   bool operator()( const typename F::type & t ) const {
00015     return f( t ) >= minCut_;
00016   }
00017 private:
00018   F f;
00019   double minCut_;
00020 };
00021 
00022 #endif