RDataFrame "hangs from non-split branch" error

Following up on https://root-forum.cern.ch/t/converting-non-split-branch-to-split-branch

I actually delved into the TColumnValue code, and I think the error message is actually incorrect. It appears the message is actually printed if you access a split branch (not an unsplit one). The branch is then stored as multiple arrays (one per struct member) so if you access it as an RVec<OriginalStruct>, data has to be copied to turn the struct-of-arrays into an array-of-structs.

I don’t seem to be able to find any tool that can tell me how precisely my TTree is arranged (i.e. branches with correct class names, and whether the branch is split or not).

Or am I misinterpreting something?

Hi @beojan,
@dpiparo or @pcanal might comment with more authority here, but the heuristic we use is simply checking whether elements of an array are stored in contiguous memory or not.
If they are, everything is fine, we can work with it.
If they are not, we need to perform a copy of the elements of the array into a contiguous slab of memory, and (if ROOT was compiled with debug symbols) we warn the user.

Now the idea is that if you write an unsplit array of objects, and then try to access one of its datamembers, you will have to skip from one object’s datamember to the next, with the other datamembers in the middle, so unsplit --> elements of arrays are not contiguous.
It might not be always true that “elements of array are not contiguous” --> “unsplit object”, but I have never encountered such a case.


I see. So what if I write a split array of objects, and try to access the entire thing (RVec<Obj>)? This would be laid out as Obj.a[n] Obj.b[n] Obj.c[n] (as I understand), which would have to be transposed to Obj[n], necessitating a copy.

Is the some way I can figure out what the actual structure of a tree is, and how it is actually stored on disk?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

The closest we have is TTree::Print().