Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RSealedPage Struct Reference

A sealed page contains the bytes of a page as written to storage (packed & compressed).

It is used as an input to UnsealPages() as well as to transfer pages between different storage media. RSealedPage does not own the buffer it is pointing to in order to not interfere with the memory management of concrete page sink and page source implementations.

Definition at line 31 of file RSealedPage.hxx.

Public Member Functions

 RSealedPage ()=default
 
 RSealedPage (const RSealedPage &other)=default
 
 RSealedPage (const void *buffer, std::size_t bufferSize, std::uint32_t nElements, bool hasChecksum=false)
 
 RSealedPage (RSealedPage &&other)=default
 
void ChecksumIfEnabled ()
 
const void * GetBuffer () const
 
std::size_t GetBufferSize () const
 
RResult< std::uint64_t > GetChecksum () const
 Returns a failure if the sealed page has no checksum.
 
std::size_t GetDataSize () const
 
bool GetHasChecksum () const
 
std::uint32_t GetNElements () const
 
RSealedPage & operator= (const RSealedPage &other)=default
 
RSealedPage & operator= (RSealedPage &&other)=default
 
void SetBuffer (const void *buffer)
 
void SetBufferSize (std::size_t bufferSize)
 
void SetHasChecksum (bool hasChecksum)
 
void SetNElements (std::uint32_t nElements)
 
RResult< void > VerifyChecksumIfEnabled () const
 

Static Public Attributes

static constexpr std::size_t kNBytesPageChecksum = sizeof(std::uint64_t)
 The page checksum is a 64bit xxhash3.
 

Private Attributes

const void * fBuffer = nullptr
 
std::size_t fBufferSize = 0
 Size of the page payload and the trailing checksum (if available)
 
bool fHasChecksum = false
 If set, the last 8 bytes of the buffer are the xxhash of the rest of the buffer.
 
std::uint32_t fNElements = 0
 

#include <ROOT/RSealedPage.hxx>

Constructor & Destructor Documentation

◆ RSealedPage() [1/4]

ROOT::Internal::RSealedPage::RSealedPage ( )
default

◆ RSealedPage() [2/4]

ROOT::Internal::RSealedPage::RSealedPage ( const void * buffer,
std::size_t bufferSize,
std::uint32_t nElements,
bool hasChecksum = false )
inline

Definition at line 43 of file RSealedPage.hxx.

◆ RSealedPage() [3/4]

ROOT::Internal::RSealedPage::RSealedPage ( const RSealedPage & other)
default

◆ RSealedPage() [4/4]

ROOT::Internal::RSealedPage::RSealedPage ( RSealedPage && other)
default

Member Function Documentation

◆ ChecksumIfEnabled()

void ROOT::Internal::RSealedPage::ChecksumIfEnabled ( )

Definition at line 17 of file RSealedPage.cxx.

◆ GetBuffer()

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

Definition at line 52 of file RSealedPage.hxx.

◆ GetBufferSize()

std::size_t ROOT::Internal::RSealedPage::GetBufferSize ( ) const
inline

Definition at line 60 of file RSealedPage.hxx.

◆ GetChecksum()

ROOT::RResult< std::uint64_t > ROOT::Internal::RSealedPage::GetChecksum ( ) const

Returns a failure if the sealed page has no checksum.

Definition at line 39 of file RSealedPage.cxx.

◆ GetDataSize()

std::size_t ROOT::Internal::RSealedPage::GetDataSize ( ) const
inline

Definition at line 55 of file RSealedPage.hxx.

◆ GetHasChecksum()

bool ROOT::Internal::RSealedPage::GetHasChecksum ( ) const
inline

Definition at line 66 of file RSealedPage.hxx.

◆ GetNElements()

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

Definition at line 63 of file RSealedPage.hxx.

◆ operator=() [1/2]

RSealedPage & ROOT::Internal::RSealedPage::operator= ( const RSealedPage & other)
default

◆ operator=() [2/2]

RSealedPage & ROOT::Internal::RSealedPage::operator= ( RSealedPage && other)
default

◆ SetBuffer()

void ROOT::Internal::RSealedPage::SetBuffer ( const void * buffer)
inline

Definition at line 53 of file RSealedPage.hxx.

◆ SetBufferSize()

void ROOT::Internal::RSealedPage::SetBufferSize ( std::size_t bufferSize)
inline

Definition at line 61 of file RSealedPage.hxx.

◆ SetHasChecksum()

void ROOT::Internal::RSealedPage::SetHasChecksum ( bool hasChecksum)
inline

Definition at line 67 of file RSealedPage.hxx.

◆ SetNElements()

void ROOT::Internal::RSealedPage::SetNElements ( std::uint32_t nElements)
inline

Definition at line 64 of file RSealedPage.hxx.

◆ VerifyChecksumIfEnabled()

ROOT::RResult< void > ROOT::Internal::RSealedPage::VerifyChecksumIfEnabled ( ) const

Definition at line 28 of file RSealedPage.cxx.

Member Data Documentation

◆ fBuffer

const void* ROOT::Internal::RSealedPage::fBuffer = nullptr
private

Definition at line 33 of file RSealedPage.hxx.

◆ fBufferSize

std::size_t ROOT::Internal::RSealedPage::fBufferSize = 0
private

Size of the page payload and the trailing checksum (if available)

Definition at line 34 of file RSealedPage.hxx.

◆ fHasChecksum

bool ROOT::Internal::RSealedPage::fHasChecksum = false
private

If set, the last 8 bytes of the buffer are the xxhash of the rest of the buffer.

Definition at line 36 of file RSealedPage.hxx.

◆ fNElements

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

Definition at line 35 of file RSealedPage.hxx.

◆ kNBytesPageChecksum

constexpr std::size_t ROOT::Internal::RSealedPage::kNBytesPageChecksum = sizeof(std::uint64_t)
staticconstexpr

The page checksum is a 64bit xxhash3.

Definition at line 40 of file RSealedPage.hxx.

Collaboration diagram for ROOT::Internal::RSealedPage:
[legend]

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