Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
ROOT::Experimental::RFieldBase::RBulk Class Reference

Similar to RValue but manages an array of consecutive values.

Bulks have to come from the same cluster. Bulk I/O works with two bit masks: the mask of all the available entries in the current bulk and the mask of the required entries in a bulk read. The idea is that a single bulk may serve multiple read operations on the same range, where in each read operation a different subset of values is required. The memory of the value array is managed by the RBulk class.

Definition at line 742 of file RFieldBase.hxx.

Public Member Functions

 RBulk (const RBulk &)=delete
 
 RBulk (RBulk &&other)
 
 ~RBulk ()
 
void AdoptBuffer (void *buf, std::size_t capacity)
 
RBulkoperator= (const RBulk &)=delete
 
RBulkoperator= (RBulk &&other)
 
void * ReadBulk (RNTupleLocalIndex firstIndex, const bool *maskReq, std::size_t size)
 Reads 'size' values from the associated field, starting from 'firstIndex'.
 
void * ReadBulk (ROOT::RNTupleLocalRange range)
 Overload to read all elements in the given cluster range.
 

Private Member Functions

 RBulk (RFieldBase *field)
 
bool ContainsRange (RNTupleLocalIndex firstIndex, std::size_t size) const
 
void CountValidValues ()
 
void * GetValuePtrAt (std::size_t idx) const
 
void ReleaseValues ()
 
void Reset (RNTupleLocalIndex firstIndex, std::size_t size)
 Sets a new range for the bulk.
 

Private Attributes

std::vector< unsigned char > fAuxData
 Reading arrays of complex values may require additional memory, for instance for the elements of arrays of vectors.
 
std::size_t fCapacity = 0
 The size of the array memory block in number of values.
 
std::unique_ptr< RFieldBase::RDeleterfDeleter
 
RFieldBasefField = nullptr
 The field that created the array of values.
 
RNTupleLocalIndex fFirstIndex
 Index of the first value of the array.
 
bool fIsAdopted = false
 True if the user provides the memory buffer for fValues.
 
std::unique_ptr< bool[]> fMaskAvail
 Masks invalid values in the array.
 
std::size_t fNValidValues = 0
 The sum of non-zero elements in the fMask.
 
std::size_t fSize = 0
 The number of available values in the array (provided their mask is set)
 
void * fValues = nullptr
 Cached deleter of fField.
 
std::size_t fValueSize = 0
 Cached copy of fField->GetValueSize()
 

Friends

class RFieldBase
 

#include <ROOT/RFieldBase.hxx>

Constructor & Destructor Documentation

◆ RBulk() [1/3]

ROOT::Experimental::RFieldBase::RBulk::RBulk ( RFieldBase * field)
inlineexplicitprivate

Definition at line 777 of file RFieldBase.hxx.

◆ ~RBulk()

ROOT::Experimental::RFieldBase::RBulk::~RBulk ( )

Definition at line 154 of file RFieldBase.cxx.

◆ RBulk() [2/3]

ROOT::Experimental::RFieldBase::RBulk::RBulk ( const RBulk & )
delete

◆ RBulk() [3/3]

ROOT::Experimental::RFieldBase::RBulk::RBulk ( RBulk && other)

Definition at line 125 of file RFieldBase.cxx.

Member Function Documentation

◆ AdoptBuffer()

void ROOT::Experimental::RFieldBase::RBulk::AdoptBuffer ( void * buf,
std::size_t capacity )

Definition at line 207 of file RFieldBase.cxx.

◆ ContainsRange()

bool ROOT::Experimental::RFieldBase::RBulk::ContainsRange ( RNTupleLocalIndex firstIndex,
std::size_t size ) const
inlineprivate

Definition at line 767 of file RFieldBase.hxx.

◆ CountValidValues()

void ROOT::Experimental::RFieldBase::RBulk::CountValidValues ( )
private

Definition at line 200 of file RFieldBase.cxx.

◆ GetValuePtrAt()

void * ROOT::Experimental::RFieldBase::RBulk::GetValuePtrAt ( std::size_t idx) const
inlineprivate

Definition at line 775 of file RFieldBase.hxx.

◆ operator=() [1/2]

RBulk & ROOT::Experimental::RFieldBase::RBulk::operator= ( const RBulk & )
delete

◆ operator=() [2/2]

