Home | News | Documentation | Download

ROOT 6.23 changing name of branch with TClonesArray

ROOT Version: 6.23.01 (compared with 6.18/00 and 6.22/02)
Platform: CentOS Linux release 7.9.2009 (lxplus)
Compiler: Not Provided

Dear ROOT experts,

I have noticed a weird behaviour of ROOT 6.23/01 in TTree I/O. Let us assume I have a branch called “t.”, referring to a TClonesArray of a class “Event”. Previous versions of ROOT always store the TTree with branches having the following name structure:

t. (for the class)
t…e (for a member of the class)

When I stored a TTree with this newer ROOT version, instead the branch naming convention changes, removing the dot:

t (for the class)
t.e (for a member of the class)

You can find an example code here (modified from the ROOT tutorial tree0.C, but using a TClonesArray) and the output I obtain in different ROOT versions.

My question is if this change is intentionally done, since the branches ending with the dot give issues with PyROOT. In this case, could you please add a warning when you tell the user of this branch name change?

Best regards,

testtree_61800.root (178.5 KB) testtree_62301.root (178.8 KB) testtree_62202.root (178.5 KB) tree0.C (2.0 KB)

So the change sounds like an improvement isn’t it? In addition it avoid the confusing double consecutive dot in the subbranch name.

What is the practical (negative) consequence in your case?

And yes, the change is intentional and need to be mentioned in the release notes of v6.24.

1 Like

Thank you very much for your answer.

The only negative consequence I can think of is that code reading the branch needs to be modified to correctly set the branch address (I originally discovered the issue since my code did not find the branch anymore).

I mostly wanted confirmation of this behaviour.

Best regards,

Hi Antonio,

I see the behavior difference and it was not expected. So it look like the intent was to remove the double dot in the sub-branches but not the trailing dot in the top level branch. We need to update this before the release (i.e. no user code change when accessing the top level branch was intended :frowning: )

Thanks for the report.