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 47 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, ClusterSize_t::ValueType elementSize, ClusterSize_t::ValueType maxElements)
 
 ~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
 
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)
 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 (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 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.
 
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 ( 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 88 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 134 of file RPage.hxx.

◆ Contains() [2/2]

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

Definition at line 138 of file RPage.hxx.

◆ GetBuffer()

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

Definition at line 147 of file RPage.hxx.

◆ GetCapacity()

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

Definition at line 119 of file RPage.hxx.

◆ GetClusterInfo()

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

Definition at line 132 of file RPage.hxx.

◆ GetClusterRangeFirst()

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

Definition at line 128 of file RPage.hxx.

◆ GetClusterRangeLast()

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

Definition at line 129 of file RPage.hxx.

◆ GetElementSize()

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

Definition at line 123 of file RPage.hxx.

◆ GetGlobalRangeFirst()

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

Definition at line 126 of file RPage.hxx.

◆ GetGlobalRangeLast()

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

Definition at line 127 of file RPage.hxx.

◆ GetMaxElements()

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

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

◆ GetNElements()

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

Definition at line 124 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

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 154 of file RPage.hxx.

◆ IsEmpty()

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

Definition at line 174 of file RPage.hxx.

◆ IsNull()

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

Definition at line 173 of file RPage.hxx.

◆ operator!=()

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

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

◆ operator==()

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

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

◆ ResetCluster()

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

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

Friends And Related Symbol Documentation

◆ RPageRef

friend class RPageRef
friend

Definition at line 48 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.

◆ 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 51 of file RPage.hxx.

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

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