Question about multi-level tree structure

Hi all,

I want to make a tree structure out of some python objects, and the reason I do not post it in the python forum is that I do not even know how to solve the issue of the ROOT tree structure. I have a number of python objects (ISServer objects) and would like to create a separate branch for each. So far so good.
Each of those ISServer objects contain a number of objects (ISObject objects) for which I would like to have a sub branch. The last level is that each of the ISobject objects contain a number of ISAttribute objects. Those would be the leaves in my tree.

How should I go about making such a tree structure? Is TClonesArray a good idea for the sub branches, or should I work with folder hierarchy? Any other suggestions?

I am sure this has been done before, but I have just not been able to find much about it. At least nothing that I have been able to apply (I am fairly new to ROOT).

Best regards,
Staffan Backlund

Hi,

A priori when you add the top level object (ISServer objects) to the TTree (and the splitlevel is greater than 1), it will create sub-branches for you containing the sub objects (according to the way they are held in the top level objects).

If you have a collection of sub object that you want treated together, TClonesArray is usually a good choice (however I do not know of its interaction/use in python) and to use you would make ISServer contain a TClonesArray which contains your sub objects.

Cheers,
Philippe