CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/PhysicsTools/Utilities/interface/RootVarsAdapter.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_Utilities_RootVarsAdapter_h
00002 #define PhysicsTools_Utilities_RootVarsAdapter_h
00003 
00004 namespace root {
00005   namespace helper {
00006   
00007     template<typename F, unsigned int args>
00008     struct RootVarsAdapter {
00009     };
00010     
00011     template<typename F>
00012     struct RootVarsAdapter<F, 1> {
00013       static double value(F& f, const double * var) {
00014         return f(var[0]);
00015       }
00016     };
00017     
00018     template<typename F>
00019     struct RootVarsAdapter<F, 2> {
00020       static double value(F& f, const double * var) {
00021         return f(var[0], var[1]);
00022       }
00023     };
00024   }
00025 }
00026 
00027 #endif