Points to an array of objects with RNTuple I/O support, used for bulk reading.
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 RBulkValues class.
Definition at line 872 of file RFieldBase.hxx.
Public Member Functions | |
| RBulkValues (const RBulkValues &)=delete | |
| RBulkValues (RBulkValues &&other) | |
| ~RBulkValues () | |
| void | AdoptBuffer (void *buf, std::size_t capacity) |
| RBulkValues & | operator= (const RBulkValues &)=delete |
| RBulkValues & | operator= (RBulkValues &&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 | |
| RBulkValues (RFieldBase *field) | |
| bool | ContainsRange (RNTupleLocalIndex firstIndex, std::size_t size) const |
| 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::RDeleter > | fDeleter |
| RFieldBase * | fField = 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 RFieldBase::GetValueSize(). | |
Friends | |
| class | RFieldBase |
#include <ROOT/RFieldBase.hxx>
|
inlineexplicitprivate |
Definition at line 906 of file RFieldBase.hxx.
| ROOT::RFieldBase::RBulkValues::~RBulkValues | ( | ) |
Definition at line 153 of file RFieldBase.cxx.
|
delete |
| ROOT::RFieldBase::RBulkValues::RBulkValues | ( | RBulkValues && | other | ) |
Definition at line 124 of file RFieldBase.cxx.
| void ROOT::RFieldBase::RBulkValues::AdoptBuffer | ( | void * | buf, |
| std::size_t | capacity ) |
Definition at line 199 of file RFieldBase.cxx.
|
inlineprivate |
Definition at line 896 of file RFieldBase.hxx.
|
inlineprivate |
Definition at line 904 of file RFieldBase.hxx.
|
delete |
| ROOT::RFieldBase::RBulkValues & ROOT::RFieldBase::RBulkValues::operator= | ( | RBulkValues && | other | ) |
Definition at line 138 of file RFieldBase.cxx.
|
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 926 of file RFieldBase.hxx.
|
inline |
Overload to read all elements in the given cluster range.
Definition at line 961 of file RFieldBase.hxx.
|
private |
Definition at line 159 of file RFieldBase.cxx.
|
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 173 of file RFieldBase.cxx.
|
friend |
Definition at line 874 of file RFieldBase.hxx.
|
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 RBulkValues class does not modify the array in-between calls to the field's BulkRead method.
Definition at line 889 of file RFieldBase.hxx.
|
private |
The size of the array memory block in number of values.
Definition at line 880 of file RFieldBase.hxx.
|
private |
Definition at line 877 of file RFieldBase.hxx.
|
private |
The field that created the array of values.
Definition at line 876 of file RFieldBase.hxx.
|
private |
Index of the first value of the array.
Definition at line 885 of file RFieldBase.hxx.
|
private |
True if the user provides the memory buffer for fValues.
Definition at line 882 of file RFieldBase.hxx.
|
private |
Masks invalid values in the array.
Definition at line 883 of file RFieldBase.hxx.
|
private |
The sum of non-zero elements in the fMask.
Definition at line 884 of file RFieldBase.hxx.
|
private |
The number of available values in the array (provided their mask is set).
Definition at line 881 of file RFieldBase.hxx.
|
private |
Cached deleter of fField.
Pointer to the start of the array
Definition at line 878 of file RFieldBase.hxx.
|
private |
Cached copy of RFieldBase::GetValueSize().
Definition at line 879 of file RFieldBase.hxx.