CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/CommonTools/Utils/interface/MinObjectPairSelector.h

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