Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Detail::RPage Class Reference

A page is a slice of a column that is mapped into memory.

The page provides an opaque memory buffer for uncompressed, unpacked data. It does not interpret the contents but it does now about the size (and thus the number) of the elements inside as well as the element number range within the backing column/cluster. The memory buffer is not managed by the page. It is normally registered with the page pool and allocated/freed by the page storage.

Definition at line 42 of file RPage.hxx.

Classes

class  RClusterInfo
 Stores information about the cluster in which this page resides. More...
 

Public Member Functions

 RPage ()
 
 RPage (ColumnId_t columnId, void *buffer, ClusterSize_t::ValueType elementSize, ClusterSize_t::ValueType maxElements)
 
 ~RPage ()=default
 
void ChangeIds (DescriptorId_t columnId, DescriptorId_t clusterId)
 Used by virtual page sources to map the physical column and cluster IDs to ther virtual counterparts.
 
bool Contains (const RClusterIndex &clusterIndex) const
 
bool Contains (NTupleSize_t globalIndex) const
 
void * GetBuffer () const
 
const RClusterInfoGetClusterInfo () const
 
ClusterSize_t::ValueType GetClusterRangeFirst () const
 
ClusterSize_t::ValueType GetClusterRangeLast () const
 
ColumnId_t GetColumnId () const
 
std::uint32_t GetElementSize () const
 
NTupleSize_t GetGlobalRangeFirst () const
 
NTupleSize_t GetGlobalRangeLast () const
 
std::uint32_t GetMaxElements () const
 
std::uint32_t GetNBytes () const
 The space taken by column elements in the buffer.
 
std::uint32_t GetNElements () const
 
void * GrowUnchecked (ClusterSize_t::ValueType nElements)
 Called during writing: returns a pointer after the last element and increases the element counter in anticipation of the caller filling nElements in the page.
 
bool IsEmpty () const
 
bool IsNull () const
 
bool IsPageZero () const
 
bool operator!= (const RPage &other) const
 
bool operator== (const RPage &other) const
 
void Reset (NTupleSize_t rangeFirst)
 Forget all currently stored elements (size == 0) and set a new starting index.
 
void ResetCluster (const RClusterInfo &clusterInfo)
 
void SetWindow (const NTupleSize_t rangeFirst, const RClusterInfo &clusterInfo)
 Seek the page to a certain position of the column.
 

Static Public Member Functions

static const void * GetPageZeroBuffer ()
 Return a pointer to the page zero buffer used if there is no on-disk data for a particular deferred column.
 
static RPage MakePageZero (ColumnId_t columnId, ClusterSize_t::ValueType elementSize)
 Make a 'zero' page for column columnId (that is comprised of 0x00 bytes only).
 

Static Public Attributes

static constexpr size_t kPageZeroSize = 64 * 1024
 

Private Attributes

void * fBuffer
 
RClusterInfo fClusterInfo
 
ColumnId_t fColumnId
 
std::uint32_t fElementSize
 
std::uint32_t fMaxElements
 The capacity of the page in number of elements.
 
std::uint32_t fNElements
 
NTupleSize_t fRangeFirst
 

#include <ROOT/RPage.hxx>

Constructor & Destructor Documentation

◆ RPage() [1/2]

ROOT::Experimental::Detail::RPage::RPage ( )
inline

Definition at line 73 of file RPage.hxx.

◆ RPage() [2/2]

ROOT::Experimental::Detail::RPage::RPage ( ColumnId_t  columnId,
void *  buffer,
ClusterSize_t::ValueType  elementSize,
ClusterSize_t::ValueType  maxElements 
)
inline

Definition at line 76 of file RPage.hxx.

◆ ~RPage()

ROOT::Experimental::Detail::RPage::~RPage ( )
default

Member Function Documentation

◆ ChangeIds()

void ROOT::Experimental::Detail::RPage::ChangeIds ( DescriptorId_t  columnId,
DescriptorId_t  clusterId 
)
inline

Used by virtual page sources to map the physical column and cluster IDs to ther virtual counterparts.

Definition at line 127 of file RPage.hxx.

◆ Contains() [1/2]

bool ROOT::Experimental::Detail::RPage::Contains ( const RClusterIndex clusterIndex) const
inline

Definition at line 100 of file RPage.hxx.

◆ Contains() [2/2]

bool ROOT::Experimental::Detail::RPage::Contains ( NTupleSize_t  globalIndex) const
inline

Definition at line 96 of file RPage.hxx.

◆ GetBuffer()

void * ROOT::Experimental::Detail::RPage::GetBuffer ( ) const
inline

Definition at line 108 of file RPage.hxx.

◆ GetClusterInfo()

const RClusterInfo & ROOT::Experimental::Detail::RPage::GetClusterInfo ( ) const
inline

Definition at line 94 of file RPage.hxx.

◆ GetClusterRangeFirst()

ClusterSize_t::ValueType ROOT::Experimental::Detail::RPage::GetClusterRangeFirst ( ) const
inline

Definition at line 90 of file RPage.hxx.

◆ GetClusterRangeLast()

ClusterSize_t::ValueType ROOT::Experimental::Detail::RPage::GetClusterRangeLast ( ) const
inline

Definition at line 91 of file RPage.hxx.

◆ GetColumnId()

