27 : fType(
type), fIndex(columnIndex), fRepresentationIndex(representationIndex), fTeam({
this})
43 if (fInitialNElements < 1) {
44 throw RException(
R__FAIL(
"initial page size is too small for at least one element"));
47 fPageSink = &pageSink;
48 fFirstElementIndex = firstElementIndex;
49 fHandleSink = fPageSink->
AddColumn(fieldId, *
this);
50 fOnDiskId = fPageSink->GetColumnId(fHandleSink);
51 fWritePage = fPageSink->ReservePage(fHandleSink, fInitialNElements);
52 if (fWritePage.IsNull())
58 fPageSource = &pageSource;
59 fHandleSource = fPageSource->
AddColumn(fieldId, *
this);
60 fOnDiskId = fPageSource->GetColumnId(fHandleSource);
62 auto descriptorGuard = fPageSource->GetSharedDescriptorGuard();
63 fFirstElementIndex = descriptorGuard->GetColumnDescriptor(fOnDiskId).GetFirstElementIndex();
69 if (fWritePage.GetNElements() == 0)
72 fPageSink->CommitPage(fHandleSink, fWritePage);
73 fWritePage = fPageSink->ReservePage(fHandleSink, fInitialNElements);
75 fWritePage.Reset(fNElements);
80 fPageSink->CommitSuppressedColumn(fHandleSink);
85 const auto nTeam = fTeam.size();
86 std::size_t iTeam = 1;
88 fReadPageRef = fPageSource->LoadPage(fTeam.at(fLastGoodTeamIdx)->GetHandleSource(), globalIndex);
89 if (!fReadPageRef.Get().IsNull())
91 fLastGoodTeamIdx = (fLastGoodTeamIdx + 1) % nTeam;
93 }
while (iTeam <= nTeam);
95 return fReadPageRef.Get().Contains(globalIndex);
100 const auto nTeam = fTeam.size();
101 std::size_t iTeam = 1;
103 fReadPageRef = fPageSource->LoadPage(fTeam.at(fLastGoodTeamIdx)->GetHandleSource(), localIndex);
104 if (!fReadPageRef.Get().IsNull())
106 fLastGoodTeamIdx = (fLastGoodTeamIdx + 1) % nTeam;
108 }
while (iTeam <= nTeam);
110 return fReadPageRef.Get().Contains(localIndex);
116 for (
auto *
c : other.
fTeam) {
117 if (std::find(fTeam.begin(), fTeam.end(),
c) == fTeam.end())
118 fTeam.emplace_back(
c);
121 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
The available trivial, native content types of a column.
A column is a storage-backed array of a simple, fixed-size type, from which pages can be mapped into ...
RColumn(ROOT::ENTupleColumnType type, std::uint32_t columnIndex, std::uint16_t representationIndex)
void MergeTeams(RColumn &other)
std::vector< RColumn * > fTeam
The column team is a set of columns that serve the same column index for different representation IDs...
void ConnectPageSource(ROOT::DescriptorId_t fieldId, ROOT::Internal::RPageSource &pageSource)
Connect the column to a page source.
ROOT::Internal::RPageSource * fPageSource
ROOT::Internal::RPageSink * fPageSink
bool TryMapPage(ROOT::NTupleSize_t globalIndex)
ROOT::Internal::RPageStorage::ColumnHandle_t fHandleSink
void ConnectPageSink(ROOT::DescriptorId_t fieldId, ROOT::Internal::RPageSink &pageSink, ROOT::NTupleSize_t firstElementIndex=0U)
Connect the column to a page sink.
ROOT::Internal::RPageStorage::ColumnHandle_t fHandleSource
Abstract interface to write data into an ntuple.
const ROOT::RNTupleWriteOptions & GetWriteOptions() const
Returns the sink's write options.
void DropColumn(ColumnHandle_t) final
Unregisters a column.
Abstract interface to read data from an ntuple.
ColumnHandle_t AddColumn(ROOT::DescriptorId_t fieldId, ROOT::Internal::RColumn &column) override
Register a new column.
void DropColumn(ColumnHandle_t columnHandle) override
Unregisters a column.
virtual ColumnHandle_t AddColumn(ROOT::DescriptorId_t fieldId, ROOT::Internal::RColumn &column)=0
Register a new column.
Base class for all ROOT issued exceptions.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
std::size_t GetInitialUnzippedPageSize() const
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.