An error message when a fit with a TF1 function is performed


I am using root 5.18.00.
I got the following error message “many” times when I perform a fit of an histogram with a TF1 function defined with a class which has a operator()(double*,double*) method:

Error: Cint::G__CallFunc::SetArgArray() must be initialized with ‘Cint::G__CallFunc::SetFunc(G__ClassInfo* cls,char* fname,char* args,long* poffset)’ first

and the histogram is drawn properly but the function is not (flat line at zero).

Actually the fit is performed properly and if I Draw the TF1 function it looks correct. If I Draw it with “same” option I get the same error messages again but the function is drawn properly on top of the histogram.

Does anyone know how to avoid it?



Hold on:

I saw this thread:

it looks like it is solved in more recent versions. I’ll try.