Re: [ROOT] storing branches in trees ...

From: Volker Hejny (V.Hejny@fz-juelich.de)
Date: Mon Jan 21 2002 - 14:11:03 MET


Hi Rene,

On Mon, Jan 21, 2002 at 11:21:20AM +0000, Rene Brun wrote:
> Suppose a TList *list containing objects A,B,C and D.
> Calling tree.Branch("event",list)
> This will create 4 top branches. 

That's exactly my point. I'd like to have a pseudo-branch 'event' at top
level and four subbranches A,B,C,D. Just to keep the tree structure and
to have an overview of the contents while browsing. 

> In turn, if classes A,B,C or D have subobjects
> or pointers to TClonesArray, this will be split using the usual split rules.
> When reading the Tree, you still have to set the branch addresses for A,B,C,D.
> I could implement a special SetBranchAddress taking a list as input.

If the starting collection was a folder and the objects were organized in 
subfolders, I'd like to have this structure back in an automatic way.
If I have a TFolder structure like

Main
|---Raw
|   |---Det1
|   |---Det2
|   |---Det3
|
|---Calibrated
    |---Det1
    |---Det2
    |---Det3
    
If I want to have that structure back later on, I have to save the
information by myself.

> It will take more time if you have many variables of this type. I would be
> curious to know the difference in time in your particular case.
> You can always have a RUN object and do RUN.Write() at the time when
> you do tree.Write().

In principle, yes. But this would mean to introduce an additional object.
For example, one information to be stored could be the position in
the folder hierachy mentioned above ...

Best regards,
Volker

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



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:39 MET