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

Hello,

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?

                              Thanks

                                 Andrea

Hold on:

I saw this thread:
root.cern.ch/phpBB2/viewtopic.php?p=32231

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

                               Andrea