Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ROOT::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 43 of file RPage.hxx.

Classes

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

Public Member Functions

 RPage ()=default
 RPage (const RPage &)=delete
 RPage (RPage &&other)
 RPage (void *buffer, RPageAllocator *pageAllocator, std::uint32_t elementSize, std::uint32_t maxElements)
 ~RPage ()
bool Contains (RNTupleLocalIndex localIndex) const
bool Contains (ROOT::NTupleSize_t globalIndex) const
void * GetBuffer () const
std::size_t GetCapacity () const
const RClusterInfoGetClusterInfo () const
std::uint32_t GetElementSize () const
ROOT::NTupleSize_t GetGlobalRangeFirst () const
ROOT::NTupleSize_t GetGlobalRangeLast () const
ROOT::NTupleSize_t GetLocalRangeFirst () const
ROOT::NTupleSize_t GetLocalRangeLast () 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 (std::uint32_t nElements)
 Increases the number elements in the page.
bool IsEmpty () const
bool IsNull () const
bool operator!= (const RPage &other) const
RPageoperator= (const RPage &)=delete
RPageoperator= (RPage &&other)
bool operator== (const RPage &other) const
void Reset (ROOT::NTupleSize_t rangeFirst)
 Forget all currently stored elements (size == 0) and set a new starting index.
void ResetCluster (const RClusterInfo &clusterInfo)
void SetWindow (const ROOT::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 Public Attributes

static constexpr size_t kPageZeroSize = 64 * 1024

Private Attributes

void * fBuffer = nullptr
RClusterInfo fClusterInfo
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.
ROOT::NTupleSize_t fRangeFirst = 0

Friends

class RPageRef

#include <ROOT/RPage.hxx>

Constructor & Destructor Documentation

◆ RPage() [1/4]

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

◆ RPage() [2/4]

ROOT::Internal::RPage::RPage ( void * buffer,
RPageAllocator * pageAllocator,
std::uint32_t elementSize,
std::uint32_t maxElements )
inline

Definition at line 79 of file RPage.hxx.

◆ RPage() [3/4]

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

◆ RPage() [4/4]

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

Definition at line 84 of file RPage.hxx.

◆ ~RPage()

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

Definition at line 16 of file RPage.cxx.

Member Function Documentation

◆ Contains() [1/2]

bool ROOT::Internal::RPage::Contains ( RNTupleLocalIndex localIndex) const
inline

Definition at line 133 of file RPage.hxx.

◆ Contains() [2/2]

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

Definition at line 128 of file RPage.hxx.

◆ GetBuffer()

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

Definition at line 142 of file RPage.hxx.

◆ GetCapacity()

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

Definition at line 115 of file RPage.hxx.

◆ GetClusterInfo()

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

Definition at line 126 of file RPage.hxx.

◆ GetElementSize()

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

Definition at line 119 of file RPage.hxx.

◆ GetGlobalRangeFirst()

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

Definition at line 122 of file RPage.hxx.

◆ GetGlobalRangeLast()

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

Definition at line 123 of file RPage.hxx.

◆ GetLocalRangeFirst()

ROOT::NTupleSize_t ROOT::Internal::RPage::GetLocalRangeFirst ( ) const
inline

Definition at line 124 of file RPage.hxx.

◆ GetLocalRangeLast()

ROOT::NTupleSize_t ROOT::Internal::RPage::GetLocalRangeLast ( ) const
inline

Definition at line 125 of file RPage.hxx.

◆ GetMaxElements()

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

Definition at line 121 of file RPage.hxx.

◆ GetNBytes()

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

The space taken by column elements in the buffer.

Definition at line 111 of file RPage.hxx.

◆ GetNElements()

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

Definition at line 120 of file RPage.hxx.

◆ GetPageZeroBuffer()

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

◆ GrowUnchecked()

void * ROOT::Internal::RPage::GrowUnchecked ( std::uint32_t nElements)
inline

Increases the number elements in the page.

The caller is responsible to respect the page capacity, i.e. to ensure that fNElements + nElements <= fMaxElements. Returns a pointer after the last element, which is used during writing in anticipation of the caller filling nElements in the page. When reading a page from disk, GrowUnchecked is used to set the actual number of elements. In this case, the return value is ignored.

Definition at line 149 of file RPage.hxx.

◆ IsEmpty()

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

Definition at line 174 of file RPage.hxx.

◆ IsNull()

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

Definition at line 173 of file RPage.hxx.

◆ operator!=()

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

Definition at line 176 of file RPage.hxx.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 95 of file RPage.hxx.

◆ operator==()

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

Definition at line 175 of file RPage.hxx.

◆ Reset()

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

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

Definition at line 163 of file RPage.hxx.

◆ ResetCluster()

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

Definition at line 168 of file RPage.hxx.

◆ SetWindow()

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

Seek the page to a certain position of the column.

Definition at line 157 of file RPage.hxx.

◆ RPageRef

friend class RPageRef
friend

Definition at line 44 of file RPage.hxx.

Member Data Documentation

◆ fBuffer

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

Definition at line 67 of file RPage.hxx.

◆ fClusterInfo

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

Definition at line 75 of file RPage.hxx.

◆ fElementSize

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

Definition at line 70 of file RPage.hxx.

◆ fMaxElements

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

The capacity of the page in number of elements.

Definition at line 73 of file RPage.hxx.

◆ fNElements

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

Definition at line 71 of file RPage.hxx.

◆ fPageAllocator

RPageAllocator* ROOT::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 69 of file RPage.hxx.

◆ fRangeFirst

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

Definition at line 74 of file RPage.hxx.

◆ kPageZeroSize

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

Definition at line 47 of file RPage.hxx.


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