CMS 3D CMS Logo

FreeFunctionSelector.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_UtilAlgos_FreeFunctionSelector_h
00002 #define PhysicsTools_UtilAlgos_FreeFunctionSelector_h
00003 /* \class FreeFunctionSelector
00004  *
00005  * \author Luca Lista, INFN
00006  * 
00007  * \version $Id: FreeFunctionSelector.h,v 1.1 2008/01/22 11:17:58 llista Exp $  
00008  */
00009 template<typename T, bool f(const T&)>
00010 struct FreeFunctionSelector {
00011   bool operator()(const T& t) {
00012     return f(t);
00013   }
00014 };
00015 
00016 #include "PhysicsTools/UtilAlgos/interface/ParameterAdapter.h"
00017 
00018 namespace reco {
00019   namespace modules {
00020     template<typename T, bool f(const T&)>
00021     struct ParameterAdapter<FreeFunctionSelector<T, f> > { 
00022       typedef FreeFunctionSelector<T, f> value_type;
00023       static value_type make(const edm::ParameterSet & cfg) {
00024         return value_type();
00025       }
00026     };
00027   }
00028 }
00029 
00030 
00031 
00032 #endif

Generated on Tue Jun 9 17:42:11 2009 for CMSSW by  doxygen 1.5.4