Re: TChain::LoadTree

From: Thomas Bretz <tbretz_at_astro.uni-wuerzburg.de>
Date: Thu, 18 Aug 2005 15:16:23 +0200


Still, if any other error occurs while calling GetFile() I would miss it...

Paul Russo wrote:

> 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 Thu Aug 18 2005 - 15:16:30 MEST

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