16#ifndef ROOT7_RPageStorageFile
17#define ROOT7_RPageStorageFile
39namespace Experimental {
43class RPageAllocatorHeap;
64 std::unique_ptr<Internal::RNTupleFileWriter>
fWriter;
156 std::unique_ptr<ROOT::Internal::RRawFile>
fFile;
An in-memory subset of the packed and compressed pages of a cluster.
A thread-safe integral performance counter.
A metric element that computes its floating point value from other counters.
Helper class to compress data blocks in the ROOT compression frame format.
Helper class to uncompress data blocks in the ROOT compression frame format.
A collection of Counter objects with a name, a unit, and a description.
An either thread-safe or non thread safe counter for CPU ticks.
Manages pages read from a the file.
static RPage NewPage(ColumnId_t columnId, void *mem, std::size_t elementSize, std::size_t nElements)
static void DeletePage(const RPage &page)
Storage provider that write ntuple pages into a file.
RPage ReservePage(ColumnHandle_t columnHandle, std::size_t nElements=0) final
Get a new, empty page for the given column that can be filled with up to nElements.
static constexpr std::size_t kDefaultElementsPerPage
void CreateImpl(const RNTupleModel &model) final
RNTupleMetrics & GetMetrics() final
Returns an empty metrics. Page storage implementations usually have their own metrics.
RNTupleCompressor fCompressor
Helper for zipping keys and header / footer; comprises a 16MB zip buffer.
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
std::unique_ptr< RPageAllocatorHeap > fPageAllocator
std::uint64_t fClusterMinOffset
Byte offset of the first page of the current cluster.
void CommitDatasetImpl() final
std::unique_ptr< Internal::RNTupleFileWriter > fWriter
std::uint64_t fClusterMaxOffset
Byte offset of the end of the last page of the current cluster.
RClusterDescriptor::RLocator CommitPageImpl(ColumnHandle_t columnHandle, const RPage &page) final
RClusterDescriptor::RLocator CommitClusterImpl(NTupleSize_t nEntries) final
Abstract interface to write data into an ntuple.
Storage provider that reads ntuple pages from a file.
RNTupleDecompressor fDecompressor
Helper to unzip pages and header/footer; comprises a 16MB unzip buffer.
RCluster * fCurrentCluster
The last cluster from which a page got populated. Points into fClusterPool->fPool.
RPage PopulatePageFromCluster(ColumnHandle_t columnHandle, const RClusterDescriptor &clusterDescriptor, ClusterSize_t::ValueType idxInCluster)
Internal::RMiniFileReader fReader
Takes the fFile to read ntuple blobs from it.
std::unique_ptr< RClusterPool > fClusterPool
The cluster pool asynchronously preloads the next few clusters.
std::unique_ptr< RCluster > LoadCluster(DescriptorId_t clusterId, const ColumnSet_t &columns) final
Populates all the pages of the given cluster id and columns; it is possible that some columns do not ...
std::unique_ptr< RCounters > fCounters
void ReleasePage(RPage &page) final
Every page store needs to be able to free pages it handed out.
static constexpr std::size_t kMaxPageSize
Cannot process pages larger than 1MB.
RNTupleDescriptor AttachImpl() final
std::unique_ptr< RPageSource > Clone() const final
The cloned page source creates a new raw file and reader and opens its own file descriptor to the dat...
void UnzipClusterImpl(RCluster *cluster) final
std::shared_ptr< RPagePool > fPagePool
The page pool might, at some point, be used by multiple page sources.
std::unique_ptr< ROOT::Internal::RRawFile > fFile
An RRawFile is used to request the necessary byte ranges from a local or a remote file.
RNTupleMetrics & GetMetrics() final
Returns an empty metrics. Page storage implementations usually have their own metrics.
std::unique_ptr< RPageAllocatorFile > fPageAllocator
Populated pages might be shared; there memory buffer is managed by the RPageAllocatorFile.
RPage PopulatePage(ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final
Allocates and fills a page that contains the index-th element.
RNTupleMetrics fMetrics
Wraps the I/O counters and is observed by the RNTupleReader metrics.
Abstract interface to read data from an ntuple.
std::unordered_set< DescriptorId_t > ColumnSet_t
Derived from the model (fields) that are actually being requested at a given point in time.
A page is a slice of a column that is mapped into memory.
Read RNTuple data blocks from a TFile container, provided by a RRawFile.
Meta-data for a set of ntuple clusters.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
The on-storage meta-data of an ntuple.
The RNTupleModel encapulates the schema of an ntuple.
Common user-tunable settings for reading ntuples.
Common user-tunable settings for storing ntuples.
The RRawFile provides read-only access to local and remote files.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
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.
std::int64_t ColumnId_t
Uniquely identifies a physical column within the scope of the current process, used to tag pages.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
I/O performance counters that get registered in fMetrics.
RNTupleAtomicCounter & fSzReadPayload
RNTupleCalcPerf & fBandwidthUnzip
RNTupleCalcPerf & fFractionReadOverhead
RNTupleCalcPerf & fCompressionRatio
RNTupleAtomicCounter & fNRead
RNTupleAtomicCounter & fNPagePopulated
RNTupleAtomicCounter & fSzUnzip
RNTupleAtomicCounter & fTimeWallRead
RNTupleAtomicCounter & fNReadV
RNTupleTickCounter< RNTupleAtomicCounter > & fTimeCpuRead
RNTupleTickCounter< RNTupleAtomicCounter > & fTimeCpuUnzip
RNTupleCalcPerf & fBandwidthReadCompressed
RNTupleCalcPerf & fBandwidthReadUncompressed
RNTupleAtomicCounter & fNPageLoaded
RNTupleAtomicCounter & fSzReadOverhead
RNTupleAtomicCounter & fTimeWallUnzip
RNTupleAtomicCounter & fNClusterLoaded
Generic information about the physical location of data.