[ntuple] Dynamically activate fields in `RNTupleProcessor`
With this change, fields are only added to the REntry and read when they are referenced in the processor loop. This prevents unecessary reads of unused fields.
It also makes the REntry completely transparent from an interface perspective. Pointers to values can be obtained through the processor interface itself before the iteration starts, or alternatively via the iterator returned by the processor.
Important to note that during iteration, the pointer returned by RNTupleProcessor::GetPtr will not contain the value for the current entry. The reason for this is that from the RNTupleProcessor interface there is (with the current implementation) no way to know what the current entry index is. For now, RNTupleProcessor::GetPtr contains a warning and a recommendation to get the pointer through the iterator instead. Alternative solutions could be:
- Remove
RNTupleProcessor::GetPtraltogether and only allow access to the field value pointers through the iterator. - Dispatch the local entry index from
RStateback to the processor on everyAdvance, and (re)load the entry whenRNTupleProcessor::GetPtris called.
Checklist:
- [x] tested changes locally
- [x] updated the docs (if necessary)
Test Results
13 files 13 suites 2d 21h 44m 15s :stopwatch: 2 651 tests 2 651 :white_check_mark: 0 :zzz: 0 :x: 32 645 runs 32 645 :white_check_mark: 0 :zzz: 0 :x:
Results for commit 1c4f2b90.
:recycle: This comment has been updated with latest results.
Closing in favor of #15985 (based on offline discussion).