I copy/pasted you example and can not reproduce your problem. Also the error seems to indicate that rather than new TF1(“ft10c”,test,1,1500,4) you may have type new TF1(“ft10c”,“test”,1,1500,4) [note the extra quotes].
Well I tried to fit my histogram within the macro :
h1->Fit(fit10c,“r”)
and then it works. Seems that the problem comes with the FitPanel that does not recognize fit10c, except if in the macro I write :
h1->Fit(fit10c,“r+”)
and then I can use fit10c within the FitPanel.
Is there an explanation for this?
sorry but the computer I use for root is not connected to the network so it’s hard to copy codes to the forum (transfers from that machine are not allowed.)
I would need a running script to reproduce the problem. In addition I would like to know also the ROOT version are you using. Many changes have been applied recently in the FitPanel,