Logo ROOT  
Reference Guide
ROOT::Experimental::Detail::RPageSource Class Referenceabstract

Abstract interface to read data from an ntuple.

The page source is initialized with the columns of interest. Pages from those columns can then be mapped into memory. The page source also gives access to the ntuple's meta-data.

Definition at line 159 of file RPageStorage.hxx.

Public Member Functions

 RPageSource (std::string_view ntupleName, const RNTupleReadOptions &fOptions)
 
virtual ~RPageSource ()
 
ColumnHandle_t AddColumn (DescriptorId_t fieldId, const RColumn &column) final
 Register a new column. More...
 
void Attach ()
 Open the physical storage container for the tree. More...
 
virtual std::unique_ptr< RPageSourceClone () const =0
 Open the same storage multiple time, e.g. for reading in multiple threads. More...
 
ColumnId_t GetColumnId (ColumnHandle_t columnHandle)
 
const RNTupleDescriptorGetDescriptor () const
 
NTupleSize_t GetNElements (ColumnHandle_t columnHandle)
 
NTupleSize_t GetNEntries ()
 
EPageStorageType GetType () final
 Whether the concrete implementation is a sink or a source. More...
 
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...
 
- Public Member Functions inherited from ROOT::Experimental::Detail::RPageStorage
 RPageStorage (const RPageStorage &other)=delete
 
 RPageStorage (std::string_view name)
 
virtual ~RPageStorage ()
 
virtual ColumnHandle_t AddColumn (DescriptorId_t fieldId, const RColumn &column)=0
 Register a new column. More...
 
virtual RNTupleMetricsGetMetrics ()=0
 Page storage implementations usually have their own metrics. More...
 
virtual EPageStorageType GetType ()=0
 Whether the concrete implementation is a sink or a source. More...
 
RPageStorageoperator= (const RPageStorage &other)=delete
 
virtual void ReleasePage (RPage &page)=0
 Every page store needs to be able to free pages it handed out. More...
 

Static Public Member Functions

static std::unique_ptr< RPageSourceCreate (std::string_view ntupleName, std::string_view location, const RNTupleReadOptions &options=RNTupleReadOptions())
 Guess the concrete derived page source from the file name (location) More...
 

Protected Member Functions

virtual RNTupleDescriptor AttachImpl ()=0
 

Protected Attributes

RNTupleDescriptor fDescriptor
 
const RNTupleReadOptions fOptions
 
- Protected Attributes inherited from ROOT::Experimental::Detail::RPageStorage
std::string fNTupleName
 

Additional Inherited Members

- Public Types inherited from ROOT::Experimental::Detail::RPageStorage
using ColumnHandle_t = RColumnHandle
 The column handle identifies a column with the current open page storage. More...
 

#include <ROOT/RPageStorage.hxx>

Inheritance diagram for ROOT::Experimental::Detail::RPageSource:
[legend]

Constructor & Destructor Documentation

◆ RPageSource()

ROOT::Experimental::Detail::RPageSource::RPageSource ( std::string_view  ntupleName,
const RNTupleReadOptions fOptions 
)

Definition at line 44 of file RPageStorage.cxx.

◆ ~RPageSource()

ROOT::Experimental::Detail::RPageSource::~RPageSource ( )
virtual

Definition at line 49 of file RPageStorage.cxx.

Member Function Documentation

◆ AddColumn()

ROOT::Experimental::Detail::RPageStorage::ColumnHandle_t ROOT::Experimental::Detail::RPageSource::AddColumn ( DescriptorId_t  fieldId,
const RColumn column 
)
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 60 of file RPageStorage.cxx.

◆ Attach()

void ROOT::Experimental::Detail::RPageSource::Attach ( )
inline

Open the physical storage container for the tree.

Definition at line 180 of file RPageStorage.hxx.

◆ AttachImpl()

virtual RNTupleDescriptor ROOT::Experimental::Detail::RPageSource::AttachImpl ( )
protectedpure virtual

◆ Clone()

virtual std::unique_ptr< RPageSource > ROOT::Experimental::Detail::RPageSource::Clone ( ) const
pure virtual

Open the same storage multiple time, e.g. for reading in multiple threads.

Implemented in ROOT::Experimental::Detail::RPageSourceFile.

◆ Create()

std::unique_ptr< ROOT::Experimental::Detail::RPageSource > ROOT::Experimental::Detail::RPageSource::Create ( std::string_view  ntupleName,
std::string_view  location,
const RNTupleReadOptions options = RNTupleReadOptions() 
)
static

Guess the concrete derived page source from the file name (location)

Definition at line 53 of file RPageStorage.cxx.

◆ GetColumnId()

ROOT::Experimental::ColumnId_t ROOT::Experimental::Detail::RPageSource::GetColumnId ( ColumnHandle_t  columnHandle)

Definition at line 78 of file RPageStorage.cxx.

◆ GetDescriptor()

const RNTupleDescriptor & ROOT::Experimental::Detail::RPageSource::GetDescriptor ( ) const
inline

Definition at line 176 of file RPageStorage.hxx.

◆ GetNElements()

ROOT::Experimental::NTupleSize_t ROOT::Experimental::Detail::RPageSource::GetNElements ( ColumnHandle_t  columnHandle)

Definition at line 73 of file RPageStorage.cxx.

◆ GetNEntries()

ROOT::Experimental::NTupleSize_t ROOT::Experimental::Detail::RPageSource::GetNEntries ( )

Definition at line 68 of file RPageStorage.cxx.

◆ GetType()

EPageStorageType ROOT::Experimental::Detail::RPageSource::GetType ( )
inlinefinalvirtual

Whether the concrete implementation is a sink or a source.

Implements ROOT::Experimental::Detail::RPageStorage.

Definition at line 175 of file RPageStorage.hxx.

◆ PopulatePage() [1/2]

virtual RPage ROOT::Experimental::Detail::RPageSource::PopulatePage ( ColumnHandle_t  columnHandle,
const RClusterIndex clusterIndex 
)
pure virtual

Another version of PopulatePage that allows to specify cluster-relative indexes.

Implemented in ROOT::Experimental::Detail::RPageSourceFile.

◆ PopulatePage() [2/2]

virtual RPage ROOT::Experimental::Detail::RPageSource::PopulatePage ( ColumnHandle_t  columnHandle,
NTupleSize_t  globalIndex 
)
pure virtual

Allocates and fills a page that contains the index-th element.

Implemented in ROOT::Experimental::Detail::RPageSourceFile.

Member Data Documentation

◆ fDescriptor

RNTupleDescriptor ROOT::Experimental::Detail::RPageSource::fDescriptor
protected

Definition at line 162 of file RPageStorage.hxx.

◆ fOptions

const RNTupleReadOptions ROOT::Experimental::Detail::RPageSource::fOptions
protected

Definition at line 161 of file RPageStorage.hxx.

Libraries for ROOT::Experimental::Detail::RPageSource:
[legend]

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