TF1 Function Pointer w/Class Method


I have a class called function:

[code]class function
int points_m;
math_objects::vector x_m;
math_objects::vector y_m;
Base_interp* interp_m;
enum interpolations{linear, polynomial, cubic_spline, b_spline, rational, bary_rational};
static mapstd::string,interpolations interp_map_enum;

function(int num_points, const math_objects::vector& x, const math_objects::vector& y, std::string& interp_type);
double operator()(double abscissa) const;
double operator()(double *x, double *par);


I am trying to create a TF! object so that I can call my operator method (double operator() (double *x, double * par)

I tried something like:
function *fn1=new function(2, v1, v2, type); and then
TF1 * f = new TF1(“f”,fn1,1,5,0);

This didn’t work. I think I need a pointer to the overloaded operator method () itself. However, I wasn’t sure of the correct syntax. I did look at the examples on the Web. However, these didn’t answer my question.
Look forward to any suggestions on this.



[quote]This didn’t work.[/quote]Please note that the above code is currently supported only in compiled code and is expected to failed in CINT (lack of full support for template member functions defined in compiled class). Try with compiling you script via ACLiC.