A helper class for serializing and deserialization of the RNTuple binary format.
All serialization and deserialization routines return the number of bytes processed (written or read).
The serialization routines can be called with a nullptr buffer, in which case only the size required to perform a serialization is returned. Deserialization routines must be called with a buffer that is sufficiently large.
Deserialization errors throw exceptions. Only when indicated or when passed as a parameter is the buffer size checked.
Definition at line 55 of file RNTupleSerialize.hxx.
Classes | |
struct | RClusterGroup |
struct | RClusterSummary |
class | RContext |
The serialization context is used for the piecewise serialization of a descriptor. More... | |
struct | REnvelopeLink |
Static Public Member Functions | |
static RResult< std::uint32_t > | DeserializeClusterGroup (const void *buffer, std::uint32_t bufSize, RClusterGroup &clusterGroup) |
static RResult< std::uint32_t > | DeserializeClusterSummary (const void *buffer, std::uint32_t bufSize, RClusterSummary &clusterSummary) |
static RResult< std::uint16_t > | DeserializeColumnType (const void *buffer, ROOT::Experimental::EColumnType &type) |
static RResult< std::uint32_t > | DeserializeEnvelope (const void *buffer, std::uint32_t bufSize) |
static RResult< std::uint32_t > | DeserializeEnvelope (const void *buffer, std::uint32_t bufSize, std::uint32_t &crc32) |
Currently all enevelopes have the same version number (1). | |
static RResult< std::uint32_t > | DeserializeEnvelopeLink (const void *buffer, std::uint32_t bufSize, REnvelopeLink &envelopeLink) |
static RResult< std::uint32_t > | DeserializeFeatureFlags (const void *buffer, std::uint32_t bufSize, std::vector< std::int64_t > &flags) |
static RResult< std::uint16_t > | DeserializeFieldStructure (const void *buffer, ROOT::Experimental::ENTupleStructure &structure) |
static RResult< void > | DeserializeFooterV1 (const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder) |
static RResult< std::uint32_t > | DeserializeFrameHeader (const void *buffer, std::uint32_t bufSize, std::uint32_t &frameSize) |
static RResult< std::uint32_t > | DeserializeFrameHeader (const void *buffer, std::uint32_t bufSize, std::uint32_t &frameSize, std::uint32_t &nitems) |
static RResult< void > | DeserializeHeaderV1 (const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder) |
static std::uint32_t | DeserializeInt16 (const void *buffer, std::int16_t &val) |
static std::uint32_t | DeserializeInt32 (const void *buffer, std::int32_t &val) |
static std::uint32_t | DeserializeInt64 (const void *buffer, std::int64_t &val) |
static RResult< std::uint32_t > | DeserializeLocator (const void *buffer, std::uint32_t bufSize, RNTupleLocator &locator) |
static RResult< void > | DeserializePageListV1 (const void *buffer, std::uint32_t bufSize, std::vector< RClusterDescriptorBuilder > &clusters) |
static RResult< std::uint32_t > | DeserializeSchemaDescription (const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder) |
static RResult< std::uint32_t > | DeserializeString (const void *buffer, std::uint32_t bufSize, std::string &val) |
static std::uint32_t | DeserializeUInt16 (const void *buffer, std::uint16_t &val) |
static std::uint32_t | DeserializeUInt32 (const void *buffer, std::uint32_t &val) |
static std::uint32_t | DeserializeUInt64 (const void *buffer, std::uint64_t &val) |
static std::uint32_t | SerializeClusterGroup (const RClusterGroup &clusterGroup, void *buffer) |
static std::uint32_t | SerializeClusterSummary (const RClusterSummary &clusterSummary, void *buffer) |
static std::uint16_t | SerializeColumnType (ROOT::Experimental::EColumnType type, void *buffer) |
static std::uint32_t | SerializeCRC32 (const unsigned char *data, std::uint32_t length, std::uint32_t &crc32, void *buffer) |
Writes a CRC32 checksum of the byte range given by data and length. | |
static std::uint32_t | SerializeEnvelopeLink (const REnvelopeLink &envelopeLink, void *buffer) |
static std::uint32_t | SerializeEnvelopePostscript (const unsigned char *envelope, std::uint32_t size, std::uint32_t &crc32, void *buffer) |
static std::uint32_t | SerializeEnvelopePostscript (const unsigned char *envelope, std::uint32_t size, void *buffer) |
static std::uint32_t | SerializeEnvelopePreamble (void *buffer) |
Currently all enevelopes have the same version number (1). | |
static std::uint32_t | SerializeFeatureFlags (const std::vector< std::int64_t > &flags, void *buffer) |
static std::uint16_t | SerializeFieldStructure (ROOT::Experimental::ENTupleStructure structure, void *buffer) |
While we could just interpret the enums as ints, we make the translation explicit in order to avoid accidentally changing the on-disk numbers when adjusting the enum classes. | |
static std::uint32_t | SerializeFooterV1 (void *buffer, const RNTupleDescriptor &desc, const RContext &context) |
static std::uint32_t | SerializeFramePostscript (void *frame, std::int32_t size) |
static RContext | SerializeHeaderV1 (void *buffer, const RNTupleDescriptor &desc) |
static std::uint32_t | SerializeInt16 (std::int16_t val, void *buffer) |
static std::uint32_t | SerializeInt32 (std::int32_t val, void *buffer) |
static std::uint32_t | SerializeInt64 (std::int64_t val, void *buffer) |
static std::uint32_t | SerializeListFramePreamble (std::uint32_t nitems, void *buffer) |
static std::uint32_t | SerializeLocator (const RNTupleLocator &locator, void *buffer) |
static std::uint32_t | SerializePageListV1 (void *buffer, const RNTupleDescriptor &desc, std::span< DescriptorId_t > physClusterIDs, const RContext &context) |
static std::uint32_t | SerializeRecordFramePreamble (void *buffer) |
static std::uint32_t | SerializeSchemaDescription (void *buffer, const RNTupleDescriptor &desc, const RContext &context, bool forHeaderExtension=false) |
Serialize the schema description in desc into buffer . | |
static std::uint32_t | SerializeString (const std::string &val, void *buffer) |
static std::uint32_t | SerializeUInt16 (std::uint16_t val, void *buffer) |
static std::uint32_t | SerializeUInt32 (std::uint32_t val, void *buffer) |
static std::uint32_t | SerializeUInt64 (std::uint64_t val, void *buffer) |
static RResult< void > | VerifyCRC32 (const unsigned char *data, std::uint32_t length) |
static RResult< void > | VerifyCRC32 (const unsigned char *data, std::uint32_t length, std::uint32_t &crc32) |
Expects a CRC32 checksum in the 4 bytes following data + length and verifies it. | |
Static Public Attributes | |
static constexpr std::uint16_t | kEnvelopeCurrentVersion = 1 |
In order to handle changes to the serialization routine in future ntuple versions. | |
static constexpr std::uint16_t | kEnvelopeMinVersion = 1 |
static constexpr std::uint32_t | kFlagDeferredColumn = 0x08 |
static constexpr std::uint32_t | kFlagNonNegativeColumn = 0x04 |
static constexpr std::uint16_t | kFlagRepetitiveField = 0x01 |
static constexpr std::uint32_t | kFlagSortAscColumn = 0x01 |
static constexpr std::uint32_t | kFlagSortDesColumn = 0x02 |
static constexpr std::uint32_t | kReleaseCandidateTag = 1 |
static constexpr DescriptorId_t | kZeroFieldId = std::uint64_t(-2) |
#include <ROOT/RNTupleSerialize.hxx>
|
static |
Definition at line 986 of file RNTupleSerialize.cxx.
|
static |
Definition at line 934 of file RNTupleSerialize.cxx.
|
static |
Definition at line 541 of file RNTupleSerialize.cxx.
|
static |
Definition at line 691 of file RNTupleSerialize.cxx.
|
static |
Currently all enevelopes have the same version number (1).
At a later point, different envelope types may have different version numbers
Definition at line 660 of file RNTupleSerialize.cxx.
|
static |
Definition at line 895 of file RNTupleSerialize.cxx.
|
static |
Definition at line 801 of file RNTupleSerialize.cxx.
|
static |
Definition at line 602 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1429 of file RNTupleSerialize.cxx.
|
static |
Definition at line 771 of file RNTupleSerialize.cxx.
|
static |
Definition at line 740 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1368 of file RNTupleSerialize.cxx.
|
static |
Definition at line 391 of file RNTupleSerialize.cxx.
|
static |
Definition at line 420 of file RNTupleSerialize.cxx.
|
static |
Definition at line 454 of file RNTupleSerialize.cxx.
|
static |
Definition at line 849 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1541 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1107 of file RNTupleSerialize.cxx.
|
static |
Definition at line 484 of file RNTupleSerialize.cxx.
|
static |
Definition at line 403 of file RNTupleSerialize.cxx.
|
static |
Definition at line 433 of file RNTupleSerialize.cxx.
|
static |
Definition at line 469 of file RNTupleSerialize.cxx.
|
static |
Definition at line 969 of file RNTupleSerialize.cxx.
|
static |
Definition at line 912 of file RNTupleSerialize.cxx.
|
static |
Definition at line 504 of file RNTupleSerialize.cxx.
|
static |
Writes a CRC32 checksum of the byte range given by data and length.
Definition at line 350 of file RNTupleSerialize.cxx.
|
static |
Definition at line 886 of file RNTupleSerialize.cxx.
|
static |
Definition at line 645 of file RNTupleSerialize.cxx.
|
static |
Definition at line 651 of file RNTupleSerialize.cxx.
|
static |
Currently all enevelopes have the same version number (1).
At a later point, different envelope types may have different version numbers
Definition at line 633 of file RNTupleSerialize.cxx.
|
static |
Definition at line 778 of file RNTupleSerialize.cxx.
|
static |
While we could just interpret the enums as ints, we make the translation explicit in order to avoid accidentally changing the on-disk numbers when adjusting the enum classes.
Definition at line 581 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1301 of file RNTupleSerialize.cxx.
|
static |
Definition at line 722 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1225 of file RNTupleSerialize.cxx.
|
static |
Definition at line 381 of file RNTupleSerialize.cxx.
|
static |
Definition at line 408 of file RNTupleSerialize.cxx.
|
static |
Definition at line 438 of file RNTupleSerialize.cxx.
|
static |
Definition at line 706 of file RNTupleSerialize.cxx.
|
static |
Definition at line 819 of file RNTupleSerialize.cxx.
|
static |
Definition at line 1254 of file RNTupleSerialize.cxx.
|
static |
Definition at line 699 of file RNTupleSerialize.cxx.
|
static |
Serialize the schema description in desc
into buffer
.
If forHeaderExtension
is true, serialize only the fields and columns tagged as part of the header extension (see RNTupleDescriptorBuilder::BeginHeaderExtension
).
Definition at line 1055 of file RNTupleSerialize.cxx.
|
static |
Definition at line 474 of file RNTupleSerialize.cxx.
|
static |
Definition at line 398 of file RNTupleSerialize.cxx.
|
static |
Definition at line 428 of file RNTupleSerialize.cxx.
|
static |
Definition at line 464 of file RNTupleSerialize.cxx.
|
static |
Definition at line 373 of file RNTupleSerialize.cxx.
|
static |
Expects a CRC32 checksum in the 4 bytes following data + length and verifies it.
Definition at line 361 of file RNTupleSerialize.cxx.
|
staticconstexpr |
In order to handle changes to the serialization routine in future ntuple versions.
Definition at line 58 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 59 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 67 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 66 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 62 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 64 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 65 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 60 of file RNTupleSerialize.hxx.
|
staticconstexpr |
Definition at line 69 of file RNTupleSerialize.hxx.