ColumnId_t ROOT::Experimental::Detail::RPage::GetColumnId ( ) const
inline

Definition at line 82 of file RPage.hxx.

◆ GetElementSize()

std::uint32_t ROOT::Experimental::Detail::RPage::GetElementSize ( ) const
inline

Definition at line 85 of file RPage.hxx.

◆ GetGlobalRangeFirst()

NTupleSize_t ROOT::Experimental::Detail::RPage::GetGlobalRangeFirst ( ) const
inline

Definition at line 88 of file RPage.hxx.

◆ GetGlobalRangeLast()

NTupleSize_t ROOT::Experimental::Detail::RPage::GetGlobalRangeLast ( ) const
inline

Definition at line 89 of file RPage.hxx.

◆ GetMaxElements()

std::uint32_t ROOT::Experimental::Detail::RPage::GetMaxElements ( ) const
inline

Definition at line 87 of file RPage.hxx.

◆ GetNBytes()

std::uint32_t ROOT::Experimental::Detail::RPage::GetNBytes ( ) const
inline

The space taken by column elements in the buffer.

Definition at line 84 of file RPage.hxx.

◆ GetNElements()

std::uint32_t ROOT::Experimental::Detail::RPage::GetNElements ( ) const
inline

Definition at line 86 of file RPage.hxx.

◆ GetPageZeroBuffer()

const void * ROOT::Experimental::Detail::RPage::GetPageZeroBuffer ( )
static

Return a pointer to the page zero buffer used if there is no on-disk data for a particular deferred column.

Definition at line 23 of file RPage.cxx.

◆ GrowUnchecked()

void * ROOT::Experimental::Detail::RPage::GrowUnchecked ( ClusterSize_t::ValueType  nElements)
inline

Called during writing: returns a pointer after the last element and increases the element counter in anticipation of the caller filling nElements in the page.

It is the responsibility of the caller to prevent page overflows, i.e. that fNElements + nElements <= fMaxElements

Definition at line 112 of file RPage.hxx.

◆ IsEmpty()

bool ROOT::Experimental::Detail::RPage::IsEmpty ( ) const
inline

Definition at line 145 of file RPage.hxx.

◆ IsNull()

bool ROOT::Experimental::Detail::RPage::IsNull ( ) const
inline

Definition at line 143 of file RPage.hxx.

◆ IsPageZero()

bool ROOT::Experimental::Detail::RPage::IsPageZero ( ) const
inline

Definition at line 144 of file RPage.hxx.

◆ MakePageZero()

static RPage ROOT::Experimental::Detail::RPage::MakePageZero ( ColumnId_t  columnId,
ClusterSize_t::ValueType  elementSize 
)
inlinestatic

Make a 'zero' page for column columnId (that is comprised of 0x00 bytes only).

The caller is responsible for invoking GrowUnchecked() and SetWindow() as appropriate.

Definition at line 135 of file RPage.hxx.

◆ operator!=()

bool ROOT::Experimental::Detail::RPage::operator!= ( const RPage other) const
inline

Definition at line 147 of file RPage.hxx.

◆ operator==()

bool ROOT::Experimental::Detail::RPage::operator== ( const RPage other) const
inline

Definition at line 146 of file RPage.hxx.

◆ Reset()

void ROOT::Experimental::Detail::RPage::Reset ( NTupleSize_t  rangeFirst)
inline

Forget all currently stored elements (size == 0) and set a new starting index.

Definition at line 123 of file RPage.hxx.

◆ ResetCluster()

void ROOT::Experimental::Detail::RPage::ResetCluster ( const RClusterInfo clusterInfo)
inline

Definition at line 124 of file RPage.hxx.

◆ SetWindow()

void ROOT::Experimental::Detail::RPage::SetWindow ( const NTupleSize_t  rangeFirst,
const RClusterInfo clusterInfo 
)
inline

Seek the page to a certain position of the column.

Definition at line 118 of file RPage.hxx.

Member Data Documentation

◆ fBuffer

void* ROOT::Experimental::Detail::RPage::fBuffer
private

Definition at line 64 of file RPage.hxx.

◆ fClusterInfo

RClusterInfo ROOT::Experimental::Detail::RPage::fClusterInfo
private

Definition at line 70 of file RPage.hxx.

◆ fColumnId

ColumnId_t ROOT::Experimental::Detail::RPage::fColumnId
private

Definition at line 63 of file RPage.hxx.

◆ fElementSize

std::uint32_t ROOT::Experimental::Detail::RPage::fElementSize
private

Definition at line 65 of file RPage.hxx.

◆ fMaxElements

std::uint32_t ROOT::Experimental::Detail::RPage::fMaxElements
private

The capacity of the page in number of elements.

Definition at line 68 of file RPage.hxx.

◆ fNElements

std::uint32_t ROOT::Experimental::Detail::RPage::fNElements
private

Definition at line 66 of file RPage.hxx.

◆ fRangeFirst

NTupleSize_t ROOT::Experimental::Detail::RPage::fRangeFirst
private

Definition at line 69 of file RPage.hxx.

◆ kPageZeroSize

constexpr size_t ROOT::Experimental::Detail::RPage::kPageZeroSize = 64 * 1024
staticconstexpr

Definition at line 44 of file RPage.hxx.

Libraries for ROOT::Experimental::Detail::RPage:

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