Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Detail::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 201 of file RField.hxx.

Public Member Functions

 RBulk (const RBulk &)=delete
 
 RBulk (RBulk &&other)
 
 ~RBulk ()
 
RBulkoperator= (const RBulk &)=delete
 
RBulkoperator= (RBulk &&other)
 
void * ReadBulk (const RClusterIndex &firstIndex, const bool *maskReq, std::size_t size)
 Reads 'size' values from the associated field, starting from 'firstIndex'.
 

Private Member Functions

 RBulk (RFieldBase *field)
 
bool ContainsRange (const RClusterIndex &firstIndex, std::size_t size) const
 
void CountValidValues ()
 
void * GetValuePtrAt (std::size_t idx) const
 
void ReleaseValues ()
 
void Reset (const RClusterIndex &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.
 
RFieldBasefField = nullptr
 The field that created the array of values.
 
RClusterIndex fFirstIndex
 Index of the first value of the array.
 
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
 Pointer to the start of the array.
 
std::size_t fValueSize = 0
 Cached copy of fField->GetValueSize()
 

Friends

class RFieldBase
 

#include <ROOT/RField.hxx>

Constructor & Destructor Documentation

◆ RBulk() [1/3]

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

Definition at line 237 of file RField.hxx.

◆ ~RBulk()

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

Definition at line 269 of file RField.cxx.

◆ RBulk() [2/3]

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

◆ RBulk() [3/3]

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

Definition at line 244 of file RField.cxx.

Member Function Documentation

◆ ContainsRange()

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

Definition at line 224 of file RField.hxx.

◆ CountValidValues()

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

Definition at line 311 of file RField.cxx.

◆ GetValuePtrAt()

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

Definition at line 232 of file RField.hxx.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 256 of file RField.cxx.

◆ ReadBulk()

void * ROOT::Experimental::Detail::RFieldBase::RBulk::ReadBulk ( const RClusterIndex 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.

Definition at line 250 of file RField.hxx.

◆ ReleaseValues()

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

Definition at line 275 of file RField.cxx.

◆ Reset()

void ROOT::Experimental::Detail::RFieldBase::RBulk::Reset ( const RClusterIndex 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 288 of file RField.cxx.

Friends And Related Symbol Documentation

◆ RFieldBase

friend class RFieldBase
friend

Definition at line 203 of file RField.hxx.

Member Data Documentation

◆ fAuxData

std::vector<unsigned char> ROOT::Experimental::Detail::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 216 of file RField.hxx.

◆ fCapacity

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

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

Definition at line 208 of file RField.hxx.

◆ fField

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

The field that created the array of values.

Definition at line 205 of file RField.hxx.

◆ fFirstIndex

RClusterIndex ROOT::Experimental::Detail::RFieldBase::RBulk::fFirstIndex
private

Index of the first value of the array.

Definition at line 212 of file RField.hxx.

◆ fMaskAvail

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

Masks invalid values in the array.

Definition at line 210 of file RField.hxx.

◆ fNValidValues

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

The sum of non-zero elements in the fMask.

Definition at line 211 of file RField.hxx.

◆ fSize

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

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

Definition at line 209 of file RField.hxx.

◆ fValues

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

Pointer to the start of the array.

Definition at line 206 of file RField.hxx.

◆ fValueSize

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

Cached copy of fField->GetValueSize()

Definition at line 207 of file RField.hxx.

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

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