Skip to content

[ntuple] Add RNTupleLocatorMulti class for kTypeMulti locator#22577

Open
JasMehta08 wants to merge 1 commit into
root-project:masterfrom
JasMehta08:ntuple-locator-multi-class
Open

[ntuple] Add RNTupleLocatorMulti class for kTypeMulti locator#22577
JasMehta08 wants to merge 1 commit into
root-project:masterfrom
JasMehta08:ntuple-locator-multi-class

Conversation

@JasMehta08

Copy link
Copy Markdown
Contributor

This Pull request:

(Is a part of the GSoC 2026 project S3 Backend for RNTuple.)

Changes or fixes:

Follow-up to #22434. Introduces a dedicated RNTupleLocatorMulti class for the kTypeMulti locator, replacing the previous reuse of RNTupleLocatorObject64.

The new class stores the object identifier and byte offset as two explicit 32-bit fields plus a separate 4-bit reserved field. GetLocation() returns the canonical packed 64-bit value (parallel to RNTupleLocatorObject64::GetLocation()), with the layout:

  • bits 63..60: 4 reserved bits
  • bits 59..30: 30-bit object identifier (max ~1 billion objects)
  • bits 29..0: 30-bit byte offset (max 1 GiB per object)

The (uint32_t, uint32_t) constructor and SetReserved() validate their inputs against the 30-bit and 4-bit ranges respectively. The 0x03 payload remains a 4/8-byte size followed by an 8-byte packed value, so the wire format stays identical.

RNTupleLocator::SetPosition and GetPosition<> are split accordingly so RNTupleLocatorObject64 is now reserved for kTypeObject64 only, and the new RNTupleLocatorMulti overload/specialization handle kTypeMulti.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR is a follow-up #22434

@JasMehta08 JasMehta08 requested a review from jblomer as a code owner June 11, 2026 09:18
@jblomer jblomer self-assigned this Jun 11, 2026
@jblomer jblomer assigned JasMehta08 and unassigned jblomer Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants