Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::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 41 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 (NTupleSize_t globalIndex) const
 
bool Contains (RClusterIndex clusterIndex) const
 
void * GetBuffer () const
 
const RClusterInfoGetClusterInfo () const
 
ClusterSize_t::ValueType GetClusterRangeFirst () const
 
ClusterSize_t::ValueType GetClusterRangeLast () const
 
ColumnId_t GetColumnId () 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::Internal::RPage::RPage ( )
inline

Definition at line 72 of file RPage.hxx.

◆ RPage() [2/2]

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

Definition at line 75 of file RPage.hxx.

◆ ~RPage()

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

Member Function Documentation

◆ ChangeIds()

void ROOT::Experimental::Internal::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 126 of file RPage.hxx.

◆ Contains() [1/2]

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

Definition at line 94 of file RPage.hxx.

◆ Contains() [2/2]

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

Definition at line 98 of file RPage.hxx.

◆ GetBuffer()

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

Definition at line 107 of file RPage.hxx.

◆ GetClusterInfo()

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

Definition at line 92 of file RPage.hxx.

◆ GetClusterRangeFirst()

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

Definition at line 88 of file RPage.hxx.

◆ GetClusterRangeLast()

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

Definition at line 89 of file RPage.hxx.

◆ GetColumnId()

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

Definition at line 81 of file RPage.hxx.

◆ GetGlobalRangeFirst()

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

Definition at line 86 of file RPage.hxx.

◆ GetGlobalRangeLast()

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

Definition at line 87 of file RPage.hxx.

◆ GetMaxElements()

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

Definition at line 85 of file RPage.hxx.

◆ GetNBytes()

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

The space taken by column elements in the buffer.

Definition at line 83 of file RPage.hxx.

◆ GetNElements()

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

Definition at line 84 of file RPage.hxx.

◆ GetPageZeroBuffer()

const void * ROOT::Experimental::Internal::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 18 of file RPage.cxx.

◆ GrowUnchecked()

void * ROOT::Experimental::Internal::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 111 of file RPage.hxx.

◆ IsEmpty()

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

Definition at line 144 of file RPage.hxx.

◆ IsNull()

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

Definition at line 142 of file RPage.hxx.

◆ IsPageZero()

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

Definition at line 143 of file RPage.hxx.

◆ MakePageZero()

static RPage ROOT::Experimental::Internal::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 134 of file RPage.hxx.

◆ operator!=()

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

Definition at line 146 of file RPage.hxx.

◆ operator==()

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

Definition at line 145 of file RPage.hxx.

◆ Reset()

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

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

Definition at line 122 of file RPage.hxx.

◆ ResetCluster()

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

Definition at line 123 of file RPage.hxx.

◆ SetWindow()

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

Seek the page to a certain position of the column.

Definition at line 117 of file RPage.hxx.

Member Data Documentation

◆ fBuffer

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

Definition at line 63 of file RPage.hxx.

◆ fClusterInfo

RClusterInfo ROOT::Experimental::Internal::RPage::fClusterInfo
private

Definition at line 69 of file RPage.hxx.

◆ fColumnId

ColumnId_t ROOT::Experimental::Internal::RPage::fColumnId
private

Definition at line 62 of file RPage.hxx.

◆ fElementSize

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

Definition at line 64 of file RPage.hxx.

◆ fMaxElements

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

The capacity of the page in number of elements.

Definition at line 67 of file RPage.hxx.

◆ fNElements

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

Definition at line 65 of file RPage.hxx.

◆ fRangeFirst

NTupleSize_t ROOT::Experimental::Internal::RPage::fRangeFirst
private

Definition at line 68 of file RPage.hxx.

◆ kPageZeroSize

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

Definition at line 43 of file RPage.hxx.

Libraries for ROOT::Experimental::Internal::RPage:

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