Skip to content

How can I create a TTree with nested branches? #1132

Answered by jpivarski
jmcarcell asked this question in Q&A
Discussion options

You must be logged in to vote

I didn't add a way to do that because I didn't see what it would be useful for. Nesting TBranch objects doesn't have anything to do with how nested the data are.

Also, it would be difficult to implement. Since the WritableTree object needs to be mutable, to extend it iteratively over a large dataset, it's implemented as a template with values that can change (like the array of pointers to TBaskets). That template is general enough to include a flat list of TBranches, but not a nested list. (It's the metadata that gets nested, but the metadata was implemented as a template, and it would be hard to generalize the template.)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jmcarcell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants