Suppressing output

Hello All,

I am trying to fit a gaussian to a histogram and write the histogram canvas to a file.

histy->Draw(); c1->SaveAs("y.png");

How do I suppress the following information:

Many thanks.


Hi Karthik,

You can use gErrorIgnoreLevel. For example:

Int_t oldLevel = gErrorIgnoreLevel; histy->Draw(); gErrorIgnoreLevel = kWarning; c1->SaveAs("y.png"); gErrorIgnoreLevel = oldLevel;
The levels are defined as (in TError.h):

const Int_t kUnset = -1; const Int_t kPrint = 0; const Int_t kInfo = 1000; const Int_t kWarning = 2000; const Int_t kError = 3000; const Int_t kBreak = 4000; const Int_t kSysError = 5000; const Int_t kFatal = 6000;
Cheers, Bertrand.