Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RPageStorage Class Referenceabstract

Common functionality of an ntuple storage for both reading and writing.

The RPageStore provides access to a storage container that keeps the bits of pages and clusters comprising an ntuple. Concrete implementations can use a TFile, a raw file, an object store, and so on.

Definition at line 70 of file RPageStorage.hxx.

Classes

struct  RColumnHandle
struct  RSealedPage
 A sealed page contains the bytes of a page as written to storage (packed & compressed). More...
struct  RSealedPageGroup
 A range of sealed pages referring to the same column that can be used for vector commit. More...
class  RTaskScheduler
 The interface of a task scheduler to schedule page (de)compression tasks. More...

Public Types

using ColumnHandle_t = RColumnHandle
 The column handle identifies a column with the current open page storage.
using SealedPageSequence_t = std::deque<RSealedPage>

Public Member Functions

 RPageStorage (const RPageStorage &other)=delete
 RPageStorage (RPageStorage &&other)=default
 RPageStorage (std::string_view name)
virtual ~RPageStorage ()
virtual ColumnHandle_t AddColumn (ROOT::DescriptorId_t fieldId, ROOT::Internal::RColumn &column)=0
 Register a new column.
virtual void DropColumn (ColumnHandle_t columnHandle)=0
 Unregisters a column.
ROOT::DescriptorId_t GetColumnId (ColumnHandle_t columnHandle) const
virtual ROOT::Experimental::Detail::RNTupleMetricsGetMetrics ()
 Returns the default metrics object.
const std::string & GetNTupleName () const
 Returns the NTuple name.
virtual EPageStorageType GetType ()=0
 Whether the concrete implementation is a sink or a source.
RPageStorageoperator= (const RPageStorage &other)=delete
RPageStorageoperator= (RPageStorage &&other)=default
void SetTaskScheduler (RTaskScheduler *taskScheduler)

Static Public Attributes

static constexpr std::size_t kNBytesPageChecksum = sizeof(std::uint64_t)
 The page checksum is a 64bit xxhash3.

Protected Member Functions

void WaitForAllTasks ()

Protected Attributes

ROOT::Experimental::Detail::RNTupleMetrics fMetrics
std::string fNTupleName
std::unique_ptr< ROOT::Internal::RPageAllocatorfPageAllocator
 For the time being, we will use the heap allocator for all sources and sinks. This may change in the future.
RTaskSchedulerfTaskScheduler = nullptr

#include <ROOT/RPageStorage.hxx>

Inheritance diagram for RPageStorage:
ROOT::Internal::RPageSink ROOT::Internal::RPageSource ROOT::Experimental::Internal::RPageNullSink ROOT::Internal::RPagePersistentSink ROOT::Internal::RPageSinkBuf ROOT::Experimental::Internal::RPageSourceDaos ROOT::Internal::RPageSourceFile ROOT::Experimental::Internal::RPageSinkDaos ROOT::Internal::RPageSinkFile

Member Typedef Documentation

◆ ColumnHandle_t

The column handle identifies a column with the current open page storage.

Definition at line 180 of file RPageStorage.hxx.

◆ SealedPageSequence_t

Constructor & Destructor Documentation

◆ RPageStorage() [1/3]

ROOT::Internal::RPageStorage::RPageStorage ( std::string_view name)
explicit

Definition at line 66 of file RPageStorage.cxx.

◆ RPageStorage() [2/3]

◆ RPageStorage() [3/3]

◆ ~RPageStorage()

Definition at line 71 of file RPageStorage.cxx.

Member Function Documentation

◆ AddColumn()

Register a new column.

When reading, the column must exist in the ntuple on disk corresponding to the metadata. When writing, every column can only be attached once.

◆ DropColumn()

virtual void ROOT::Internal::RPageStorage::DropColumn ( ColumnHandle_t columnHandle)
pure virtual

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.

◆ GetColumnId()

Definition at line 188 of file RPageStorage.hxx.

◆ GetMetrics()

Returns the default metrics object.

Subclasses might alternatively provide their own metrics object by overriding this.

Definition at line 192 of file RPageStorage.hxx.

◆ GetNTupleName()

const std::string & ROOT::Internal::RPageStorage::GetNTupleName ( ) const
inline

Returns the NTuple name.

Definition at line 195 of file RPageStorage.hxx.

◆ GetType()

virtual EPageStorageType ROOT::Internal::RPageStorage::GetType ( )
pure virtual

Whether the concrete implementation is a sink or a source.

◆ operator=() [1/2]

RPageStorage & ROOT::Internal::RPageStorage::operator= ( const RPageStorage & other)
delete

◆ operator=() [2/2]

RPageStorage & ROOT::Internal::RPageStorage::operator= ( RPageStorage && other)
default

◆ SetTaskScheduler()

Definition at line 197 of file RPageStorage.hxx.

◆ WaitForAllTasks()

Definition at line 153 of file RPageStorage.hxx.

Member Data Documentation

◆ fMetrics

◆ fNTupleName

Definition at line 151 of file RPageStorage.hxx.

◆ fPageAllocator

For the time being, we will use the heap allocator for all sources and sinks. This may change in the future.

Definition at line 149 of file RPageStorage.hxx.

◆ fTaskScheduler

Definition at line 152 of file RPageStorage.hxx.

◆ kNBytesPageChecksum

std::size_t ROOT::Internal::RPageStorage::kNBytesPageChecksum = sizeof(std::uint64_t)
staticconstexpr

The page checksum is a 64bit xxhash3.

Definition at line 73 of file RPageStorage.hxx.


The documentation for this class was generated from the following files: