CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/CommonTools/Utils/interface/MaxObjectPairSelector.h

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