This is only a partial answer to your questions, but perhaps it will be sufficient until an expert gets back to you:
a.bragagnolo:
How can I suppress them?
You can suppress output by doing:
ROOT.RooMsgService.instance().setGlobalKillBelow(ROOT.RooFit.FATAL)
where FATAL can be replaced by ERROR, WARNING, INFO, etc., depending on what output you want to see.
The status codes are detailed in this post :
This values depends on the Minimizer used for fitting. For example if you are using Minuit2, you will have:
status = 0 : OK
status = 1 : Covariance was mad epos defined
status = 2 : Hesse is invalid
status = 3 : Edm is above max
status = 4 : Reached call limit
status = 5 : Any other failure
You can, of course, check the value of the code instead of printing it.
a.bragagnolo:
Bonus (hard) question:
sometimes I get a call limits, to avoid this I have increased the default number to
ROOT::Math::MinimizerOptions::SetDefaultMaxFunctionCalls( 5000 );
this however increase a lot the annoying above-mentioned warnings. Is there a way to know if call limits was it -> increase max function calls -> re fit -> reset max function calls?
I don’t really understand this part of your question. If you’re not worried about seeing WARNINGs, you can use the setGlobalKillBelow
function mentioned above.