How to know fit is success or not?

If I have a TH1F *f, and do:
f->Fit(“gaus”);
How do I know fit is success or not?

For now I use: isnan(f->GetFunction(“gaus”)->GetParameter(0)) to do the judgement.

Thanks!

the documentation of TH1::Fit says:
see: root.cern.ch/root/html/TH1.html#TH1:Fit

Access to the fit status ======================== The function return the status of the fit (fitResult) in the following form fitResult = migradResult + 10*minosResult + 100*hesseResult + 1000*improveResult The fitResult is 0 is the fit is OK. The fitResult is negative in case of an error not connected with the fit.

Rene