Before adding the file to the chain, check if the tree is inside the
file. If not do not add the file to the chain.
Rene Brun
Marc Escalier wrote:
> thanks Rene,
>
> actually, my question is different : the file exist, but the tree i'm
> asking is not in some of the files.
> To summarize : we have files 1 ... 1000 (for example).
> The tree is produced using an another program which makes some
> selection. In some cases, because of the selection, some files don't
> have the tree requested for the TChain (while having others trees)
>
> so my question would be : is there a way to prevent that the error
> message to be printed if the file (that exists) doesn't contain the
> requested tree
>
> regards
>
> =====
> Rene Brun a écrit :
>> Marc,
>>
>> you said:
>> >there is an error message when one of the file doesn't contain the
>> required Tree
>> >but it works for the others that contain
>> I do not understand your problem. It is normal to issue an error
>> message when the file does not exist
>>
>> Rene Brun
>>
>>
>> Marc Escalier wrote:
>>> Dear colleagues,
>>>
>>> when creating a TChain like this :
>>>
>>> TChain mychain("NameOfTheTree");
>>>
>>> mychain.Add("myfile1")
>>> ...
>>> mychain.Add("myfile1000")
>>>
>>> there is an error message when one of the file doesn't contain the
>>> required Tree
>>> but it works for the others that contain
>>>
>>> ==>is there a way to prevent the error message
>>>
>>> thanks
>>>
>>
>
Received on Wed Dec 16 2009 - 10:10:48 CET
This archive was generated by hypermail 2.2.0 : Wed Dec 16 2009 - 11:50:03 CET