root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.67k stars 1.27k forks source link

Fix RFieldBase::GetNElements() for record/class fields #16588

Open jblomer opened 2 weeks ago

jblomer commented 2 weeks ago

Check duplicate issues.

Description

For all but record and class fields, the number of elements of that field is given by the number of elements of the principle columns. Records/classes don't have columns of their own. The information must be retrieved from one of the subfields.

Reproducer

The problem arises, e.g., when trying to iterate over the field range of a view of a record item of a collection.

ROOT version

master

Installation method

n/a

Operating system

n/a

Additional context

No response

jblomer commented 2 weeks ago

In addition, enum fields and atomic files have no attched columns.