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.
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 RClusterInfo & | GetClusterInfo () 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 |
RPage & | operator= (const RPage &)=delete |
RPage & | operator= (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 |
RPageAllocator * | fPageAllocator = 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>
|
default |
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |