wip gather page/columns metadata

This commit is contained in:
silverweed 2024-07-12 15:56:04 +02:00
parent 13f3211d0f
commit 58ef95409d

View file

@ -10,7 +10,7 @@ String8 rntuple_description(Arena *arena, const RNTuple_Data &ntuple)
} }
internal internal
void gather_metadata(Arena *arena, RMicroFileReader &reader, const RNTuple_File_Info &info) ROOT::Experimental::RNTupleDescriptor create_descriptor(Arena *arena, RMicroFileReader &reader, const RNTuple_File_Info &info)
{ {
using namespace ROOT::Experimental; using namespace ROOT::Experimental;
using namespace ROOT::Experimental::Internal; using namespace ROOT::Experimental::Internal;
@ -58,6 +58,31 @@ void gather_metadata(Arena *arena, RMicroFileReader &reader, const RNTuple_File_
arena_pop_to(scratch.arena, arena_start); arena_pop_to(scratch.arena, arena_start);
} }
return descriptor;
}
internal
void gather_metadata(Arena *arena, RMicroFileReader &reader, const RNTuple_File_Info &info)
{
using namespace ROOT::Experimental;
using namespace ROOT::Experimental::Internal;
RNTupleDescriptor descriptor = create_descriptor(arena, reader, info);
// for all clusters ...
DescriptorId_t cluster_id = descriptor.FindClusterId(0, 0);
while (cluster_id != kInvalidDescriptorId) {
const RClusterDescriptor &cluster_desc = descriptor.GetClusterDescriptor(cluster_id);
for (const auto &[col_id, col_range] : cluster_desc.GetColumnRangeIterable()) {
// TODO gather column metadata
// TODO gather page metadata
const auto &page_range = cluster_desc.GetPageRange(col_id);
for (const auto &page_info : page_range.fPageInfos) {
}
}
}
} }
internal internal