Re: reading a TTree with a different TTree

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 17 Jan 2007 10:30:31 +0100


You do not give enough information about your problem.

 -you can write and read as many different Trees as you like  -If your Tree was created with one top level branch (say Event *event), you can read:

    -this Tree with a new version of your class Event    -an old tree generated with an older version of Event    -In this case the automatic schema evolution algorithm will take care of mapping the old class
to the new class or vice-versa. (see Users Guide)

 -if your tree is created with basic types, it is your responsability to set the addresses correctly.

Rene Brun

X. Lu, Peking Univ. wrote:
> Dear Rene,
>
> I have a problem concerning about reading a TTree with a slightly
> different
> TTree.
>
> Let me just simplify the problem as below:
> 1. I have 2 TTree, namely tA and tB. They are different just
> because tB have some additional variables.
> 2. I have a data file using tA to stroe my data.
> 3. I use tB to read the data file.
>
> My question is :
> Will there be any mistakes happening?
> I am worring about the TBranch::SetAddress( ) will be misfunctioning
> because of the additional variables.
>
> Thanks a lot!
>
> Best Regards,
> Xianguo
>
> --
> Take flight into the sky, beyond the moon, beyond my mind.
>
> Xianguo LU
> Physics Department, Peking University
> Beijing, China
> Tel: 0086-10-62753888(o)
Received on Wed Jan 17 2007 - 10:30:43 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 17 2007 - 17:50:00 CET