Re: TChain::LoadTree

From: Paul Russo <russo_at_fnal.gov>
Date: Wed, 10 Aug 2005 12:18:47 -0500


You can change gErrorIgnoreLevel just before the GetFile() call, and then change it back immediately afterwards.

Thomas Bretz wrote:

> Hi,
> 
> I think is not an appropriate solution, because it would also supress
> real errors I want to see...
> 
> Thomas.
> 
> 
> 
> Rene Brun wrote:
> 

>> #include "Terror.h"
>> gErrorIgnoreLevel=2;
>>
>> Rene Brun
>>
>> On Wed, 10 Aug 2005, Thomas Bretz wrote:
>>
>>> Hi,
>>>
>>> I would like to supress this error:
>>> Error("LoadTree","cannot find tree with name %s in file %s",...)
>>>
>>> It takes place if I add a lot of files to a chain which doesn't
>>> contain the tree the chain belongs to. I know that in some cases this
>>> happens and this is ok in our context. I just would like to get rid
>>> of this warning. To test whether in the present case the chain is
>>> valid I check for:
>>> chain->GetFile()==NULL
>>> This is were the error is emitted.
>>>
>>> It would be the best if I could add another check before which would
>>> not emmit this error message, something like "HasValidFiles()" which
>>> just checks if any of the file has the correct tree. Or even better
>>> would be a chek which checks if _all_ files do have the corresponding
>>> tree.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Thomas.
>>>
>>

>

Received on Wed Aug 10 2005 - 19:18:54 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET