25 std::span<std::unique_ptr<RPageSource>>
sources)
53 auto physicalId =
c.IsAliasColumn() ? fIdBiMap.GetVirtualId({
originIdx,
c.GetPhysicalId()}) : fNextId;
55 fIdBiMap.Insert({
originIdx,
c.GetLogicalId()}, fNextId);
62 fBuilder.SetNTuple(fNTupleName,
"");
66 for (std::size_t i = 0; i < fSources.size(); ++i) {
67 fSources[i]->Attach();
69 if (fSources[i]->GetNEntries() != fSources[0]->GetNEntries()) {
73 throw RException(
R__FAIL(
"mismatch in the number of entries of friend RNTuples"));
77 for (
unsigned j = 0;
j < i; ++
j) {
78 if (fSources[
j]->GetSharedDescriptorGuard()->GetName() ==
descriptorGuard->GetName()) {
91 fIdBiMap.Insert({i,
cg.GetId()}, fNextId);
97 clusterBuilder.ClusterId(fNextId).FirstEntryIndex(
c.GetFirstEntryIndex()).NEntries(
c.GetNEntries());
110 fIdBiMap.Insert({i,
c.GetId()}, fNextId);
115 fBuilder.EnsureValidDescriptor();
116 return fBuilder.MoveDescriptor();
119std::unique_ptr<ROOT::Experimental::Internal::RPageSource>
124 for (
const auto &
f : fSources)
126 return std::make_unique<RPageSourceFriends>(fNTupleName,
cloneSources);
192 auto sourceIdx = fIdBiMap.GetOriginId(
page.GetClusterInfo().GetId()).fSourceIdx;
196std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>>
201 return std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>>(
clusterKeys.size());
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void ObserveMetrics(RNTupleMetrics &observee)
A helper class for piece-wise construction of an RClusterDescriptor.
static RClusterGroupDescriptorBuilder FromSummary(const RClusterGroupDescriptor &clusterGroupDesc)
A helper class for piece-wise construction of an RFieldDescriptor.
RResult< RFieldDescriptor > MakeDescriptor() const
Attempt to make a field descriptor.
RFieldDescriptorBuilder & FieldName(const std::string &fieldName)
RFieldDescriptorBuilder & FieldId(DescriptorId_t fieldId)
std::vector< std::unique_ptr< RCluster > > LoadClusters(std::span< RCluster::RKey > clusterKeys) final
Populates all the pages of the given cluster ids and columns; it is possible that some columns do not...
RPageSourceFriends(std::string_view ntupleName, std::span< std::unique_ptr< RPageSource > > sources)
void LoadSealedPage(DescriptorId_t physicalColumnId, RClusterIndex clusterIndex, RSealedPage &sealedPage) final
Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage.
ColumnHandle_t AddColumn(DescriptorId_t fieldId, const RColumn &column) final
Register a new column.
std::vector< std::unique_ptr< RPageSource > > fSources
~RPageSourceFriends() final
RNTupleDescriptor AttachImpl() final
RPage PopulatePage(ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final
Allocates and fills a page that contains the index-th element.
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
std::unique_ptr< RPageSource > Clone() const final
Open the same storage multiple time, e.g. for reading in multiple threads.
void DropColumn(ColumnHandle_t columnHandle) final
Unregisters a column.
void AddVirtualField(const RNTupleDescriptor &originDesc, std::size_t originIdx, const RFieldDescriptor &originField, DescriptorId_t virtualParent, const std::string &virtualName)
Detail::RNTupleMetrics fMetrics
Abstract interface to read data from an ntuple.
void DropColumn(ColumnHandle_t columnHandle) override
Unregisters a column.
ColumnHandle_t AddColumn(DescriptorId_t fieldId, const RColumn &column) override
Register a new column.
A page is a slice of a column that is mapped into memory.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Base class for all ROOT issued exceptions.
Meta-data stored for every field of an ntuple.
The on-storage meta-data of an ntuple.
Common user-tunable settings for reading ntuples.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
A sealed page contains the bytes of a page as written to storage (packed & compressed).