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 265 of file RColumnElement.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 |
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, 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 | Unpack (void *destination, 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 std::size_t | GetBitsOnStorage (EColumnType type) |
static std::string | GetTypeName (EColumnType type) |
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. | |
#include <ROOT/RColumnElement.hxx>
|
inlineexplicitprotected |
Definition at line 271 of file RColumnElement.hxx.
|
default |
|
default |
|
virtualdefault |
|
static |
If CppT == void, use the default C++ type for the given column type.
Definition at line 757 of file RColumnElement.hxx.
|
static |
|
static |
Definition at line 1 of file RColumnElement.cxx.
|
inline |
Definition at line 309 of file RColumnElement.hxx.
|
static |
Definition at line 67 of file RColumnElement.cxx.
|
inline |
Definition at line 310 of file RColumnElement.hxx.
|
inline |
Definition at line 308 of file RColumnElement.hxx.
|
static |
Definition at line 103 of file RColumnElement.cxx.
|
inlinevirtual |
Derived, typed classes tell whether the on-storage layout is bitwise identical to the memory layout.
Reimplemented in ROOT::Experimental::Internal::RColumnElement< RColumnSwitch, EColumnType::kSwitch >, ROOT::Experimental::Internal::RColumnElement< bool, EColumnType::kBit >, ROOT::Experimental::Internal::RColumnElement< float, EColumnType::kReal16 >, ROOT::Experimental::Internal::RColumnElement< char, EColumnType::kByte >, ROOT::Experimental::Internal::RColumnElement< char, EColumnType::kChar >, ROOT::Experimental::Internal::RColumnElement< float, EColumnType::kReal32 >, ROOT::Experimental::Internal::RColumnElement< float, EColumnType::kSplitReal32 >, ROOT::Experimental::Internal::RColumnElement< double, EColumnType::kReal64 >, ROOT::Experimental::Internal::RColumnElement< double, EColumnType::kSplitReal64 >, ROOT::Experimental::Internal::RColumnElement< double, EColumnType::kReal32 >, ROOT::Experimental::Internal::RColumnElement< double, EColumnType::kSplitReal32 >, ROOT::Experimental::Internal::RColumnElement< ClusterSize_t, EColumnType::kIndex64 >, ROOT::Experimental::Internal::RColumnElement< ClusterSize_t, EColumnType::kIndex32 >, ROOT::Experimental::Internal::RColumnElement< ClusterSize_t, EColumnType::kSplitIndex64 >, and ROOT::Experimental::Internal::RColumnElement< ClusterSize_t, EColumnType::kSplitIndex32 >.
Definition at line 290 of file RColumnElement.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.
Reimplemented in ROOT::Experimental::Internal::RColumnElementLE< CppT >, ROOT::Experimental::Internal::RColumnElementLE< double >, ROOT::Experimental::Internal::RColumnElementLE< float >, ROOT::Experimental::Internal::RColumnElementCastLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementCastLE< double, float >, ROOT::Experimental::Internal::RColumnElementSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementSplitLE< double, double >, ROOT::Experimental::Internal::RColumnElementSplitLE< double, float >, ROOT::Experimental::Internal::RColumnElementSplitLE< float, float >, ROOT::Experimental::Internal::RColumnElementDeltaSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementZigzagSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElement< RColumnSwitch, EColumnType::kSwitch >, ROOT::Experimental::Internal::RColumnElement< bool, EColumnType::kBit >, and ROOT::Experimental::Internal::RColumnElement< float, EColumnType::kReal16 >.
Definition at line 297 of file RColumnElement.hxx.
|
inlinevirtual |
If the on-storage layout and the in-memory layout differ, unpacking creates a memory page from an on-storage page.
Reimplemented in ROOT::Experimental::Internal::RColumnElementLE< CppT >, ROOT::Experimental::Internal::RColumnElementLE< double >, ROOT::Experimental::Internal::RColumnElementLE< float >, ROOT::Experimental::Internal::RColumnElementCastLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementCastLE< double, float >, ROOT::Experimental::Internal::RColumnElementSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementSplitLE< double, double >, ROOT::Experimental::Internal::RColumnElementSplitLE< double, float >, ROOT::Experimental::Internal::RColumnElementSplitLE< float, float >, ROOT::Experimental::Internal::RColumnElementDeltaSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElementZigzagSplitLE< CppT, NarrowT >, ROOT::Experimental::Internal::RColumnElement< RColumnSwitch, EColumnType::kSwitch >, ROOT::Experimental::Internal::RColumnElement< bool, EColumnType::kBit >, and ROOT::Experimental::Internal::RColumnElement< float, EColumnType::kReal16 >.
Definition at line 303 of file RColumnElement.hxx.
|
protected |
Definition at line 269 of file RColumnElement.hxx.
|
protected |
Size of the C++ value that corresponds to the on-disk element.
Definition at line 268 of file RColumnElement.hxx.