Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:31

0001 #ifndef PhysicsTools_Utilities_RootVarsAdapter_h
0002 #define PhysicsTools_Utilities_RootVarsAdapter_h
0003 
0004 namespace root {
0005   namespace helper {
0006 
0007     template <typename F, unsigned int args>
0008     struct RootVarsAdapter {};
0009 
0010     template <typename F>
0011     struct RootVarsAdapter<F, 1> {
0012       static double value(F& f, const double* var) { return f(var[0]); }
0013     };
0014 
0015     template <typename F>
0016     struct RootVarsAdapter<F, 2> {
0017       static double value(F& f, const double* var) { return f(var[0], var[1]); }
0018     };
0019   }  // namespace helper
0020 }  // namespace root
0021 
0022 #endif