On Tuesday 30 June 2009 20:43:58 Alfio wrote:
> WLavrijsen_at_lbl.gov ha scritto:
> > Alfio,
> >
> >> I have just a trivial question.
> >> Is it possible to reduce the verbosity level
> >> just to avoid the warnings due to some dictionaries missing
> >> when opening some root file?
> >
> > you can set the global variable gErrorIgnoreLevel to some high value,
> > e.g. 3000.
alternatively, to not be blind about other maybe serious warnings/errors: http://alxr.usatlas.bnl.gov/lxr/source/atlas/Tools/PyUtils/python/Helpers.py?v=head#015 which can be used like so:
with Helpers.ShutUp():
f = ROOT.TFile.Open(fname)
the class captures stdout and stderr, apply some regexp-filtering on those and print whatever does not pass the filter(s)
the default filters are:
DefaultFilter = [
re.compile("Warning in <TClass::TClass>: no dictionary for class."), re.compile("Warning in <TEnvRec::ChangeValue>: duplicate entry."), re.compile("Error in <TStreamerInfo::BuildOld>:."), ]
hth,
sebastien.
> >
> > HTH,
> > Wim
>
> It works !
> thanks
>
> A
-- ######################################### # Dr. Sebastien Binet # Laboratoire de l'Accelerateur Lineaire # Universite Paris-Sud XI # Batiment 200 # 91898 Orsay #########################################Received on Wed Jul 01 2009 - 08:45:07 CEST
This archive was generated by hypermail 2.2.0 : Wed Jul 01 2009 - 17:50:02 CEST