How to access the errorflags from the fitter

I would like to sort out fits that terminate like:

Warning in : Abnormal termination of minimization.

after having called for example

hist->Fit(myfunc);

Is a flag somewhere stored in myfunc or where do I access this information?

Hi,
you can check the return status of TH1::Fit. In case of a non successful fit, the status is not zero with a value depending on the error and the type of algorithm used.
See “Access to the fit status” in root.cern.ch/root/htmldoc/TH1.html#TH1:Fit

Best Regards

Lorenzo

Mighty are those who can read :blush: .

Thank you!