Maurik,
Sorry for this late answer. I see your mail just now in an attempt
to clear my mail folders before leaving for some holidays.
You can have as many levels as you want if you create the branches
yourself by hand.
The automatic split algorithm can split automatically when
the pointer specified to TTree::Branch is of a type deriving from
TObject. In this case
- Each data member of a basic type becomes a new branch
- Each data member being an object (not a pointer) is also split.
- a pointer to a type derived from TObject will be in one branch
(in this case the object::Streamer function is called to fill
the branch buffer).
- a pointer to a TClonesArray generates as many branches as you have
data members in the class referenced by the TClonesArary.
Note that in this case, this class must really contain objects
of the same length.
In case one of the branches is in case 3 above (pointer to an object),
you can specify a member function in the TTree::Draw query.
In the case of the $ROOTSYS/test/Event example, I have included
the example of a pointer to an histogram (TH1F) in the event object.
The name of the branch is "fH".
You can do:
tree->Draw("fH.GetMean()")
tree->Draw("fH.GetMean():fH.GetRMS()"")
tree->Draw("fH.GetBinContent(50):)
I have been working on a more general class TOak for sometime.
This new class should be more flexible in complex cases
and in particular, it will provide support for schema evolution in split
mode. Unfortunately, due to holidays, foreseen trips and more work
than expected with the mail, I have to postpone the availability
of this class to later this Autumn.
Rene Brun