Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RWriteColumn Class Reference

Definition at line 309 of file RColumn.hxx.

Public Types

enum class  EColumnType { kRead , kWrite }
 

Public Member Functions

 ~RWriteColumn ()
 
void Append (const void *from)
 
void AppendV (const void *from, std::size_t count)
 
void CommitSuppressed ()
 
void ConnectPageSink (ROOT::DescriptorId_t fieldId, ROOT::Internal::RPageSink &pageSink, ROOT::NTupleSize_t firstElementIndex=0U)
 Connect the column to a page sink.
 
void Flush ()
 
RReadColumn * ForReading ()
 
const RReadColumn * ForReading () const
 
RWriteColumn * ForWriting ()
 
const RWriteColumn * ForWriting () const
 
std::uint16_t GetBitsOnStorage () const
 
ROOT::Internal::RColumnElementBase * GetElement () const
 
ROOT::NTupleSize_t GetFirstElementIndex () const
 
std::uint32_t GetIndex () const
 
ROOT::DescriptorId_t GetOnDiskId () const
 
std::uint16_t GetRepresentationIndex () const
 
ROOT::ENTupleColumnType GetType () const
 
std::optional< std::pair< double, double > > GetValueRange () const
 
std::size_t GetWritePageCapacity () const
 
void SetBitsOnStorage (std::size_t bits)
 
void SetValueRange (double min, double max)
 

Static Public Member Functions

template<typename CppT >
static std::unique_ptr< RWriteColumn > Create (ROOT::ENTupleColumnType type, std::uint32_t columnIdx, std::uint16_t representationIdx)
 

Protected Member Functions

ROOT::Internal::RPageStorage::ColumnHandle_t MakeHandle ()
 

Protected Attributes

std::unique_ptr< ROOT::Internal::RColumnElementBase > fElement
 Used to pack and unpack pages on writing/reading.
 
std::uint32_t fIndex
 Columns belonging to the same field are distinguished by their order.
 
ROOT::DescriptorId_t fOnDiskId = ROOT::kInvalidDescriptorId
 The column id in the column descriptor, once connected to a sink or source.
 
std::uint16_t fRepresentationIndex
 Fields can have multiple column representations, distinguished by representation index.
 
ROOT::ENTupleColumnType fType
 

Private Member Functions

 RWriteColumn (ROOT::ENTupleColumnType type, std::uint32_t columnIndex, std::uint16_t representationIndex)
 
void HandleWritePageIfFull ()
 Used when trying to append to a full write page.
 

Private Attributes

ROOT::NTupleSize_t fFirstElementIndex = 0
 Global index of the first element in this column; usually == 0, unless it is a deferred column.
 
ROOT::NTupleSize_t fInitialNElements = 1
 The initial number of elements in a page.
 
ROOT::NTupleSize_t fNElements = 0
 The number of elements written.
 
ROOT::Internal::RPageSink * fPageSink = nullptr
 
ROOT::Internal::RPage fWritePage
 The page into which new elements are being written.
 

#include <ROOT/RColumn.hxx>

Inheritance diagram for ROOT::Internal::RWriteColumn:
[legend]

Member Enumeration Documentation

◆ EColumnType

enum class ROOT::Internal::RColumn::EColumnType
stronginherited
Enumerator
kRead 
kWrite 

Definition at line 61 of file RColumn.hxx.

Constructor & Destructor Documentation

◆ RWriteColumn()

ROOT::Internal::RWriteColumn::RWriteColumn ( ROOT::ENTupleColumnType type,
std::uint32_t columnIndex,
std::uint16_t representationIndex )
inlineprivate

Definition at line 351 of file RColumn.hxx.

◆ ~RWriteColumn()

ROOT::Internal::RWriteColumn::~RWriteColumn ( )

Definition at line 23 of file RColumn.cxx.

Member Function Documentation

◆ Append()

void ROOT::Internal::RWriteColumn::Append ( const void * from)
inline

Definition at line 374 of file RColumn.hxx.

◆ AppendV()

void ROOT::Internal::RWriteColumn::AppendV ( const void * from,
std::size_t count )
inline

Definition at line 386 of file RColumn.hxx.

◆ CommitSuppressed()

void ROOT::Internal::RWriteColumn::CommitSuppressed ( )

Definition at line 56 of file RColumn.cxx.

◆ ConnectPageSink()

void ROOT::Internal::RWriteColumn::ConnectPageSink ( ROOT::DescriptorId_t fieldId,
ROOT::Internal::RPageSink & pageSink,
ROOT::NTupleSize_t firstElementIndex = 0U )

Connect the column to a page sink.

firstElementIndex can be used to specify the first column element index with backing storage for this column. On read back, elements before firstElementIndex will cause the zero page to be mapped.

Definition at line 29 of file RColumn.cxx.

◆ Create()

template<typename CppT >
static std::unique_ptr< RWriteColumn > ROOT::Internal::RWriteColumn::Create ( ROOT::ENTupleColumnType type,
std::uint32_t columnIdx,
std::uint16_t representationIdx )
inlinestatic

Definition at line 359 of file RColumn.hxx.

◆ Flush()

void ROOT::Internal::RWriteColumn::Flush ( )

Definition at line 45 of file RColumn.cxx.

◆ ForReading() [1/2]

RReadColumn * ROOT::Internal::RColumn::ForReading ( )
inlineinherited

Definition at line 413 of file RColumn.hxx.

◆ ForReading() [2/2]

const RReadColumn * ROOT::Internal::RColumn::ForReading ( ) const
inlineinherited

Definition at line 417 of file RColumn.hxx.

◆ ForWriting() [1/2]

