27 std::uint16_t representationIndex)
28 : fType(
type), fIndex(columnIndex), fRepresentationIndex(representationIndex), fTeam({
this})
35 fPageSink->DropColumn(fHandleSink);
37 fPageSource->DropColumn(fHandleSource);
44 if (fInitialNElements < 1) {
45 throw RException(
R__FAIL(
"initial page size is too small for at least one element"));
48 fPageSink = &pageSink;
49 fFirstElementIndex = firstElementIndex;
50 fHandleSink = fPageSink->
AddColumn(fieldId, *
this);
51 fOnDiskId = fPageSink->GetColumnId(fHandleSink);
52 fWritePage = fPageSink->ReservePage(fHandleSink, fInitialNElements);
53 if (fWritePage.IsNull())
59 fPageSource = &pageSource;
60 fHandleSource = fPageSource->
AddColumn(fieldId, *
this);
61 fNElements = fPageSource->GetNElements(fHandleSource);
62 fOnDiskId = fPageSource->GetColumnId(fHandleSource);
64 auto descriptorGuard = fPageSource->GetSharedDescriptorGuard();
65 fFirstElementIndex = descriptorGuard->GetColumnDescriptor(fOnDiskId).GetFirstElementIndex();
71 if (fWritePage.GetNElements() == 0)
74 fPageSink->CommitPage(fHandleSink, fWritePage);
75 fWritePage = fPageSink->ReservePage(fHandleSink, fInitialNElements);
77 fWritePage.Reset(fNElements);
82 fPageSink->CommitSuppressedColumn(fHandleSink);
87 const auto nTeam = fTeam.size();
88 std::size_t iTeam = 1;
90 fReadPageRef = fPageSource->LoadPage(fTeam.at(fLastGoodTeamIdx)->GetHandleSource(), globalIndex);
91 if (!fReadPageRef.Get().IsNull())
93 fLastGoodTeamIdx = (fLastGoodTeamIdx + 1) % nTeam;
95 }
while (iTeam <= nTeam);
97 return fReadPageRef.Get().Contains(globalIndex);
102 const auto nTeam = fTeam.size();
103 std::size_t iTeam = 1;
105 fReadPageRef = fPageSource->LoadPage(fTeam.at(fLastGoodTeamIdx)->GetHandleSource(), clusterIndex);
106 if (!fReadPageRef.Get().IsNull())
108 fLastGoodTeamIdx = (fLastGoodTeamIdx + 1) % nTeam;
110 }
while (iTeam <= nTeam);
112 return fReadPageRef.Get().Contains(clusterIndex);
118 for (
auto *
c : other.
fTeam) {
119 if (std::find(fTeam.begin(), fTeam.end(),
c) == fTeam.end())
120 fTeam.emplace_back(
c);
123 for (
auto c : fTeam) {
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
A column is a storage-backed array of a simple, fixed-size type, from which pages can be mapped into ...
void ConnectPageSink(DescriptorId_t fieldId, RPageSink &pageSink, NTupleSize_t firstElementIndex=0U)
Connect the column to a page sink.
bool TryMapPage(NTupleSize_t globalIndex)
RColumn(EColumnType type, std::uint32_t columnIndex, std::uint16_t representationIndex)
std::vector< RColumn * > fTeam
The column team is a set of columns that serve the same column index for different representation IDs...
void ConnectPageSource(DescriptorId_t fieldId, RPageSource &pageSource)
Connect the column to a page source.
void MergeTeams(RColumn &other)
Abstract interface to write data into an ntuple.
const RNTupleWriteOptions & GetWriteOptions() const
Returns the sink's write options.
Abstract interface to read data from an ntuple.
ColumnHandle_t AddColumn(DescriptorId_t fieldId, RColumn &column) override
Register a new column.
virtual ColumnHandle_t AddColumn(DescriptorId_t fieldId, RColumn &column)=0
Register a new column.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
std::size_t GetInitialUnzippedPageSize() const
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.