Home | News | Documentation | Download

Suppressing INFO messages

Hello everybody,

I want to suppress the INFO messages, but I can’t find a way to do it.
I already switched on the silent mode.
The code line that creates the messages is the following:

RooNLLVar nll("nll","nll",bw_cb_conv,data,RooFit::Verbose(kFALSE));

The verbose doesn’t have any effect.

Thanks for your help!
Cheers,
dWade

Hi,

Use:gErrorIgnoreLevel = kInfo; to suppress the Info messages.

Cheers,
Philippe.

Hi Philippe,

thanks for your response, but unfortunately this doesn’t work out for me, the output is still there. Any further ideas?
I included the info messages below, maybe they give a hint.

[#1] INFO:Eval -- RooRealVar::setRange(mass) new range named 'refrange_fft_bw_cb_conv' created with bounds [66,116]
[#1] INFO:Caching -- RooAbsCachedPdf::getCache(bw_cb_conv) creating new cache 0x1dc0d1a0 with pdf bw_CONV_cb_CACHE_Obs[beta,mass] for nset (mass,eta1,eta2) with code 0
[#1] INFO:NumericIntegration -- RooRealIntegral::init(bw_CONV_cb_CACHE_Obs[beta,mass]_Int[mass]) using numeric integrator RooIntegrator1D to calculate Int(mass)

Cheers,
dWade

Hi,

For the RooFit message, you need to manipulate the RooFit::MsgService: root.cern.ch/root/html/RooMsgService.html

For example, this might do what you need (or probably be ‘too quiet’):RooFit::RooMsgService::instance().SetStreamStatus(1,false);
or maybe a series of// Remove stream for integration RooFit::RooMsgService::instance().getStream(1).removeTopic(NumericIntegration) ;

Cheers,
Philippe

Just a small correction of the first Philippe’s post … in order to get rid of “Info in …” messages, one needs to set: gErrorIgnoreLevel = kWarning;
See [url]How to set output verbosity level in ROOT? and “${ROOTSYS}/include/TError.h” or “${ROOTSYS}/include/root/TError.h” files.

Hi again,

sorry for my long absence.

Unfortunately none of all the suggestions worked out for me. I have no idea where the problem is. If you have any further ideas I would appreciate it.

Cheers,
dWade

Hi,

The RoOFit command to suppress all the Info and Progress message is:

RooMsgService::instance().setGlobalKillBelow(RooFit::WARNING) ;

I remind you the message are ordered by the following enumeration defined in RooGlobalFunc.h

enum MsgLevel { DEBUG=0, INFO=1, PROGRESS=2, WARNING=3, ERROR=4, FATAL=5 } ;

I hope this works now for you,
Best Regards
Lorenzo

1 Like

Hi moneta,

thanks for your suggestion but unfortunately this doesn’t work either. I really don’t know where the problem could be.

Cheers,
dWade

Hi,

Probably somebody is in the code resetting the default level for the message stream. Are you using RooStats or some other package built on top of RooFit ?

Lorenzo

Hi,

Isn’t RooStats contained in the RooFit package? Like RooFitCore, which I’m using by the way.

Cheers,
dWade

Hi,
RooStats is a a package built on top of libRooFitCore and libRooFit. I was thinking that maybe some RooStats code was re-setting the message level to its default after you have set an higher suppression level.
So, the only way now to help you in this is to have your code, or a minimal part of it, showing this problem

Best Regards

Lorenzo

Hi again,

the problem is kind of solved for me. Since I’m doing my analysis in a stand-alone C++ program now using all the root and roofit libs your suggestions worked out for me. So I’m doing

RooMsgService::instance().setGlobalKillBelow(RooFit::WARNING);

and

RooMinuit m(*nll);
m.setPrintLevel(-1);

Now I have only the output of minos, but it seems that you cannot suppress it.

Before that I did all my analysis in a root macro. I have still no idea why it didn’t work out.

Thanks for your help!
Cheers,
dWade

1 Like

Output from MINOS can be suppressed. Just use a negative enough print level (e.g. -1000).