50 fCompressor = std::make_unique<RNTupleCompressor>();
73 auto zipBuffer = MakeUninitArray<unsigned char>(
length);
74 auto szZipHeader = fCompressor->Zip(serializedHeader,
length, GetWriteOptions().GetCompression(),
76 fWriter->WriteNTupleHeader(zipBuffer.get(), szZipHeader,
length);
81 std::size_t bytesPacked)
83 std::uint64_t offsetData;
90 result.fPosition = offsetData;
92 fCounters->fNPageCommitted.Inc();
105 sealedPage = SealPage(page, *element);
109 return WriteSealedPage(sealedPage, element->GetPackedSize(page.
GetNElements()));
116 const auto nBits = fDescriptorBuilder.GetDescriptor().GetColumnDescriptor(physicalColumnId).GetBitsOnStorage();
117 const auto bytesPacked = (nBits * sealedPage.
GetNElements() + 7) / 8;
118 return WriteSealedPage(sealedPage, bytesPacked);
122 std::vector<RNTupleLocator> &locators)
128 locators.reserve(locators.size() + batch.
fSealedPages.size());
131 fWriter->WriteIntoReservedBlob(pagePtr->GetBuffer(), pagePtr->GetBufferSize(),
offset);
135 locators.push_back(locator);
136 offset += pagePtr->GetBufferSize();
139 fCounters->fNPageCommitted.Add(batch.
fSealedPages.size());
140 fCounters->fSzWritePayload.Add(batch.
fSize);
141 fNBytesCurrentCluster += batch.
fSize;
148std::vector<ROOT::Experimental::RNTupleLocator>
150 const std::vector<bool> &
mask)
152 const std::uint64_t maxKeySize = fOptions->GetMaxKeySize();
155 std::vector<ROOT::Experimental::RNTupleLocator> locators;
157 std::size_t iPage = 0;
158 for (
auto rangeIt = ranges.begin(); rangeIt != ranges.end(); ++rangeIt) {
159 auto &range = *rangeIt;
160 if (range.fFirst == range.fLast) {
165 const auto bitsOnStorage =
166 fDescriptorBuilder.GetDescriptor().GetColumnDescriptor(range.fPhysicalColumnId).GetBitsOnStorage();
168 for (
auto sealedPageIt = range.fFirst; sealedPageIt != range.fLast; ++sealedPageIt, ++iPage) {
172 const auto bytesPacked = (bitsOnStorage * sealedPageIt->GetNElements() + 7) / 8;
174 if (batch.fSize > 0 && batch.fSize + sealedPageIt->GetBufferSize() > maxKeySize) {
182 CommitBatchOfPages(batch, locators);
185 if (sealedPageIt->GetBufferSize() > maxKeySize) {
191 assert(batch.fSize == 0);
194 fWriter->WriteBlob(sealedPageIt->GetBuffer(), sealedPageIt->GetBufferSize(), bytesPacked);
198 locators.push_back(locator);
200 fCounters->fNPageCommitted.Inc();
201 fCounters->fSzWritePayload.Add(sealedPageIt->GetBufferSize());
202 fNBytesCurrentCluster += sealedPageIt->GetBufferSize();
205 batch.fSealedPages.emplace_back(&(*sealedPageIt));
206 batch.fSize += sealedPageIt->GetBufferSize();
207 batch.fBytesPacked += bytesPacked;
212 if (batch.fSize > 0) {
213 CommitBatchOfPages(batch, locators);
221 auto result = fNBytesCurrentCluster;
222 fNBytesCurrentCluster = 0;
230 auto bufPageListZip = MakeUninitArray<unsigned char>(
length);
231 auto szPageListZip = fCompressor->Zip(serializedPageList,
length, GetWriteOptions().GetCompression(),
235 result.fBytesOnStorage = szPageListZip;
236 result.fPosition = fWriter->WriteBlob(bufPageListZip.get(), szPageListZip,
length);
243 fWriter->UpdateStreamerInfos(fDescriptorBuilder.BuildStreamerInfos());
244 auto bufFooterZip = MakeUninitArray<unsigned char>(
length);
245 auto szFooterZip = fCompressor->Zip(serializedFooter,
length, GetWriteOptions().GetCompression(),
247 fWriter->WriteNTupleFooter(bufFooterZip.get(), szFooterZip,
length);
256 fClusterPool(std::make_unique<
RClusterPool>(*this, options.GetClusterBunchSize()))
262 std::unique_ptr<ROOT::Internal::RRawFile> file,
266 fFile = std::move(file);
277std::unique_ptr<ROOT::Experimental::Internal::RPageSourceFile>
282 throw RException(
R__FAIL(
"This RNTuple object was not streamed from a ROOT file (TFile or descendant)"));
284 std::unique_ptr<ROOT::Internal::RRawFile> rawFile;
290 auto protocol = std::string(url->GetProtocol());
291 if (className ==
"TFile") {
293 }
else if (className ==
"TDavixFile" || className ==
"TNetXNGFile") {
299 auto pageSource = std::make_unique<RPageSourceFile>(
"", std::move(rawFile), options);
300 pageSource->fAnchor = anchor;
301 pageSource->fNTupleName = pageSource->fDescriptorBuilder.GetDescriptor().GetName();
312 fAnchor = fReader.GetNTuple(fNTupleName).Unwrap();
314 fReader.SetMaxKeySize(fAnchor->GetMaxKeySize());
318 throw RException(
R__FAIL(
"unsupported RNTuple epoch version: " + std::to_string(fAnchor->GetVersionEpoch())));
321 fDescriptorBuilder.SetOnDiskHeaderSize(fAnchor->GetNBytesHeader());
322 fDescriptorBuilder.AddToOnDiskFooterSize(fAnchor->GetNBytesFooter());
325 const auto bufSize = fAnchor->GetNBytesHeader() + fAnchor->GetNBytesFooter() +
326 std::max(fAnchor->GetLenHeader(), fAnchor->GetLenFooter());
327 fStructureBuffer.fBuffer = MakeUninitArray<unsigned char>(bufSize);
328 fStructureBuffer.fPtrHeader = fStructureBuffer.fBuffer.get();
329 fStructureBuffer.fPtrFooter = fStructureBuffer.fBuffer.get() + fAnchor->GetNBytesHeader();
331 auto readvLimits = fFile->GetReadVLimits();
333 readvLimits.fMaxSingleSize = std::min<size_t>(readvLimits.fMaxSingleSize, fAnchor->GetMaxKeySize());
335 if ((readvLimits.fMaxReqs < 2) ||
336 (std::max(fAnchor->GetNBytesHeader(), fAnchor->GetNBytesFooter()) > readvLimits.fMaxSingleSize) ||
337 (fAnchor->GetNBytesHeader() + fAnchor->GetNBytesFooter() > readvLimits.fMaxTotalSize)) {
339 fReader.ReadBuffer(fStructureBuffer.fPtrHeader, fAnchor->GetNBytesHeader(), fAnchor->GetSeekHeader());
340 fReader.ReadBuffer(fStructureBuffer.fPtrFooter, fAnchor->GetNBytesFooter(), fAnchor->GetSeekFooter());
341 fCounters->fNRead.Add(2);
345 {fStructureBuffer.fPtrHeader, fAnchor->GetSeekHeader(), fAnchor->GetNBytesHeader(), 0},
346 {fStructureBuffer.fPtrFooter, fAnchor->GetSeekFooter(), fAnchor->GetNBytesFooter(), 0}};
347 fFile->ReadV(readRequests, 2);
348 fCounters->fNReadV.Inc();
354 auto unzipBuf =
reinterpret_cast<unsigned char *
>(fStructureBuffer.fPtrFooter) + fAnchor->GetNBytesFooter();
364 auto desc = fDescriptorBuilder.MoveDescriptor();
366 std::vector<unsigned char> buffer;
367 for (
const auto &cgDesc : desc.GetClusterGroupIterable()) {
369 std::max<size_t>(buffer.size(), cgDesc.GetPageListLength() + cgDesc.GetPageListLocator().fBytesOnStorage));
370 auto *zipBuffer = buffer.data() + cgDesc.GetPageListLength();
371 fReader.ReadBuffer(zipBuffer, cgDesc.GetPageListLocator().fBytesOnStorage,
372 cgDesc.GetPageListLocator().GetPosition<std::uint64_t>());
380 fFile->SetBuffering(
false);
392 auto descriptorGuard = GetSharedDescriptorGuard();
393 const auto &clusterDescriptor = descriptorGuard->GetClusterDescriptor(clusterId);
394 pageInfo = clusterDescriptor.GetPageRange(physicalColumnId).Find(clusterIndex.
GetIndex());
419 const auto clusterId = clusterInfo.
fClusterId;
420 const auto pageInfo = clusterInfo.
fPageInfo;
423 const auto elementSize = element->
GetSize();
424 const auto elementInMemoryType = element->GetIdentifier().fInMemoryType;
427 auto pageZero = fPageAllocator->NewPage(elementSize, pageInfo.fNElements);
428 pageZero.GrowUnchecked(pageInfo.fNElements);
429 memset(pageZero.GetBuffer(), 0, pageZero.GetNBytes());
430 pageZero.SetWindow(clusterInfo.
fColumnOffset + pageInfo.fFirstInPage,
432 return fPagePool.RegisterPage(std::move(pageZero),
RPagePool::RKey{columnId, elementInMemoryType});
438 sealedPage.
SetBufferSize(pageInfo.fLocator.fBytesOnStorage + pageInfo.fHasChecksum * kNBytesPageChecksum);
439 std::unique_ptr<unsigned char[]> directReadBuffer;
442 directReadBuffer = MakeUninitArray<unsigned char>(sealedPage.
GetBufferSize());
445 fReader.ReadBuffer(directReadBuffer.get(), sealedPage.
GetBufferSize(),
446 pageInfo.fLocator.GetPosition<std::uint64_t>());
448 fCounters->fNPageRead.Inc();
449 fCounters->fNRead.Inc();
451 sealedPage.
SetBuffer(directReadBuffer.get());
453 if (!fCurrentCluster || (fCurrentCluster->GetId() != clusterId) || !fCurrentCluster->ContainsColumn(columnId))
454 fCurrentCluster = fClusterPool->GetCluster(clusterId, fActivePhysicalColumns.ToColumnSet());
455 R__ASSERT(fCurrentCluster->ContainsColumn(columnId));
459 if (!cachedPageRef.Get().IsNull())
460 return cachedPageRef;
463 auto onDiskPage = fCurrentCluster->GetOnDiskPage(key);
465 sealedPage.
SetBuffer(onDiskPage->GetAddress());
471 newPage = UnsealPage(sealedPage, *element).Unwrap();
472 fCounters->fSzUnzip.Add(elementSize * pageInfo.fNElements);
477 fCounters->fNPageUnsealed.Inc();
478 return fPagePool.RegisterPage(std::move(newPage),
RPagePool::RKey{columnId, elementInMemoryType});
481std::unique_ptr<ROOT::Experimental::Internal::RPageSource>
485 clone->fFile = fFile->Clone();
487 return std::unique_ptr<RPageSourceFile>(clone);
490std::unique_ptr<ROOT::Experimental::Internal::RCluster>
492 const RCluster::RKey &clusterKey, std::vector<ROOT::Internal::RRawFile::RIOVec> &readRequests)
494 struct ROnDiskPageLocator {
497 std::uint64_t fOffset = 0;
498 std::uint64_t
fSize = 0;
499 std::size_t fBufPos = 0;
502 std::vector<ROnDiskPageLocator> onDiskPages;
504 auto pageZeroMap = std::make_unique<ROnDiskPageMap>();
505 PrepareLoadCluster(clusterKey, *pageZeroMap,
508 const auto &pageLocator = pageInfo.
fLocator;
511 const auto nBytes = pageLocator.fBytesOnStorage + pageInfo.
fHasChecksum * kNBytesPageChecksum;
512 activeSize += nBytes;
513 onDiskPages.push_back(
514 {physicalColumnId, pageNo, pageLocator.GetPosition<std::uint64_t>(), nBytes, 0});
518 std::sort(onDiskPages.begin(), onDiskPages.end(),
519 [](
const ROnDiskPageLocator &
a,
const ROnDiskPageLocator &
b) { return a.fOffset < b.fOffset; });
528 float maxOverhead = 0.25 * float(activeSize);
529 std::vector<std::size_t> gaps;
530 if (onDiskPages.size())
531 gaps.reserve(onDiskPages.size() - 1);
532 for (
unsigned i = 1; i < onDiskPages.size(); ++i) {
534 static_cast<int64_t
>(onDiskPages[i].fOffset) - (onDiskPages[i - 1].
fSize + onDiskPages[i - 1].fOffset);
535 gaps.emplace_back(std::max(gap, std::int64_t(0)));
537 activeSize += std::min(gap, std::int64_t(0));
539 std::sort(gaps.begin(), gaps.end());
540 std::size_t gapCut = 0;
541 std::size_t currentGap = 0;
543 for (
auto g : gaps) {
544 if (
g != currentGap) {
549 if (szExtra > maxOverhead)
557 const auto currentReadRequestIdx = readRequests.size();
561 if (!onDiskPages.empty())
562 req.
fOffset = onDiskPages[0].fOffset;
563 std::size_t szPayload = 0;
564 std::size_t szOverhead = 0;
565 const std::uint64_t maxKeySize = fReader.GetMaxKeySize();
566 for (
auto &s : onDiskPages) {
570 const std::uint64_t overhead = std::max(
static_cast<std::int64_t
>(s.fOffset) - readUpTo, std::int64_t(0));
571 const std::uint64_t extent = std::max(
static_cast<std::int64_t
>(s.fOffset + s.fSize) - readUpTo, std::int64_t(0));
572 if (req.
fSize + extent < maxKeySize && overhead <= gapCut) {
573 szPayload += (extent - overhead);
574 szOverhead += overhead;
575 s.fBufPos =
reinterpret_cast<intptr_t
>(req.
fBuffer) + s.fOffset - req.
fOffset;
582 readRequests.emplace_back(req);
585 s.fBufPos =
reinterpret_cast<intptr_t
>(req.
fBuffer);
587 szPayload += s.fSize;
591 readRequests.emplace_back(req);
592 fCounters->fSzReadPayload.Add(szPayload);
593 fCounters->fSzReadOverhead.Add(szOverhead);
596 auto buffer =
new unsigned char[
reinterpret_cast<intptr_t
>(req.
fBuffer) + req.
fSize];
597 auto pageMap = std::make_unique<ROnDiskPageMapHeap>(std::unique_ptr<
unsigned char[]>(buffer));
598 for (
const auto &s : onDiskPages) {
600 pageMap->Register(key,
ROnDiskPage(buffer + s.fBufPos, s.fSize));
602 fCounters->fNPageRead.Add(onDiskPages.size());
603 for (
auto i = currentReadRequestIdx; i < readRequests.size(); ++i) {
604 readRequests[i].fBuffer = buffer +
reinterpret_cast<intptr_t
>(readRequests[i].fBuffer);
607 auto cluster = std::make_unique<RCluster>(clusterKey.
fClusterId);
608 cluster->Adopt(std::move(pageMap));
609 cluster->Adopt(std::move(pageZeroMap));
611 cluster->SetColumnAvailable(colId);
615std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>>
618 fCounters->fNClusterLoaded.Add(clusterKeys.size());
620 std::vector<std::unique_ptr<ROOT::Experimental::Internal::RCluster>> clusters;
621 std::vector<ROOT::Internal::RRawFile::RIOVec> readRequests;
623 clusters.reserve(clusterKeys.size());
624 for (
auto key : clusterKeys) {
625 clusters.emplace_back(PrepareSingleCluster(key, readRequests));
628 auto nReqs = readRequests.size();
629 auto readvLimits = fFile->GetReadVLimits();
631 readvLimits.fMaxSingleSize = std::min<size_t>(readvLimits.fMaxSingleSize, fReader.GetMaxKeySize());
635 auto nBatch = std::min(nReqs, readvLimits.fMaxReqs);
637 if (readvLimits.HasSizeLimit()) {
638 std::uint64_t totalSize = 0;
639 for (std::size_t i = 0; i < nBatch; ++i) {
640 if (readRequests[iReq + i].
fSize > readvLimits.fMaxSingleSize) {
645 totalSize += readRequests[iReq + i].fSize;
646 if (totalSize > readvLimits.fMaxTotalSize) {
656 fReader.ReadBuffer(readRequests[iReq].
fBuffer, readRequests[iReq].
fSize, readRequests[iReq].fOffset);
659 fFile->ReadV(&readRequests[iReq], nBatch);
661 fCounters->fNReadV.Inc();
662 fCounters->fNRead.Add(nBatch);
#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 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 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 offset
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 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 length
Record wall time and CPU time between construction and destruction.
Managed a set of clusters containing compressed and packed pages.
std::size_t GetSize() const
RColumnElementBase * GetElement() const
Read RNTuple data blocks from a TFile container, provided by a RRawFile.
static Writer_t MakeMemCopyWriter(unsigned char *dest)
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 std::unique_ptr< RNTupleFileWriter > Append(std::string_view ntupleName, TFile &file, std::uint64_t maxKeySize)
Add a new RNTuple identified by ntupleName to the existing TFile.
static std::unique_ptr< RNTupleFileWriter > Recreate(std::string_view ntupleName, std::string_view path, EContainerFormat containerFormat, const RNTupleWriteOptions &options)
Create or truncate the local file given by path with the new empty RNTuple identified by ntupleName.
static RResult< void > DeserializeHeader(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< void > DeserializeFooter(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< void > DeserializePageList(const void *buffer, std::uint64_t bufSize, DescriptorId_t clusterGroupId, RNTupleDescriptor &desc)
A page as being stored on disk, that is packed and compressed.
Base class for a sink with a physical storage backend.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSink.
Storage provider that write ntuple pages into a file.
std::vector< RNTupleLocator > CommitSealedPageVImpl(std::span< RPageStorage::RSealedPageGroup > ranges, const std::vector< bool > &mask) final
Vector commit of preprocessed pages.
RNTupleLocator WriteSealedPage(const RPageStorage::RSealedPage &sealedPage, std::size_t bytesPacked)
We pass bytesPacked so that TFile::ls() reports a reasonable value for the compression ratio of the c...
void InitImpl(unsigned char *serializedHeader, std::uint32_t length) final
std::uint64_t StageClusterImpl() final
Returns the number of bytes written to storage (excluding metadata)
RNTupleLocator CommitSealedPageImpl(DescriptorId_t physicalColumnId, const RPageStorage::RSealedPage &sealedPage) final
RNTupleLocator CommitClusterGroupImpl(unsigned char *serializedPageList, std::uint32_t length) final
Returns the locator of the page list envelope of the given buffer that contains the serialized page l...
~RPageSinkFile() override
void CommitBatchOfPages(CommitBatch &batch, std::vector< RNTupleLocator > &locators)
Subroutine of CommitSealedPageVImpl, used to perform a vector write of the (multi-)range of pages con...
RPageSinkFile(std::string_view ntupleName, const RNTupleWriteOptions &options)
std::unique_ptr< RNTupleFileWriter > fWriter
RNTupleLocator CommitPageImpl(ColumnHandle_t columnHandle, const RPage &page) override
void CommitDatasetImpl() final
std::unique_ptr< RNTupleCompressor > fCompressor
Helper to zip pages and header/footer; includes a 16MB (kMAXZIPBUF) zip buffer.
Storage provider that reads ntuple pages from a file.
static std::unique_ptr< RPageSourceFile > CreateFromAnchor(const RNTuple &anchor, const RNTupleReadOptions &options=RNTupleReadOptions())
Used from the RNTuple class to build a datasource if the anchor is already available.
RPageRef LoadPageImpl(ColumnHandle_t columnHandle, const RClusterInfo &clusterInfo, ClusterSize_t::ValueType idxInCluster) final
RPageSourceFile(std::string_view ntupleName, const RNTupleReadOptions &options)
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...
std::unique_ptr< RPageSource > CloneImpl() const final
The cloned page source creates a new raw file and reader and opens its own file descriptor to the dat...
std::unique_ptr< RCluster > PrepareSingleCluster(const RCluster::RKey &clusterKey, std::vector< ROOT::Internal::RRawFile::RIOVec > &readRequests)
Helper function for LoadClusters: it prepares the memory buffer (page map) and the read requests for ...
RMiniFileReader fReader
Takes the fFile to read ntuple blobs from it.
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 sealedPage.
~RPageSourceFile() override
void LoadStructureImpl() final
RNTupleDescriptor AttachImpl() final
LoadStructureImpl() has been called before AttachImpl() is called
std::unique_ptr< ROOT::Internal::RRawFile > fFile
An RRawFile is used to request the necessary byte ranges from a local or a remote file.
Abstract interface to read data from an ntuple.
void EnableDefaultMetrics(const std::string &prefix)
Enables the default set of metrics provided by RPageSource.
Stores information about the cluster in which this page resides.
A page is a slice of a column that is mapped into memory.
std::size_t GetNBytes() const
The space taken by column elements in the buffer.
std::uint32_t GetNElements() const
void SetWindow(const NTupleSize_t rangeFirst, const RClusterInfo &clusterInfo)
Seek the page to a certain position of the column.
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...
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
DescriptorId_t GetClusterId() const
ClusterSize_t::ValueType GetIndex() const
Base class for all ROOT issued exceptions.
The on-storage meta-data of an ntuple.
Common user-tunable settings for reading ntuples.
Common user-tunable settings for storing ntuples.
std::uint64_t GetMaxKeySize() const
void ThrowOnError()
Short-hand method to throw an exception in the case of errors.
The RRawFileTFile wraps an open TFile, but does not take ownership.
The RRawFile provides read-only access to local and remote files.
static std::unique_ptr< RRawFile > Create(std::string_view url, ROptions options=ROptions())
Factory method that returns a suitable concrete implementation according to the transport in the url.
Representation of an RNTuple data set in a ROOT file.
static constexpr std::uint16_t kVersionEpoch
TFile * fFile
! The file from which the ntuple was streamed, registered in the custom streamer
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
virtual const TUrl * GetEndpointUrl() const
TClass * IsA() const override
const char * GetName() const override
Returns name of object.
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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
The identifiers that specifies the content of a (partial) cluster.
DescriptorId_t fClusterId
ColumnSet_t fPhysicalColumnSet
On-disk pages within a page source are identified by the column and page number.
size_t fBytesPacked
Total uncompressed size of the elements in the page batch.
size_t fSize
Total size in bytes of the batch.
std::vector< const RSealedPage * > fSealedPages
The list of pages to commit.
Summarizes cluster-level information that are necessary to load a certain page.
DescriptorId_t fClusterId
std::uint64_t fColumnOffset
The first element number of the page's column in the given cluster.
RClusterDescriptor::RPageRange::RPageInfoExtended fPageInfo
Location of the page on disk.
DescriptorId_t fPhysicalId
A sealed page contains the bytes of a page as written to storage (packed & compressed).
const void * GetBuffer() const
void SetHasChecksum(bool hasChecksum)
void SetNElements(std::uint32_t nElements)
void SetBuffer(const void *buffer)
void SetBufferSize(std::size_t bufferSize)
RResult< void > VerifyChecksumIfEnabled() const
std::uint32_t GetNElements() const
std::size_t GetBufferSize() const
std::size_t GetDataSize() const
Generic information about the physical location of data.
std::uint64_t fBytesOnStorage
ELocatorType fType
For non-disk locators, the value for the Type field.
std::variant< std::uint64_t, RNTupleLocatorObject64 > fPosition
Simple on-disk locators consisting of a 64-bit offset use variant type uint64_t; extended locators ha...
const T & GetPosition() const
Used for vector reads from multiple offsets into multiple buffers.
std::size_t fSize
The number of desired bytes.
void * fBuffer
The destination for reading.
std::uint64_t fOffset
The file offset.