A column element encapsulates the translation between basic C++ types and their column representation.
Usually the on-disk element should map bitwise to the in-memory element. Sometimes that's not the case though, for instance on big endian platforms or for bools.
There is a template specialization for every valid pair of C++ type and column representation. These specialized child classes are responsible for overriding Pack()
/ Unpack()
for packing / unpacking elements as appropriate.
Definition at line 53 of file RColumnElementBase.hxx.
Public Member Functions | |
RColumnElementBase (const RColumnElementBase &other)=default | |
RColumnElementBase (RColumnElementBase &&other)=default | |
virtual | ~RColumnElementBase ()=default |
std::size_t | GetBitsOnStorage () const |
std::size_t | GetPackedSize (std::size_t nElements=1U) const |
std::size_t | GetSize () const |
std::optional< std::pair< double, double > > | GetValueRange () const |
virtual bool | IsMappable () const |
Derived, typed classes tell whether the on-storage layout is bitwise identical to the memory layout. | |
RColumnElementBase & | operator= (const RColumnElementBase &other)=delete |
RColumnElementBase & | operator= (RColumnElementBase &&other)=default |
virtual void | Pack (void *destination, const void *source, std::size_t count) const |
If the on-storage layout and the in-memory layout differ, packing creates an on-disk page from an in-memory page. | |
virtual void | SetBitsOnStorage (std::size_t bitsOnStorage) |
virtual void | SetValueRange (double, double) |
virtual void | Unpack (void *destination, const void *source, std::size_t count) const |
If the on-storage layout and the in-memory layout differ, unpacking creates a memory page from an on-storage page. | |
Static Public Member Functions | |
template<typename CppT = void> | |
static std::unique_ptr< RColumnElementBase > | Generate (EColumnType type) |
If CppT == void, use the default C++ type for the given column type. | |
template<> | |
std::unique_ptr< RColumnElementBase > | Generate (EColumnType type) |
template<> | |
std::unique_ptr< ROOT::Experimental::Internal::RColumnElementBase > | Generate (EColumnType type) |
static const char * | GetTypeName (EColumnType type) |
static std::pair< std::uint16_t, std::uint16_t > | GetValidBitRange (EColumnType type) |
Most types have a fixed on-disk bit width. | |
Protected Member Functions | |
RColumnElementBase (std::size_t size, std::size_t bitsOnStorage=0) | |
Protected Attributes | |
std::size_t | fBitsOnStorage |
std::size_t | fSize |
Size of the C++ value that corresponds to the on-disk element. | |
std::optional< std::pair< double, double > > | fValueRange = std::nullopt |
This is only meaningful for column elements that support it (e.g. Real32Quant) | |
#include <ROOT/RColumnElementBase.hxx>
|
inlineexplicitprotected |
Definition at line 61 of file RColumnElementBase.hxx.
|
default |
|
default |
|
virtualdefault |
|
static |
If CppT == void, use the default C++ type for the given column type.
Definition at line 148 of file RColumnElementBase.hxx.
|
static |
|
static |
Definition at line 70 of file RColumnElement.cxx.
|
inline |
Definition at line 113 of file RColumnElementBase.hxx.
|
inline |
Definition at line 115 of file RColumnElementBase.hxx.
|
inline |
Definition at line 112 of file RColumnElementBase.hxx.
|
static |
Definition at line 70 of file RColumnElement.cxx.
|
static |
Most types have a fixed on-disk bit width.
Some low-precision column types have a range of possible bit widths. Return the minimum and maximum allowed bit size per type.
Definition at line 29 of file RColumnElement.cxx.
|
inline |
Definition at line 114 of file RColumnElementBase.hxx.
|
inlinevirtual |
Derived, typed classes tell whether the on-storage layout is bitwise identical to the memory layout.
Definition at line 83 of file RColumnElementBase.hxx.
|
delete |
|
default |
|
inlinevirtual |
If the on-storage layout and the in-memory layout differ, packing creates an on-disk page from an in-memory page.
Definition at line 101 of file RColumnElementBase.hxx.
|
inlinevirtual |
Definition at line 89 of file RColumnElementBase.hxx.
|
inlinevirtual |
Definition at line 95 of file RColumnElementBase.hxx.
|
inlinevirtual |
If the on-storage layout and the in-memory layout differ, unpacking creates a memory page from an on-storage page.
Definition at line 107 of file RColumnElementBase.hxx.
|
protected |
Definition at line 57 of file RColumnElementBase.hxx.
|
protected |
Size of the C++ value that corresponds to the on-disk element.
Definition at line 56 of file RColumnElementBase.hxx.
|
protected |
This is only meaningful for column elements that support it (e.g. Real32Quant)
Definition at line 59 of file RColumnElementBase.hxx.