RWriteColumn * ROOT::Internal::RColumn::ForWriting ( )
inlineinherited

Definition at line 421 of file RColumn.hxx.

◆ ForWriting() [2/2]

const RWriteColumn * ROOT::Internal::RColumn::ForWriting ( ) const
inlineinherited

Definition at line 425 of file RColumn.hxx.

◆ GetBitsOnStorage()

std::uint16_t ROOT::Internal::RColumn::GetBitsOnStorage ( ) const
inlineinherited

Definition at line 78 of file RColumn.hxx.

◆ GetElement()

ROOT::Internal::RColumnElementBase * ROOT::Internal::RColumn::GetElement ( ) const
inlineinherited

Definition at line 76 of file RColumn.hxx.

◆ GetFirstElementIndex()

ROOT::NTupleSize_t ROOT::Internal::RWriteColumn::GetFirstElementIndex ( ) const
inline

Definition at line 410 of file RColumn.hxx.

◆ GetIndex()

std::uint32_t ROOT::Internal::RColumn::GetIndex ( ) const
inlineinherited

Definition at line 88 of file RColumn.hxx.

◆ GetOnDiskId()

ROOT::DescriptorId_t ROOT::Internal::RColumn::GetOnDiskId ( ) const
inlineinherited

Definition at line 90 of file RColumn.hxx.

◆ GetRepresentationIndex()

std::uint16_t ROOT::Internal::RColumn::GetRepresentationIndex ( ) const
inlineinherited

Definition at line 89 of file RColumn.hxx.

◆ GetType()

ROOT::ENTupleColumnType ROOT::Internal::RColumn::GetType ( ) const
inlineinherited

Definition at line 77 of file RColumn.hxx.

◆ GetValueRange()

std::optional< std::pair< double, double > > ROOT::Internal::RColumn::GetValueRange ( ) const
inlineinherited

Definition at line 83 of file RColumn.hxx.

◆ GetWritePageCapacity()

std::size_t ROOT::Internal::RWriteColumn::GetWritePageCapacity ( ) const
inline

Definition at line 409 of file RColumn.hxx.

◆ HandleWritePageIfFull()

void ROOT::Internal::RWriteColumn::HandleWritePageIfFull ( )
inlineprivate

Used when trying to append to a full write page.

If possible, expand the page. Otherwise, flush and reset to the minimal size.

Definition at line 326 of file RColumn.hxx.

◆ MakeHandle()

ROOT::Internal::RPageStorage::ColumnHandle_t ROOT::Internal::RColumn::MakeHandle ( )
inlineprotectedinherited

Definition at line 58 of file RColumn.hxx.

◆ SetBitsOnStorage()

void ROOT::Internal::RColumn::SetBitsOnStorage ( std::size_t bits)
inlineinherited

Definition at line 92 of file RColumn.hxx.

◆ SetValueRange()

void ROOT::Internal::RColumn::SetValueRange ( double min,
double max )
inlineinherited

Definition at line 93 of file RColumn.hxx.

Member Data Documentation

◆ fElement

std::unique_ptr<ROOT::Internal::RColumnElementBase> ROOT::Internal::RColumn::fElement
protectedinherited

Used to pack and unpack pages on writing/reading.

Definition at line 45 of file RColumn.hxx.

◆ fFirstElementIndex

ROOT::NTupleSize_t ROOT::Internal::RWriteColumn::fFirstElementIndex = 0
private

Global index of the first element in this column; usually == 0, unless it is a deferred column.

Definition at line 322 of file RColumn.hxx.

◆ fIndex

std::uint32_t ROOT::Internal::RColumn::fIndex
protectedinherited

Columns belonging to the same field are distinguished by their order.

E.g. for an std::string field, there is the offset column with index 0 and the character value column with index 1.

Definition at line 48 of file RColumn.hxx.

◆ fInitialNElements

ROOT::NTupleSize_t ROOT::Internal::RWriteColumn::fInitialNElements = 1
private

The initial number of elements in a page.

Definition at line 318 of file RColumn.hxx.

◆ fNElements

ROOT::NTupleSize_t ROOT::Internal::RWriteColumn::fNElements = 0
private

The number of elements written.

Definition at line 320 of file RColumn.hxx.

◆ fOnDiskId

ROOT::DescriptorId_t ROOT::Internal::RColumn::fOnDiskId = ROOT::kInvalidDescriptorId
protectedinherited

The column id in the column descriptor, once connected to a sink or source.

Definition at line 43 of file RColumn.hxx.

◆ fPageSink

ROOT::Internal::RPageSink* ROOT::Internal::RWriteColumn::fPageSink = nullptr
private

Definition at line 311 of file RColumn.hxx.

◆ fRepresentationIndex

std::uint16_t ROOT::Internal::RColumn::fRepresentationIndex
protectedinherited

Fields can have multiple column representations, distinguished by representation index.

Definition at line 50 of file RColumn.hxx.

◆ fType

ROOT::ENTupleColumnType ROOT::Internal::RColumn::fType
protectedinherited

Definition at line 51 of file RColumn.hxx.

◆ fWritePage

ROOT::Internal::RPage ROOT::Internal::RWriteColumn::fWritePage
private

The page into which new elements are being written.

The page will initially be small (RNTupleWriteOptions::fInitialUnzippedPageSize, which corresponds to fInitialElements) and expand as needed and as memory for page buffers is still available (RNTupleWriteOptions::fPageBufferBudget) or the maximum page size is reached (RNTupleWriteOptions::fMaxUnzippedPageSize).

Definition at line 316 of file RColumn.hxx.

Libraries for ROOT::Internal::RWriteColumn:

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