Skip to content

Read correct size of TClonesArray collection value type #19140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2025

Conversation

vepadulano
Copy link
Member

@vepadulano vepadulano commented Jun 23, 2025

Fixes #19104

@ferdymercury
Copy link
Collaborator

RDataFrame uses the information of `GetValueSize` methods to understand the size
of a collection value type, for those TTree branches that have to be read via
TTreeReaderArray. These include input TClonesArray branches, for which the size
of the collection value type was wrongly computed. In fact, it is not enough to
just ask the TClonesArray what is the size of the class type it is wrapping,
since the reader (RDataFrame) may be wanting to read only a data member of that
class. The correct information is stored in the TBranchProxy, which knows
exactly which branch (or leaf) RDataFrame is trying to read. Thus, use the
`GetValueSize` method of the proxy directly.
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Copy link

Test Results

    20 files      20 suites   4d 3h 35m 17s ⏱️
 3 043 tests  3 043 ✅ 0 💤 0 ❌
59 159 runs  59 159 ✅ 0 💤 0 ❌

Results for commit d03c84f.

@dpiparo dpiparo merged commit 951be70 into root-project:master Jun 24, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDataFrame Reads Garbage Data instead of File
4 participants