42#include <unordered_map>
79 return R__FAIL(
"page checksum verification failed, data corruption detected");
86 return R__FAIL(
"invalid attempt to extract non-existing page checksum");
88 assert(fBufferSize >= kNBytesPageChecksum);
91 reinterpret_cast<const unsigned char *
>(
fBuffer) + fBufferSize - kNBytesPageChecksum,
checksum);
115 for (std::size_t i = 0; i <
itr->second.size(); ++i) {
119 itr->second[i].fRefCounter--;
120 if (
itr->second[i].fRefCounter == 0) {
122 if (
itr->second.empty()) {
123 fColumnInfos.erase(
itr);
151 if (
clusterDesc.GetFirstEntryIndex() >= (fFirstEntry + fNEntries))
163std::unique_ptr<ROOT::Experimental::Internal::RPageSource>
170 if (location.empty()) {
173 if (location.find(
"daos://") == 0)
175 return std::make_unique<RPageSourceDaos>(
ntupleName, location, options);
180 return std::make_unique<RPageSourceFile>(
ntupleName, location, options);
201 if ((
range.fFirstEntry +
range.fNEntries) > GetNEntries()) {
211 fHasStructure =
true;
218 GetExclDescriptorGuard().MoveIn(AttachImpl(
mode));
224 auto clone = CloneImpl();
226 clone->GetExclDescriptorGuard().MoveIn(GetSharedDescriptorGuard()->Clone());
227 clone->fHasStructure =
true;
228 clone->fIsAttached =
true;
235 return GetSharedDescriptorGuard()->GetNEntries();
240 return GetSharedDescriptorGuard()->GetNElements(
columnHandle.fPhysicalId);
261 std::vector<std::unique_ptr<RColumnElementBase>>
allElements;
267 if (!fActivePhysicalColumns.HasColumnInfos(
columnId))
278 for (
const auto &pi :
pageRange.GetPageInfos()) {
283 sealedPage.SetBufferSize(pi.GetLocator().GetNBytesOnStorage() + pi.HasChecksum() * kNBytesPageChecksum);
310 fCounters->fNPageUnsealed.Add(
pageNo);
314 fTaskScheduler->Wait();
317 throw RException(
R__FAIL(
"page checksum verification failed, data corruption detected"));
339 pageInfo.GetLocator().GetNBytesOnStorage()));
354 GetSharedDescriptorGuard()->GetClusterDescriptor(
clusterId).GetFirstEntryIndex();
355 auto itr = fPreloadedClusters.
begin();
357 fPagePool.Evict(
itr->second);
358 itr = fPreloadedClusters.erase(
itr);
361 while ((
itr != fPreloadedClusters.
end()) &&
366 while (
itr != fPreloadedClusters.
end()) {
367 fPagePool.Evict(
itr->second);
368 itr = fPreloadedClusters.erase(
itr);
382 UpdateLastUsedCluster(
cachedPageRef.Get().GetClusterInfo().GetId());
453 fCounters = std::make_unique<RCounters>(
RCounters{
457 "volume read from storage (required)"),
459 "volume read from storage (overhead)"),
462 "number of partial clusters preloaded from storage"),
465 "number of pages unzipped and decoded"),
468 "wall clock time spent decompressing"),
470 "CPU time spent reading"),
472 "CPU time spent decompressing"),
474 "bwRead",
"MB/s",
"bandwidth compressed bytes read per second", fMetrics,
491 "bwReadUnzip",
"MB/s",
"bandwidth uncompressed bytes read per second", fMetrics,
505 "bwUnzip",
"MB/s",
"decompression bandwidth of uncompressed bytes per second", fMetrics,
519 "rtReadEfficiency",
"",
"ratio of payload over all bytes read", fMetrics,
525 return {
true, 1. / (1. + (1. *
szReadOverhead->GetValueAsInt()) / payload)};
532 "rtCompression",
"",
"ratio of compressed bytes / uncompressed bytes", fMetrics,
583 page = std::move(tmp);
595 if (fCurrentPageSize ==
other.fCurrentPageSize)
596 return fColumn->GetOnDiskId() >
other.fColumn->GetOnDiskId();
597 return fCurrentPageSize >
other.fCurrentPageSize;
606 auto itr = fColumnsSortedByPageSize.
begin();
607 while (
itr != fColumnsSortedByPageSize.
end()) {
610 if (
itr->fCurrentPageSize ==
itr->fInitialPageSize) {
619 if (
itr != fColumnsSortedByPageSize.
end())
628 itr = fColumnsSortedByPageSize.find(next);
637 auto itr = fColumnsSortedByPageSize.find(key);
638 if (
itr == fColumnsSortedByPageSize.
end()) {
652 fColumnsSortedByPageSize.erase(
itr);
658 fColumnsSortedByPageSize.insert(
elem);
667 fColumnsSortedByPageSize.insert(
elem);
672 fColumnsSortedByPageSize.insert(
elem);
679 :
RPageStorage(
name), fOptions(options.Clone()), fWritePageMemoryManager(options.GetPageBufferBudget())
693 unsigned char *
pageBuf =
reinterpret_cast<unsigned char *
>(config.
fPage->GetBuffer());
698 if (!config.
fElement->IsMappable()) {
727 const auto nBytes =
page.GetNBytes() + GetWriteOptions().GetEnablePageChecksums() * kNBytesPageChecksum;
728 if (fSealPageBuffer.size() <
nBytes)
729 fSealPageBuffer.resize(
nBytes);
735 config.
fWriteChecksum = GetWriteOptions().GetEnablePageChecksums();
737 config.
fBuffer = fSealPageBuffer.data();
739 return SealPage(config);
744 for (
const auto &cb : fOnDatasetCommitCallbacks)
762std::unique_ptr<ROOT::Experimental::Internal::RPageSink>
769 if (location.empty()) {
772 if (location.find(
"daos://") == 0) {
774 return std::make_unique<RPageSinkDaos>(
ntupleName, location, options);
781 return std::make_unique<RPageSinkFile>(
ntupleName, location, options);
795 auto columnId = fDescriptorBuilder.GetDescriptor().GetNPhysicalColumns();
810 fDescriptorBuilder.AddColumn(
columnBuilder.MakeDescriptor().Unwrap());
817 const auto &
descriptor = fDescriptorBuilder.GetDescriptor();
823 const auto &
reps =
f.GetColumnRepresentatives();
826 return reps.size() *
reps[0].size();
840 fDescriptorBuilder.AddFieldLink(
f.GetParent()->GetOnDiskId(),
fieldId);
849 fDescriptorBuilder.AddFieldLink(
f.GetParent()->GetOnDiskId(),
fieldId);
856 .PhysicalColumnId(
source.GetLogicalId())
858 .BitsOnStorage(
source.GetBitsOnStorage())
859 .ValueRange(
source.GetValueRange())
862 .RepresentationIndex(
source.GetRepresentationIndex());
863 fDescriptorBuilder.AddColumn(
columnBuilder.MakeDescriptor().Unwrap());
874 for (
auto f :
changeset.fAddedProjectedFields) {
891 columnRange.SetCompressionSettings(GetWriteOptions().GetCompression());
895 fOpenPageRanges.emplace_back(std::move(
pageRange));
900 if (fSerializationContext.GetHeaderSize() > 0)
901 fSerializationContext.MapSchema(
descriptor,
true);
908 throw RException(
R__FAIL(
"ROOT bug: unexpected type extra info in UpdateExtraTypeInfo()"));
915 fDescriptorBuilder.SetNTuple(fNTupleName, model.
GetDescription());
916 const auto &
descriptor = fDescriptorBuilder.GetDescriptor();
926 for (
auto f :
fieldZero.GetMutableSubfields())
936 InitImpl(buffer.get(), fSerializationContext.GetHeaderSize());
938 fDescriptorBuilder.BeginHeaderExtension();
941std::unique_ptr<ROOT::RNTupleModel>
947 const auto &
descriptor = fDescriptorBuilder.GetDescriptor();
951 R__ASSERT(fOpenColumnRanges.empty() && fOpenPageRanges.empty());
952 fOpenColumnRanges.reserve(
nColumns);
955 const auto &column =
descriptor.GetColumnDescriptor(i);
958 columnRange.SetFirstElementIndex(column.GetFirstElementIndex());
960 columnRange.SetCompressionSettings(GetWriteOptions().GetCompression());
964 fOpenPageRanges.emplace_back(std::move(
pageRange));
973 for (
unsigned int i = 0; i < fOpenColumnRanges.size(); ++i) {
974 R__ASSERT(fOpenColumnRanges[i].GetPhysicalColumnId() == i);
975 if (!
cluster.ContainsColumn(i))
980 fOpenColumnRanges[i].IncrementFirstElementIndex(
columnRange.GetNElements());
982 fDescriptorBuilder.AddCluster(
cluster.Clone());
991 modelOpts.SetReconstructProjections(
true);
995 projectedFields.GetFieldZero().SetOnDiskId(model->GetConstFieldZero().GetOnDiskId());
1002 InitImpl(buffer.get(), fSerializationContext.GetHeaderSize());
1004 fDescriptorBuilder.BeginHeaderExtension();
1007 fIsInitialized =
true;
1014 fOpenColumnRanges.at(
columnHandle.fPhysicalId).SetIsSuppressed(
true);
1020 fOpenColumnRanges.at(
columnHandle.fPhysicalId).IncrementNElements(
page.GetNElements());
1025 pageInfo.SetHasChecksum(GetWriteOptions().GetEnablePageChecksums());
1042 std::span<RPageStorage::RSealedPageGroup> ranges,
const std::vector<bool> &
mask)
1044 std::vector<ROOT::RNTupleLocator>
locators;
1047 for (
auto &
range : ranges) {
1058 std::span<RPageStorage::RSealedPageGroup> ranges)
1066 std::vector<bool>
mask;
1070 std::unordered_map<std::uint64_t, RSealedPageLink>
originalPages;
1072 for (
auto &
range : ranges) {
1078 if (!fFeatures.fCanMergePages || !fOptions->GetEnableSamePageMerging()) {
1079 mask.emplace_back(
true);
1090 mask.emplace_back(
true);
1095 const auto *
p =
itr->second.fSealedPage;
1098 mask.emplace_back(
true);
1103 mask.emplace_back(
false);
1107 mask.shrink_to_fit();
1114 for (
auto &
range : ranges) {
1116 fOpenColumnRanges.at(
range.fPhysicalColumnId).IncrementNElements(
sealedPageIt->GetNElements());
1122 fOpenPageRanges.at(
range.fPhysicalColumnId).GetPageInfos().emplace_back(
pageInfo);
1134 for (
unsigned int i = 0; i < fOpenColumnRanges.size(); ++i) {
1136 columnInfo.fCompressionSettings = fOpenColumnRanges[i].GetCompressionSettings().value();
1137 if (fOpenColumnRanges[i].IsSuppressed()) {
1138 assert(fOpenPageRanges[i].GetPageInfos().empty());
1139 columnInfo.fPageRange.SetPhysicalColumnId(i);
1142 fOpenColumnRanges[i].SetNElements(0);
1143 fOpenColumnRanges[i].SetIsSuppressed(
false);
1145 std::swap(
columnInfo.fPageRange, fOpenPageRanges[i]);
1146 fOpenPageRanges[i].SetPhysicalColumnId(i);
1148 columnInfo.fNElements = fOpenColumnRanges[i].GetNElements();
1149 fOpenColumnRanges[i].SetNElements(0);
1161 clusterBuilder.ClusterId(fDescriptorBuilder.GetDescriptor().GetNActiveClusters())
1162 .FirstEntryIndex(fPrevClusterNEntries)
1172 fOpenColumnRanges[
colId].IncrementFirstElementIndex(
columnInfo.fNElements);
1176 clusterBuilder.CommitSuppressedColumnRanges(fDescriptorBuilder.GetDescriptor()).ThrowOnError();
1189 fDescriptorBuilder.AddCluster(
clusterBuilder.MoveDescriptor().Unwrap());
1190 fPrevClusterNEntries +=
cluster.fNEntries;
1196 const auto &
descriptor = fDescriptorBuilder.GetDescriptor();
1201 for (
auto i = fNextClusterInGroup; i <
nClusters; ++i) {
1202 physClusterIDs.emplace_back(fSerializationContext.MapClusterId(i));
1215 cgBuilder.MinEntry(0).EntrySpan(0).NClusters(0);
1222 .NClusters(
nClusters - fNextClusterInGroup);
1224 std::vector<ROOT::DescriptorId_t>
clusterIds;
1226 for (
auto i = fNextClusterInGroup; i <
nClusters; ++i) {
1230 fDescriptorBuilder.AddClusterGroup(
cgBuilder.MoveDescriptor().Unwrap());
1238 if (!fStreamerInfos.empty()) {
1241 for (
const auto &
etDesc : fDescriptorBuilder.GetDescriptor().GetExtraTypeInfoIterable()) {
1248 fStreamerInfos.merge(
etInfo);
1255 fDescriptorBuilder.ReplaceExtraTypeInfo(
extraInfoBuilder.MoveDescriptor().Unwrap());
1258 const auto &
descriptor = fDescriptorBuilder.GetDescriptor();
1270 fCounters = std::make_unique<RCounters>(
RCounters{
1272 "number of pages committed to storage"),
1274 "volume written for committed pages"),
1279 "CPU time spent writing"),
1281 "CPU time spent compressing")});
#define R__FORWARD_ERROR(res)
Short-hand to return an RResult<T> in an error state (i.e. after checking)
#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.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
winID h TVirtualViewer3D TVirtualGLPainter p
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 mask
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 result
Option_t Option_t TPoint TPoint const char mode
A thread-safe integral performance counter.
A metric element that computes its floating point value from other counters.
A collection of Counter objects with a name, a unit, and a description.
An in-memory subset of the packed and compressed pages of a cluster.
std::unordered_set< ROOT::DescriptorId_t > ColumnSet_t
static std::uint32_t SerializeXxHash3(const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3, void *buffer)
Writes a XxHash-3 64bit checksum of the byte range given by data and length.
static RResult< StreamerInfoMap_t > DeserializeStreamerInfos(const std::string &extraTypeInfoContent)
static std::string SerializeStreamerInfos(const StreamerInfoMap_t &infos)
EDescriptorDeserializeMode
static RResult< std::uint32_t > SerializePageList(void *buffer, const RNTupleDescriptor &desc, std::span< ROOT::DescriptorId_t > physClusterIDs, const RContext &context)
static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static RResult< std::uint32_t > SerializeFooter(void *buffer, const RNTupleDescriptor &desc, const RContext &context)
static RResult< void > VerifyXxHash3(const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3)
Expects an xxhash3 checksum in the 8 bytes following data + length and verifies it.
static RResult< RContext > SerializeHeader(void *buffer, const RNTupleDescriptor &desc)
A memory region that contains packed and compressed pages.
A page as being stored on disk, that is packed and compressed.
virtual void InitImpl(unsigned char *serializedHeader, std::uint32_t length)=0
~RPagePersistentSink() override
void UpdateSchema(const ROOT::Internal::RNTupleModelChangeset &changeset, ROOT::NTupleSize_t firstEntry) final
Incorporate incremental changes to the model into the ntuple descriptor.
void CommitSealedPage(ROOT::DescriptorId_t physicalColumnId, const RPageStorage::RSealedPage &sealedPage) final
Write a preprocessed page to storage. The column must have been added before.
RStagedCluster StageCluster(ROOT::NTupleSize_t nNewEntries) final
Stage the current cluster and create a new one for the following data.
RPagePersistentSink(std::string_view ntupleName, const ROOT::RNTupleWriteOptions &options)
virtual std::vector< RNTupleLocator > CommitSealedPageVImpl(std::span< RPageStorage::RSealedPageGroup > ranges, const std::vector< bool > &mask)
Vector commit of preprocessed pages.
void CommitClusterGroup() final
Write out the page locations (page list envelope) for all the committed clusters since the last call ...
void UpdateExtraTypeInfo(const ROOT::RExtraTypeInfoDescriptor &extraTypeInfo) final
Adds an extra type information record to schema.
void CommitSealedPageV(std::span< RPageStorage::RSealedPageGroup > ranges) final
Write a vector of preprocessed pages to storage. The corresponding columns must have been added befor...
std::unique_ptr< RNTupleModel > InitFromDescriptor(const ROOT::RNTupleDescriptor &descriptor, bool copyClusters)
Initialize sink based on an existing descriptor and fill into the descriptor builder,...
void CommitSuppressedColumn(ColumnHandle_t columnHandle) final
Commits a suppressed column for the current cluster.
void CommitStagedClusters(std::span< RStagedCluster > clusters) final
Commit staged clusters, logically appending them to the ntuple descriptor.
ColumnHandle_t AddColumn(ROOT::DescriptorId_t fieldId, ROOT::Internal::RColumn &column) final
Register a new column.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSink.
void CommitPage(ColumnHandle_t columnHandle, const ROOT::Internal::RPage &page) final
Write a page to the storage. The column must have been added before.
void CommitDatasetImpl() final
static std::unique_ptr< RPageSink > Create(std::string_view ntupleName, std::string_view location, const ROOT::RNTupleWriteOptions &options=ROOT::RNTupleWriteOptions())
Guess the concrete derived page source from the location.
Abstract interface to write data into an ntuple.
void CommitDataset()
Run the registered callbacks and finalize the current cluster and the entrire data set.
virtual ROOT::Internal::RPage ReservePage(ColumnHandle_t columnHandle, std::size_t nElements)
Get a new, empty page for the given column that can be filled with up to nElements; nElements must be...
RSealedPage SealPage(const ROOT::Internal::RPage &page, const ROOT::Internal::RColumnElementBase &element)
Helper for streaming a page.
RPageSink(std::string_view ntupleName, const ROOT::RNTupleWriteOptions &options)
void Insert(ROOT::DescriptorId_t physicalColumnId, ROOT::Internal::RColumnElementBase::RIdentifier elementId)
RCluster::ColumnSet_t ToColumnSet() const
void Erase(ROOT::DescriptorId_t physicalColumnId, ROOT::Internal::RColumnElementBase::RIdentifier elementId)
RPageSource(std::string_view ntupleName, const ROOT::RNTupleReadOptions &fOptions)
virtual ROOT::Internal::RPageRef LoadPage(ColumnHandle_t columnHandle, ROOT::NTupleSize_t globalIndex)
Allocates and fills a page that contains the index-th element.
void PrepareLoadCluster(const RCluster::RKey &clusterKey, ROnDiskPageMap &pageZeroMap, std::function< void(ROOT::DescriptorId_t, ROOT::NTupleSize_t, const ROOT::RClusterDescriptor::RPageInfo &)> perPageFunc)
Prepare a page range read for the column set in clusterKey.
void LoadStructure()
Loads header and footer without decompressing or deserializing them.
void UpdateLastUsedCluster(ROOT::DescriptorId_t clusterId)
Does nothing if fLastUsedCluster == clusterId.
static RResult< ROOT::Internal::RPage > UnsealPage(const RSealedPage &sealedPage, const ROOT::Internal::RColumnElementBase &element, ROOT::Internal::RPageAllocator &pageAlloc)
Helper for unstreaming a page.
std::unique_ptr< RPageSource > Clone() const
Open the same storage multiple time, e.g.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSource.
ROOT::NTupleSize_t GetNElements(ColumnHandle_t columnHandle)
void DropColumn(ColumnHandle_t columnHandle) override
Unregisters a column.
void UnzipCluster(RCluster *cluster)
Parallel decompression and unpacking of the pages in the given cluster.
ROOT::NTupleSize_t GetNEntries()
ColumnHandle_t AddColumn(ROOT::DescriptorId_t fieldId, ROOT::Internal::RColumn &column) override
Register a new column.
static std::unique_ptr< RPageSource > Create(std::string_view ntupleName, std::string_view location, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Guess the concrete derived page source from the file name (location)
void SetEntryRange(const REntryRange &range)
Promise to only read from the given entry range.
void Attach(RNTupleSerializer::EDescriptorDeserializeMode mode=RNTupleSerializer::EDescriptorDeserializeMode::kForReading)
Open the physical storage container and deserialize header and footer.
virtual void UnzipClusterImpl(RCluster *cluster)
Common functionality of an ntuple storage for both reading and writing.
RPageStorage(std::string_view name)
bool TryEvict(std::size_t targetAvailableSize, std::size_t pageSizeLimit)
Flush columns in order of allocated write page size until the sum of all write page allocations leave...
bool TryUpdate(ROOT::Internal::RColumn &column, std::size_t newWritePageSize)
Try to register the new write page size for the given column.
A helper class for piece-wise construction of an RClusterDescriptor.
A helper class for piece-wise construction of an RClusterGroupDescriptor.
A helper class for piece-wise construction of an RColumnDescriptor.
A column element encapsulates the translation between basic C++ types and their column representation...
virtual RIdentifier GetIdentifier() const =0
A column is a storage-backed array of a simple, fixed-size type, from which pages can be mapped into ...
std::optional< std::pair< double, double > > GetValueRange() const
std::uint16_t GetRepresentationIndex() const
ROOT::Internal::RColumnElementBase * GetElement() const
ROOT::ENTupleColumnType GetType() const
ROOT::NTupleSize_t GetFirstElementIndex() const
std::size_t GetWritePageCapacity() const
std::uint16_t GetBitsOnStorage() const
std::uint32_t GetIndex() const
A helper class for piece-wise construction of an RFieldDescriptor.
static RFieldDescriptorBuilder FromField(const ROOT::RFieldBase &field)
Make a new RFieldDescriptorBuilder based off a live RNTuple field.
static std::size_t Zip(const void *from, std::size_t nbytes, int compression, void *to)
Returns the size of the compressed data, written into the provided output buffer.
static void Unzip(const void *from, size_t nbytes, size_t dataLen, void *to)
The nbytes parameter provides the size ls of the from buffer.
static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options)
Uses standard C++ memory allocation for the column data pages.
Abstract interface to allocate and release pages.
Stores information about the cluster in which this page resides.
A page is a slice of a column that is mapped into memory.
static const void * GetPageZeroBuffer()
Return a pointer to the page zero buffer used if there is no on-disk data for a particular deferred c...
const ROOT::RFieldBase * GetSourceField(const ROOT::RFieldBase *target) const
Metadata for RNTuple clusters.
Base class for all ROOT issued exceptions.
A field translates read and write calls from/to underlying columns to/from tree values.
The on-storage metadata of an RNTuple.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
The RNTupleModel encapulates the schema of an RNTuple.
const std::string & GetDescription() const
Common user-tunable settings for reading RNTuples.
Common user-tunable settings for storing RNTuples.
const_iterator begin() const
const_iterator end() const
void ThrowOnError()
Short-hand method to throw an exception in the case of errors.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
RResult< void > EnsureValidNameForRNTuple(std::string_view name, std::string_view where)
Check whether a given string is a valid name according to the RNTuple specification.
std::unique_ptr< T[]> MakeUninitArray(std::size_t size)
Make an array of default-initialized elements.
void CallConnectPageSinkOnField(RFieldBase &, ROOT::Experimental::Internal::RPageSink &, ROOT::NTupleSize_t firstEntry=0)
RProjectedFields & GetProjectedFieldsOfModel(RNTupleModel &model)
std::unique_ptr< RColumnElementBase > GenerateColumnElement(std::type_index inMemoryType, ROOT::ENTupleColumnType onDiskType)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr NTupleSize_t kInvalidNTupleIndex
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
The identifiers that specifies the content of a (partial) cluster.
On-disk pages within a page source are identified by the column and page number.
Default I/O performance counters that get registered in fMetrics.
Parameters for the SealPage() method.
std::uint32_t fCompressionSettings
Compression algorithm and level to apply.
void * fBuffer
Location for sealed output. The memory buffer has to be large enough.
bool fAllowAlias
If false, the output buffer must not point to the input page buffer, which would otherwise be an opti...
const ROOT::Internal::RPage * fPage
Input page to be sealed.
const ROOT::Internal::RColumnElementBase * fElement
Corresponds to the page's elements, for size calculation etc.
bool fWriteChecksum
Adds a 8 byte little-endian xxhash3 checksum to the page payload.
Cluster that was staged, but not yet logically appended to the RNTuple.
Summarizes cluster-level information that are necessary to load a certain page.
Default I/O performance counters that get registered in fMetrics
Used in SetEntryRange / GetEntryRange.
bool IntersectsWith(const ROOT::RClusterDescriptor &clusterDesc) const
Returns true if the given cluster has entries within the entry range.
A sealed page contains the bytes of a page as written to storage (packed & compressed).
RResult< std::uint64_t > GetChecksum() const
Returns a failure if the sealed page has no checksum.
RResult< void > VerifyChecksumIfEnabled() const
bool operator>(const RColumnInfo &other) const
ROOT::Internal::RColumn * fColumn
Every concrete RColumnElement type is identified by its on-disk type (column type) and the in-memory ...
The incremental changes to a RNTupleModel
Information about a single page in the context of a cluster's page range.
Modifiers passed to CreateModel()