Virtual storage that combines several other sources horizontally.
Definition at line 39 of file RPageSourceFriends.hxx.
Classes | |
struct | RIdBiMap |
A bi-directional map of descriptor IDs that translates from physical to virtual column, field, and cluster IDs and vice versa. More... | |
struct | ROriginId |
Public Member Functions | |
RPageSourceFriends (std::string_view ntupleName, std::span< std::unique_ptr< RPageSource > > sources) | |
~RPageSourceFriends () final | |
ColumnHandle_t | AddColumn (DescriptorId_t fieldId, const RColumn &column) final |
Register a new column. More... | |
std::unique_ptr< RPageSource > | Clone () const final |
Open the same storage multiple time, e.g. for reading in multiple threads. More... | |
void | DropColumn (ColumnHandle_t columnHandle) final |
Unregisters a column. More... | |
RNTupleMetrics & | GetMetrics () final |
Page storage implementations have their own metrics. More... | |
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 contain any pages. More... | |
void | LoadSealedPage (DescriptorId_t physicalColumnId, const RClusterIndex &clusterIndex, RSealedPage &sealedPage) final |
Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage. More... | |
RPage | PopulatePage (ColumnHandle_t columnHandle, const RClusterIndex &clusterIndex) final |
Another version of PopulatePage that allows to specify cluster-relative indexes. More... | |
RPage | PopulatePage (ColumnHandle_t columnHandle, NTupleSize_t globalIndex) final |
Allocates and fills a page that contains the index-th element. More... | |
void | ReleasePage (RPage &page) final |
Every page store needs to be able to free pages it handed out. More... | |
![]() | |
RPageSource (const RPageSource &)=delete | |
RPageSource (RPageSource &&)=delete | |
RPageSource (std::string_view ntupleName, const RNTupleReadOptions &fOptions) | |
~RPageSource () override | |
ColumnHandle_t | AddColumn (DescriptorId_t fieldId, const RColumn &column) override |
Register a new column. More... | |
void | Attach () |
Open the physical storage container for the tree. More... | |
virtual std::unique_ptr< RPageSource > | Clone () const =0 |
Open the same storage multiple time, e.g. for reading in multiple threads. More... | |
void | DropColumn (ColumnHandle_t columnHandle) override |
Unregisters a column. More... | |
ColumnId_t | GetColumnId (ColumnHandle_t columnHandle) |
RNTupleMetrics & | GetMetrics () override |
Returns the default metrics object. Subclasses might alternatively override the method and provide their own metrics object. More... | |
NTupleSize_t | GetNElements (ColumnHandle_t columnHandle) |
NTupleSize_t | GetNEntries () |
const RNTupleReadOptions & | GetReadOptions () const |
const RSharedDescriptorGuard | GetSharedDescriptorGuard () const |
Takes the read lock for the descriptor. More... | |
EPageStorageType | GetType () final |
Whether the concrete implementation is a sink or a source. More... | |
virtual std::vector< std::unique_ptr< RCluster > > | LoadClusters (std::span< RCluster::RKey > clusterKeys)=0 |
Populates all the pages of the given cluster ids and columns; it is possible that some columns do not contain any pages. More... | |
virtual void | LoadSealedPage (DescriptorId_t physicalColumnId, const RClusterIndex &clusterIndex, RSealedPage &sealedPage)=0 |
Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage. More... | |
RPageSource & | operator= (const RPageSource &)=delete |
RPageSource & | operator= (RPageSource &&)=delete |
virtual RPage | PopulatePage (ColumnHandle_t columnHandle, const RClusterIndex &clusterIndex)=0 |
Another version of PopulatePage that allows to specify cluster-relative indexes. More... | |
virtual RPage | PopulatePage (ColumnHandle_t columnHandle, NTupleSize_t globalIndex)=0 |
Allocates and fills a page that contains the index-th element. More... | |
void | UnzipCluster (RCluster *cluster) |
Parallel decompression and unpacking of the pages in the given cluster. More... | |
![]() | |
RPageStorage (const RPageStorage &other)=delete | |
RPageStorage (RPageStorage &&other)=default | |
RPageStorage (std::string_view name) | |
virtual | ~RPageStorage () |
virtual ColumnHandle_t | AddColumn (DescriptorId_t fieldId, const RColumn &column)=0 |
Register a new column. More... | |
virtual void | DropColumn (ColumnHandle_t columnHandle)=0 |
Unregisters a column. More... | |
virtual RNTupleMetrics & | GetMetrics ()=0 |
Page storage implementations have their own metrics. More... | |
const std::string & | GetNTupleName () const |
Returns the NTuple name. More... | |
virtual EPageStorageType | GetType ()=0 |
Whether the concrete implementation is a sink or a source. More... | |
RPageStorage & | operator= (const RPageStorage &other)=delete |
RPageStorage & | operator= (RPageStorage &&other)=default |
virtual void | ReleasePage (RPage &page)=0 |
Every page store needs to be able to free pages it handed out. More... | |
void | SetTaskScheduler (RTaskScheduler *taskScheduler) |
Protected Member Functions | |
RNTupleDescriptor | AttachImpl () final |
![]() | |
virtual RNTupleDescriptor | AttachImpl ()=0 |
void | EnableDefaultMetrics (const std::string &prefix) |
Enables the default set of metrics provided by RPageSource. More... | |
RExclDescriptorGuard | GetExclDescriptorGuard () |
Note that the underlying lock is not recursive. See GetSharedDescriptorGuard() for further information. More... | |
std::unique_ptr< unsigned char[]> | UnsealPage (const RSealedPage &sealedPage, const RColumnElementBase &element) |
Helper for unstreaming a page. More... | |
virtual void | UnzipClusterImpl (RCluster *) |
Private Member Functions | |
void | AddVirtualField (const RNTupleDescriptor &originDesc, std::size_t originIdx, const RFieldDescriptor &originField, DescriptorId_t virtualParent, const std::string &virtualName) |
Private Attributes | |
RNTupleDescriptorBuilder | fBuilder |
RIdBiMap | fIdBiMap |
RNTupleMetrics | fMetrics |
DescriptorId_t | fNextId = 1 |
0 is reserved for the friend zero field More... | |
std::vector< std::unique_ptr< RPageSource > > | fSources |
Additional Inherited Members | |
![]() | |
using | ColumnHandle_t = RColumnHandle |
The column handle identifies a column with the current open page storage. More... | |
using | SealedPageSequence_t = std::deque< RSealedPage > |
![]() | |
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) More... | |
![]() | |
RActivePhysicalColumns | fActivePhysicalColumns |
The active columns are implicitly defined by the model fields or views. More... | |
std::unique_ptr< RCounters > | fCounters |
std::unique_ptr< RNTupleDecompressor > | fDecompressor |
Helper to unzip pages and header/footer; comprises a 16MB (kMAXZIPBUF) unzip buffer. More... | |
RNTupleMetrics | fMetrics |
Wraps the I/O counters and is observed by the RNTupleReader metrics. More... | |
RNTupleReadOptions | fOptions |
![]() | |
std::string | fNTupleName |
RTaskScheduler * | fTaskScheduler = nullptr |
#include <ROOT/RPageSourceFriends.hxx>
ROOT::Experimental::Detail::RPageSourceFriends::RPageSourceFriends | ( | std::string_view | ntupleName, |
std::span< std::unique_ptr< RPageSource > > | sources | ||
) |
Definition at line 24 of file RPageSourceFriends.cxx.
|
finaldefault |
|
finalvirtual |
Register a new column.
When reading, the column must exist in the ntuple on disk corresponding to the meta-data. When writing, every column can only be attached once.
Implements ROOT::Experimental::Detail::RPageStorage.
Definition at line 129 of file RPageSourceFriends.cxx.
|
private |
Definition at line 37 of file RPageSourceFriends.cxx.
|
finalprotectedvirtual |
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 64 of file RPageSourceFriends.cxx.
|
finalvirtual |
Open the same storage multiple time, e.g. for reading in multiple threads.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 119 of file RPageSourceFriends.cxx.
|
finalvirtual |
Unregisters a column.
A page source decreases the reference counter for the corresponding active column. For a page sink, dropping columns is currently a no-op.
Implements ROOT::Experimental::Detail::RPageStorage.
Definition at line 136 of file RPageSourceFriends.cxx.
|
inlinefinalvirtual |
Page storage implementations have their own metrics.
The RPageSink and RPageSource classes provide a default set of metrics.
Implements ROOT::Experimental::Detail::RPageStorage.
Definition at line 107 of file RPageSourceFriends.hxx.
|
finalvirtual |
Populates all the pages of the given cluster ids and columns; it is possible that some columns do not contain any pages.
The page source may load more columns than the minimal necessary set from columns
. To indicate which columns have been loaded, LoadClusters() 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. LoadClusters() 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 202 of file RPageSourceFriends.cxx.
|
finalvirtual |
Read the packed and compressed bytes of a page into the memory buffer provided by selaedPage.
The sealed page can be used subsequently in a call to RPageSink::CommitSealedPage. The fSize and fNElements member of the sealedPage parameters are always set. If sealedPage.fBuffer is nullptr, no data will be copied but the returned size information can be used by the caller to allocate a large enough buffer and call LoadSealedPage again.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 179 of file RPageSourceFriends.cxx.
|
finalvirtual |
Another version of PopulatePage that allows to specify cluster-relative indexes.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 163 of file RPageSourceFriends.cxx.
|
finalvirtual |
Allocates and fills a page that contains the index-th element.
Implements ROOT::Experimental::Detail::RPageSource.
Definition at line 146 of file RPageSourceFriends.cxx.
|
finalvirtual |
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 192 of file RPageSourceFriends.cxx.
|
private |
Definition at line 80 of file RPageSourceFriends.hxx.
|
private |
Definition at line 78 of file RPageSourceFriends.hxx.
|
private |
Definition at line 76 of file RPageSourceFriends.hxx.
|
private |
0 is reserved for the friend zero field
Definition at line 81 of file RPageSourceFriends.hxx.
|
private |
Definition at line 77 of file RPageSourceFriends.hxx.