Skip to content

[ntuple] Add support for attributes reading#21778

Merged
silverweed merged 10 commits intoroot-project:masterfrom
silverweed:ntuple_attr_read
Apr 21, 2026
Merged

[ntuple] Add support for attributes reading#21778
silverweed merged 10 commits intoroot-project:masterfrom
silverweed:ntuple_attr_read

Conversation

@silverweed
Copy link
Copy Markdown
Contributor

@silverweed silverweed commented Apr 2, 2026

Adds support for RNTuple attribute reading in the form of the ROOT::Experimental::RNTupleAttrSetReader class plus some ancillary classes.

Main features added:

  • RNTupleReader::OpenAttributeSet -> returns an RNTupleAttrSetReader for a specific attribute set
  • RNTupleAttrSetReader::GetAttributes* -> various methods that return iterables over attribute entry indices
  • RNTupleAttrSetReader::LoadEntry(index[, entry]) -> loads index-th attribute entry (similar to RNTupleReader::LoadEntry). Meant to be used with RNTupleAttrSetReader::GetAttributes*

See the tests for basic usage, e.g. BasicReadingWriting in ntuple_attributes.cxx

@silverweed silverweed self-assigned this Apr 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Test Results

    22 files      22 suites   3d 7h 45m 29s ⏱️
 3 833 tests  3 831 ✅  1 💤 1 ❌
75 692 runs  75 672 ✅ 19 💤 1 ❌

For more details on these failures, see this check.

Results for commit f741897.

♻️ This comment has been updated with latest results.

@silverweed silverweed added the clean build Ask CI to do non-incremental build on PR label Apr 7, 2026
@silverweed silverweed force-pushed the ntuple_attr_read branch 4 times, most recently from 487b964 to 5da9754 Compare April 7, 2026 08:23
@silverweed silverweed force-pushed the ntuple_attr_read branch 3 times, most recently from d68c286 to 28e4497 Compare April 9, 2026 07:47
@silverweed silverweed marked this pull request as ready for review April 9, 2026 09:40
@silverweed silverweed requested review from enirolf and hahnjo April 9, 2026 09:40
Copy link
Copy Markdown
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

First pass of the PR

Comment thread tree/ntuple/inc/ROOT/RNTupleAttrReading.hxx
Comment thread tree/ntuple/inc/ROOT/RNTupleAttrReading.hxx Outdated
Comment thread tree/ntuple/inc/ROOT/RNTupleAttrReading.hxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/test/ntuple_attributes.cxx Outdated
Comment thread tree/ntuple/test/ntuple_attributes.cxx Outdated
@silverweed silverweed force-pushed the ntuple_attr_read branch 3 times, most recently from e1b0b9f to 8ed4073 Compare April 10, 2026 07:25
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx
@silverweed silverweed force-pushed the ntuple_attr_read branch 5 times, most recently from 64e105f to 78b7eb3 Compare April 15, 2026 09:30
Copy link
Copy Markdown
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

Code looks good to me, some last comments. Please wait for Jakob's review + approval

Comment thread tree/ntuple/test/ntuple_test.cxx Outdated
Comment thread tree/ntuple/test/ntuple_test.cxx Outdated
Comment thread tree/ntuple/src/RPageStorageFile.cxx
Comment thread tree/ntuple/test/ntuple_cluster.cxx
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
@silverweed silverweed added this to the 6.40.00 milestone Apr 20, 2026
Copy link
Copy Markdown
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Very nice!

Next step would be adding a tutorial.

Comment thread tree/ntuple/src/RNTupleAttrReading.cxx
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
Comment thread tree/ntuple/src/RNTupleAttrReading.cxx Outdated
@silverweed silverweed merged commit a9c706e into root-project:master Apr 21, 2026
28 of 30 checks passed
@silverweed silverweed deleted the ntuple_attr_read branch April 21, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:RNTuple

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants