Skip to content
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

[ntuple] rename RHeaderExtension::AddExtended* to MarkExtended* #17561

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1002,13 +1002,19 @@ private:
std::uint32_t fNLogicalColumns = 0;
std::uint32_t fNPhysicalColumns = 0;

void AddExtendedField(const RFieldDescriptor &fieldDesc)
/// Marks `fieldDesc` as an extended field, i.e. a field that appears in the Header Extension (e.g. having been added
/// through late model extension). Note that the field descriptor should also have been added to the RNTuple
/// Descriptor alongside non-extended fields.
void MarkExtendedField(const RFieldDescriptor &fieldDesc)
{
fFieldIdsOrder.emplace_back(fieldDesc.GetId());
fFieldIdsLookup.insert(fieldDesc.GetId());
}

void AddExtendedColumn(const RColumnDescriptor &columnDesc)
/// Marks `columnDesc` as an extended column, i.e. a column that appears in the Header Extension (e.g. having been
/// added through late model extension as an additional representation of an existing column). Note that the column
/// descriptor should also have been added to the RNTuple Descriptor alongside non-extended columns.
void MarkExtendedColumn(const RColumnDescriptor &columnDesc)
{
fNLogicalColumns++;
if (!columnDesc.IsAliasColumn())
Expand Down
4 changes: 2 additions & 2 deletions tree/ntuple/v7/src/RNTupleDescriptor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ void ROOT::Experimental::Internal::RNTupleDescriptorBuilder::AddField(const RFie
{
fDescriptor.fFieldDescriptors.emplace(fieldDesc.GetId(), fieldDesc.Clone());
if (fDescriptor.fHeaderExtension)
fDescriptor.fHeaderExtension->AddExtendedField(fieldDesc);
fDescriptor.fHeaderExtension->MarkExtendedField(fieldDesc);
if (fieldDesc.GetFieldName().empty() && fieldDesc.GetParentId() == kInvalidDescriptorId) {
fDescriptor.fFieldZeroId = fieldDesc.GetId();
}
Expand Down Expand Up @@ -1171,7 +1171,7 @@ ROOT::RResult<void> ROOT::Experimental::Internal::RNTupleDescriptorBuilder::AddC
fDescriptor.fNPhysicalColumns++;
fDescriptor.fColumnDescriptors.emplace(logicalId, std::move(columnDesc));
if (fDescriptor.fHeaderExtension)
fDescriptor.fHeaderExtension->AddExtendedColumn(columnDesc);
fDescriptor.fHeaderExtension->MarkExtendedColumn(columnDesc);

return RResult<void>::Success();
}
Expand Down
Loading