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. For reading, pages are allocated and filled by the page source and then registered with the page pool. For writing, the page sink allocates uninitialized pages of a given size. The page has a pointer to its memory allocator so that it can release itself.

Definition at line 46 of file RPage.hxx.

Classes

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

Public Member Functions

 RPage ()=default
 
 RPage (ColumnId_t columnId, void *buffer, RPageAllocator *pageAllocator, ClusterSize_t::ValueType elementSize, ClusterSize_t::ValueType maxElements)
 
 RPage (const RPage &)=delete
 
 RPage (RPage &&other)
 
 ~RPage ()
 
bool Contains (NTupleSize_t globalIndex) const
 
bool Contains (RClusterIndex clusterIndex) const
 
void * GetBuffer () const
 
std::size_t GetCapacity () 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::size_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 IsValid () const
 
bool operator!= (const RPage &other) const
 
RPageoperator= (const RPage &)=delete
 
RPageoperator= (RPage &&other)
 
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 = nullptr
 
RClusterInfo fClusterInfo
 
ColumnId_t fColumnId = kInvalidColumnId
 
std::uint32_t fElementSize = 0
 
std::uint32_t fMaxElements = 0
 The capacity of the page in number of elements.
 
std::uint32_t fNElements = 0
 
RPageAllocatorfPageAllocator = nullptr
 The allocator used to allocate fBuffer. Can be null if the buffer doesn't need to be freed.
 
NTupleSize_t fRangeFirst = 0
 

Friends

class RPageRef
 

#include <ROOT/RPage.hxx>

Constructor & Destructor Documentation

◆ RPage() [1/4]

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

◆ RPage() [2/4]

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

Definition at line 82 of file RPage.hxx.

◆ RPage() [3/4]

ROOT::Experimental::Internal::RPage::RPage ( const RPage & )
delete

◆ RPage() [4/4]

ROOT::Experimental::Internal::RPage::RPage ( RPage && other)
inline

Definition at line 92 of file RPage.hxx.

◆ ~RPage()

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

Definition at line 19 of file RPage.cxx.

Member Function Documentation

◆ Contains() [1/2]

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

Definition at line 141 of file RPage.hxx.

◆ Contains() [2/2]

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

Definition at line 145 of file RPage.hxx.

◆ GetBuffer()

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

Definition at line 154 of file RPage.hxx.

◆ GetCapacity()

std::size_t ROOT::Experimental::Internal::RPage::GetCapacity ( ) const
inline

Definition at line 126 of file RPage.hxx.

◆ GetClusterInfo()

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

Definition at line 139 of file RPage.hxx.

◆ GetClusterRangeFirst()

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

Definition at line 135 of file RPage.hxx.

◆ GetClusterRangeLast()

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

Definition at line 136 of file RPage.hxx.

◆ GetColumnId()

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

Definition at line 120 of file RPage.hxx.

◆ GetElementSize()

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

Definition at line 130 of file RPage.hxx.

◆ GetGlobalRangeFirst()

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

Definition at line 133 of file RPage.hxx.

◆ GetGlobalRangeLast()

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

Definition at line 134 of file RPage.hxx.

◆ GetMaxElements()

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

Definition at line 132 of file RPage.hxx.

◆ GetNBytes()

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

The space taken by column elements in the buffer.

Definition at line 122 of file RPage.hxx.

◆ GetNElements()

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

Definition at line 131 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 25 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 158 of file RPage.hxx.

◆ IsEmpty()

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

Definition at line 184 of file RPage.hxx.

◆ IsNull()

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

Definition at line 183 of file RPage.hxx.

◆ IsValid()

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

Definition at line 182 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 174 of file RPage.hxx.

◆ operator!=()

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

Definition at line 186 of file RPage.hxx.

◆ operator=() [1/2]

RPage & ROOT::Experimental::Internal::RPage::operator= ( const RPage & )
delete

◆ operator=() [2/2]

RPage & ROOT::Experimental::Internal::RPage::operator= ( RPage && other)
inline

Definition at line 104 of file RPage.hxx.

◆ operator==()

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

Definition at line 185 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 169 of file RPage.hxx.

◆ ResetCluster()

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

Definition at line 170 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 164 of file RPage.hxx.

Friends And Related Symbol Documentation

◆ RPageRef

friend class RPageRef
friend

Definition at line 47 of file RPage.hxx.

Member Data Documentation

◆ fBuffer

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

Definition at line 70 of file RPage.hxx.

◆ fClusterInfo

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

Definition at line 78 of file RPage.hxx.

◆ fColumnId

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

Definition at line 69 of file RPage.hxx.

◆ fElementSize

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

Definition at line 73 of file RPage.hxx.

◆ fMaxElements

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

The capacity of the page in number of elements.

Definition at line 76 of file RPage.hxx.

◆ fNElements

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

Definition at line 74 of file RPage.hxx.

◆ fPageAllocator

RPageAllocator* ROOT::Experimental::Internal::RPage::fPageAllocator = nullptr
private

The allocator used to allocate fBuffer. Can be null if the buffer doesn't need to be freed.

Definition at line 72 of file RPage.hxx.

◆ fRangeFirst

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

Definition at line 77 of file RPage.hxx.

◆ kPageZeroSize

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

Definition at line 50 of file RPage.hxx.

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

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