ROOT::Experimental::RFieldBase::RBulk & ROOT::Experimental::RFieldBase::RBulk::operator= ( RBulk && other)

Definition at line 139 of file RFieldBase.cxx.

◆ ReadBulk() [1/2]

void * ROOT::Experimental::RFieldBase::RBulk::ReadBulk ( RNTupleLocalIndex firstIndex,
const bool * maskReq,
std::size_t size )
inline

Reads 'size' values from the associated field, starting from 'firstIndex'.

Note that the index is given relative to a certain cluster. The return value points to the array of read objects. The 'maskReq' parameter is a bool array of at least 'size' elements. Only objects for which the mask is true are guaranteed to be read in the returned value array. A 'nullptr' means to read all elements.

Definition at line 796 of file RFieldBase.hxx.

◆ ReadBulk() [2/2]

void * ROOT::Experimental::RFieldBase::RBulk::ReadBulk ( ROOT::RNTupleLocalRange range)
inline

Overload to read all elements in the given cluster range.

Definition at line 828 of file RFieldBase.hxx.

◆ ReleaseValues()

void ROOT::Experimental::RFieldBase::RBulk::ReleaseValues ( )
private

Definition at line 160 of file RFieldBase.cxx.

◆ Reset()

void ROOT::Experimental::RFieldBase::RBulk::Reset ( RNTupleLocalIndex firstIndex,
std::size_t size )
private

Sets a new range for the bulk.

If there is enough capacity, the fValues array will be reused. Otherwise a new array is allocated. After reset, fMaskAvail is false for all values.

Definition at line 174 of file RFieldBase.cxx.

Friends And Related Symbol Documentation

◆ RFieldBase

friend class RFieldBase
friend

Definition at line 744 of file RFieldBase.hxx.

Member Data Documentation

◆ fAuxData

std::vector<unsigned char> ROOT::Experimental::RFieldBase::RBulk::fAuxData
private

Reading arrays of complex values may require additional memory, for instance for the elements of arrays of vectors.

A pointer to the fAuxData array is passed to the field's BulkRead method. The RBulk class does not modify the array in-between calls to the field's BulkRead method.

Definition at line 759 of file RFieldBase.hxx.

◆ fCapacity

std::size_t ROOT::Experimental::RFieldBase::RBulk::fCapacity = 0
private

The size of the array memory block in number of values.

Definition at line 750 of file RFieldBase.hxx.

◆ fDeleter

std::unique_ptr<RFieldBase::RDeleter> ROOT::Experimental::RFieldBase::RBulk::fDeleter
private

Definition at line 747 of file RFieldBase.hxx.

◆ fField

RFieldBase* ROOT::Experimental::RFieldBase::RBulk::fField = nullptr
private

The field that created the array of values.

Definition at line 746 of file RFieldBase.hxx.

◆ fFirstIndex

RNTupleLocalIndex ROOT::Experimental::RFieldBase::RBulk::fFirstIndex
private

Index of the first value of the array.

Definition at line 755 of file RFieldBase.hxx.

◆ fIsAdopted

bool ROOT::Experimental::RFieldBase::RBulk::fIsAdopted = false
private

True if the user provides the memory buffer for fValues.

Definition at line 752 of file RFieldBase.hxx.

◆ fMaskAvail

std::unique_ptr<bool[]> ROOT::Experimental::RFieldBase::RBulk::fMaskAvail
private

Masks invalid values in the array.

Definition at line 753 of file RFieldBase.hxx.

◆ fNValidValues

std::size_t ROOT::Experimental::RFieldBase::RBulk::fNValidValues = 0
private

The sum of non-zero elements in the fMask.

Definition at line 754 of file RFieldBase.hxx.

◆ fSize

std::size_t ROOT::Experimental::RFieldBase::RBulk::fSize = 0
private

The number of available values in the array (provided their mask is set)

Definition at line 751 of file RFieldBase.hxx.

◆ fValues

void* ROOT::Experimental::RFieldBase::RBulk::fValues = nullptr
private

Cached deleter of fField.

Pointer to the start of the array

Definition at line 748 of file RFieldBase.hxx.

◆ fValueSize

std::size_t ROOT::Experimental::RFieldBase::RBulk::fValueSize = 0
private

Cached copy of fField->GetValueSize()

Definition at line 749 of file RFieldBase.hxx.

Libraries for ROOT::Experimental::RFieldBase::RBulk:

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