24 : fModel(model), fIndex(
index)
30 if (!fWritePage[0].IsNull())
31 fPageSink->ReleasePage(fWritePage[0]);
32 if (!fWritePage[1].IsNull())
33 fPageSink->ReleasePage(fWritePage[1]);
34 if (!fReadPage.IsNull())
35 fPageSource->ReleasePage(fReadPage);
37 fPageSink->DropColumn(fHandleSink);
39 fPageSource->DropColumn(fHandleSource);
47 fHandleSink = fPageSink->AddColumn(
fieldId, *
this);
48 fApproxNElementsPerPage = fPageSink->GetWriteOptions().GetApproxUnzippedPageSize() / fElement->GetSize();
49 if (fApproxNElementsPerPage < 2)
52 fWritePage[0] = fPageSink->ReservePage(fHandleSink, fApproxNElementsPerPage + fApproxNElementsPerPage / 2);
53 fWritePage[1] = fPageSink->ReservePage(fHandleSink, fApproxNElementsPerPage + fApproxNElementsPerPage / 2);
59 fHandleSource = fPageSource->AddColumn(
fieldId, *
this);
60 fNElements = fPageSource->GetNElements(fHandleSource);
61 fColumnIdSource = fPageSource->GetColumnId(fHandleSource);
64 fFirstElementIndex =
descriptorGuard->GetColumnDescriptor(fColumnIdSource).GetFirstElementIndex();
71 if (fWritePage[fWritePageIdx].IsEmpty() && fWritePage[
otherIdx].IsEmpty())
74 if ((fWritePage[fWritePageIdx].GetNElements() < fApproxNElementsPerPage / 2) && !fWritePage[
otherIdx].IsEmpty()) {
76 auto &
thisPage = fWritePage[fWritePageIdx];
84 fPageSink->CommitPage(fHandleSink, fWritePage[fWritePageIdx]);
85 fWritePage[fWritePageIdx].Reset(fNElements);
90 fPageSource->ReleasePage(fReadPage);
94 fReadPage = fPageSource->PopulatePage(fHandleSource,
index);
100 fPageSource->ReleasePage(fReadPage);
104 fReadPage = fPageSource->PopulatePage(fHandleSource,
clusterIndex);
#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.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
void ConnectPageSink(DescriptorId_t fieldId, RPageSink &pageSink, NTupleSize_t firstElementIndex=0U)
Connect the column to a page sink.
void MapPage(const NTupleSize_t index)
void ConnectPageSource(DescriptorId_t fieldId, RPageSource &pageSource)
Connect the column to a page source.
RColumn(const RColumnModel &model, std::uint32_t index)
Abstract interface to write data into an ntuple.
Abstract interface to read data from an ntuple.
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...
Holds the static meta-data of an RNTuple column.
Base class for all ROOT issued exceptions.
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.