Re: Clone Tree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Apr 09 1999 - 13:03:10 MEST


Olivier Meplan wrote:
> 
> Hi Rooters!
> 
> I have a pb with Clone trees...
> I have a tree wich has 2 branches, one with 50000 entries and one with 1
> entry. I want to make a clone of this tree (after doing some
> modifications on events of the "big" branch) and write this new tree in
> a file. I use CloneTree but then the samll branch which had only 1
> entry, had now 50000 entries and the new file is twice bigger than the
> old one.
> What am I doing wrong?
> Thanks
> Olivier Meplan

Olivier,
Trees are designed to have the same number of entries in all the
branches.
If this is not the case, you will have plenty of problems during the
tree
analysis, or when copying trees, etc.
Root gives the possibility to add a new branch to an existing tree.
It is the user's responsability to make sure that he fills correctly
this branch to be in sync with the other branches.
I think that adding a branch to an existing Tree is a bad idea in
general.
You better create a new Tree with the new branch(es).
There is no penalty in Root if you have one or many Trees. You can
perfectly
read several Trees in parralel.

In your case, what is the meaning of the single entry in the new branch?
Do you want to synchronize it with the first event of the other branch
or with
the last event ?

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:31 MET