How to get the parameters from a fit


I made a fit from a TGraphErrors, like that :

TGraphErrors * graph_llh = new TGraphErrors(nb_sa_histos, x, y, ex, ey) ;
graph_llh -> Fit("pol2") ;

How could I simply get the parameters in my program. Ican see them in the canvas using
gStyle -> SetOptFit(11) ; But I would like to make some calculus using the fit parameters.

Thanks in advance for your help,

[code]TF1 *f = graph_llh->GetFunction(“pol2”);
f->GetParameter(0); // 0, 1, 2

f->GetParameter(“p0”); // p0, p1, p2



Tnaks for the answer, I found such a trick in the ROOTmanual but it wasn’t working, Ijust forgot to include the TF1.h, anyway your mail helped me that the error was somewhere elese !

Thanks, have a nice day