Storage provider that reads ntuple pages from a file.
Definition at line 117 of file RPageStorageFile.hxx.
Classes | |
struct | RCounters |
I/O performance counters that get registered in fMetrics. More... | |
Public Member Functions | |
RPageSourceFile (const RPageSourceFile &)=delete | |
RPageSourceFile (RPageSourceFile &&)=default | |
RPageSourceFile (std::string_view ntupleName, std::string_view path, const RNTupleReadOptions &options) | |
virtual | ~RPageSourceFile () |
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 data. | |
RNTupleMetrics & | GetMetrics () final |
Returns an empty metrics. Page storage implementations usually have their own metrics. | |
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 contain any pages. | |
RPageSourceFile & | operator= (const RPageSourceFile &)=delete |
RPageSourceFile & | operator= (RPageSourceFile &&)=default |
RPage | PopulatePage (ColumnHandle_t columnHandle, const RClusterIndex &clusterIndex) final |
Another version of PopulatePage that allows to specify cluster-relative indexes. | |
RPage | PopulatePage (ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final |
Allocates and fills a page that contains the index-th element. | |
void | ReleasePage (RPage &page) final |
Every page store needs to be able to free pages it handed out. | |
Public Member Functions inherited from ROOT::Experimental::Detail::RPageSource | |
RPageSource (const RPageSource &)=delete | |
RPageSource (RPageSource &&)=default | |
RPageSource (std::string_view ntupleName, const RNTupleReadOptions &fOptions) | |
virtual | ~RPageSource () |
ColumnHandle_t | AddColumn (DescriptorId_t fieldId, const RColumn &column) final |
Register a new column. | |
void | Attach () |
Open the physical storage container for the tree. | |
void | DropColumn (ColumnHandle_t columnHandle) final |
Unregisters a column. | |
ColumnId_t | GetColumnId (ColumnHandle_t columnHandle) |
const RNTupleDescriptor & | GetDescriptor () const |
NTupleSize_t | GetNElements (ColumnHandle_t columnHandle) |
NTupleSize_t | GetNEntries () |
EPageStorageType | GetType () final |
Whether the concrete implementation is a sink or a source. | |
RPageSource & | operator= (const RPageSource &)=delete |
RPageSource & | operator= (RPageSource &&)=default |
void | UnzipCluster (RCluster *cluster) |
Parallel decompression and unpacking of the pages in the given cluster. | |
Public Member Functions inherited from ROOT::Experimental::Detail::RPageStorage | |
RPageStorage (const RPageStorage &other)=delete | |
RPageStorage (RPageStorage &&other)=default | |
RPageStorage (std::string_view name) | |
virtual | ~RPageStorage () |
RPageStorage & | operator= (const RPageStorage &other)=delete |
RPageStorage & | operator= (RPageStorage &&other)=default |
void | SetTaskScheduler (RTaskScheduler *taskScheduler) |
Static Public Attributes | |
static constexpr std::size_t | kMaxPageSize = 1024 * 1024 |
Cannot process pages larger than 1MB. | |
Protected Member Functions | |
RNTupleDescriptor | AttachImpl () final |
void | UnzipClusterImpl (RCluster *cluster) final |
Private Member Functions | |
RPageSourceFile (std::string_view ntupleName, const RNTupleReadOptions &options) | |
RPage | PopulatePageFromCluster (ColumnHandle_t columnHandle, const RClusterDescriptor &clusterDescriptor, ClusterSize_t::ValueType idxInCluster) |
Private Attributes | |
std::unique_ptr< RClusterPool > | fClusterPool |
The cluster pool asynchronously preloads the next few clusters. | |
std::unique_ptr< RCounters > | fCounters |
RCluster * | fCurrentCluster = nullptr |
The last cluster from which a page got populated. Points into fClusterPool->fPool. | |
RNTupleDecompressor | fDecompressor |
Helper to unzip pages and header/footer; comprises a 16MB unzip buffer. | |
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 | fMetrics |
Wraps the I/O counters and is observed by the RNTupleReader metrics. | |
std::unique_ptr< RPageAllocatorFile > | fPageAllocator |
Populated pages might be shared; there memory buffer is managed by the RPageAllocatorFile. | |
std::shared_ptr< RPagePool > | fPagePool |
The page pool might, at some point, be used by multiple page sources. | |
Internal::RMiniFileReader | fReader |
Takes the fFile to read ntuple blobs from it. | |
Additional Inherited Members | |
Public Types inherited from ROOT::Experimental::Detail::RPageSource | |
using | ColumnSet_t = std::unordered_set< DescriptorId_t > |
Derived from the model (fields) that are actually being requested at a given point in time. | |
Public Types inherited from ROOT::Experimental::Detail::RPageStorage | |
using | ColumnHandle_t = RColumnHandle |
The column handle identifies a column with the current open page storage. | |
Static Public Member Functions inherited from ROOT::Experimental::Detail::RPageSource | |
static std::unique_ptr< RPageSource > | Create (std::string_view ntupleName, std::string_view location, const RNTupleReadOptions &options=RNTupleReadOptions()) |
Guess the concrete derived page source from the file name (location) | |
Protected Attributes inherited from ROOT::Experimental::Detail::RPageSource | |
ColumnSet_t | fActiveColumns |
The active columns are implicitly defined by the model fields or views. | |
RNTupleDescriptor | fDescriptor |
RNTupleReadOptions | fOptions |
Protected Attributes inherited from ROOT::Experimental::Detail::RPageStorage | |
std::string | fNTupleName |
RTaskScheduler * | fTaskScheduler = nullptr |
#include <ROOT/RPageStorageFile.hxx>
|
private |
Definition at line 207 of file RPageStorageFile.cxx.
ROOT::Experimental::Detail::RPageSourceFile::RPageSourceFile | ( | std::string_view | ntupleName, |
std::string_view | path, | ||
const RNTupleReadOptions & | options | ||
) |
Definition at line 304 of file RPageStorageFile.cxx.
|
delete |
|
default |
|
virtualdefault |
|
finalprotectedvirtual |
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 317 of file RPageStorageFile.cxx.
|
finalvirtual |
The cloned page source creates a new raw file and reader and opens its own file descriptor to the data.
The meta-data (header and footer) is reread and parsed by the clone.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 452 of file RPageStorageFile.cxx.
|
inlinefinalvirtual |
Returns an empty metrics. Page storage implementations usually have their own metrics.
Reimplemented from ROOT::Experimental::Detail::RPageStorage.
Definition at line 188 of file RPageStorageFile.hxx.
|
finalvirtual |
Populates all the pages of the given cluster id and columns; it is possible that some columns do not contain any pages.
The pages source may load more columns than the minimal necessary set from columns
. To indicate which columns have been loaded, LoadCluster() must mark them with SetColumnAvailable(). That includes the ones from the columns
that don't have pages; otherwise subsequent requests for the cluster would assume an incomplete cluster and trigger loading again. LoadCluster() is typically called from the I/O thread of a cluster pool, i.e. the method runs concurrently to other methods of the page source.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 461 of file RPageStorageFile.cxx.
|
delete |
|
default |
|
finalvirtual |
Another version of PopulatePage that allows to specify cluster-relative indexes.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 432 of file RPageStorageFile.cxx.
|
finalvirtual |
Allocates and fills a page that contains the index-th element.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 415 of file RPageStorageFile.cxx.
|
private |
Definition at line 338 of file RPageStorageFile.cxx.
Every page store needs to be able to free pages it handed out.
But Sinks and sources have different means of allocating pages.
Implements ROOT::Experimental::Detail::RPageStorage.
Definition at line 447 of file RPageStorageFile.cxx.
|
finalprotectedvirtual |
Reimplemented from ROOT::Experimental::Detail::RPageSource.
Definition at line 590 of file RPageStorageFile.cxx.
|
private |
The cluster pool asynchronously preloads the next few clusters.
Definition at line 160 of file RPageStorageFile.hxx.
|
private |
Definition at line 143 of file RPageStorageFile.hxx.
|
private |
The last cluster from which a page got populated. Points into fClusterPool->fPool.
Definition at line 152 of file RPageStorageFile.hxx.
|
private |
Helper to unzip pages and header/footer; comprises a 16MB unzip buffer.
Definition at line 154 of file RPageStorageFile.hxx.
|
private |
An RRawFile is used to request the necessary byte ranges from a local or a remote file.
Definition at line 156 of file RPageStorageFile.hxx.
|
private |
Wraps the I/O counters and is observed by the RNTupleReader metrics.
Definition at line 145 of file RPageStorageFile.hxx.
|
private |
Populated pages might be shared; there memory buffer is managed by the RPageAllocatorFile.
Definition at line 148 of file RPageStorageFile.hxx.
|
private |
The page pool might, at some point, be used by multiple page sources.
Definition at line 150 of file RPageStorageFile.hxx.
|
private |
Takes the fFile to read ntuple blobs from it.
Definition at line 158 of file RPageStorageFile.hxx.
|
staticconstexpr |
Cannot process pages larger than 1MB.
Definition at line 120 of file RPageStorageFile.hxx.