[ROOT] Adding objects to an existing TTree

From: Volker Hejny (V.Hejny@fz-juelich.de)
Date: Tue Oct 10 2000 - 09:00:42 MEST


Hi,

I'm currently working with data sets in a TTree, which have to 
be processed by an analysis/simulation/etc. The output of these
programs has to be written to a TTree together with the input
data. At the moment this means to copy the existing tree to a
new file and adding new branches to the tree. This works, but
it also means copying large amounts of data from one file
to another. 

So my first question is: is it in some way possible to add new
branches to an existing tree on a file without changing the
old branches?

Another solution (which I'm actually using now) is to write
only the new information to the new file, in a tree which could 
have the same name as the old one. In a later analysis one has 
to open both files and go through both trees in parallel.

I would suggest to add a class similar to TChain, but not working
with file chains, but parallel. Then it would be possible to
process on input file by several independant analysis programs
with individual output files. Later on, one could define such
a file collection, which should than act as one file (e.g.
when having trees with the same name in more than one file,
the objects in these trees could be accessed by only one
tree pointer).

What do you think about it?

Best regards,
Volker

-- 
Volker Hejny                    Tel: 02461/616853                      ** 
Institut f. Kernphysik          Fax: 02461/613930                     **
---------------------------------------------------------------- **  ** ---  
Forschungszentrum Juelich GmbH, D-52425 Juelich                    **





This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:35 MET