Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::RNTupleSerializer Class Reference

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 54 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< voidDeserializeFooterV1 (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< voidDeserializeHeaderV1 (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< voidDeserializePageListV1 (const void *buffer, std::uint32_t bufSize, std::vector< RClusterDescriptorBuilder > &clusters)
 
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 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< voidVerifyCRC32 (const unsigned char *data, std::uint32_t length)
 
static RResult< voidVerifyCRC32 (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::uint16_t kFlagAliasField = 0x02
 
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>

Member Function Documentation

◆ DeserializeClusterGroup()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeClusterGroup ( const void buffer,
std::uint32_t  bufSize,
RClusterGroup clusterGroup 
)
static

Definition at line 902 of file RNTupleSerialize.cxx.

◆ DeserializeClusterSummary()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeClusterSummary ( const void buffer,
std::uint32_t  bufSize,
RClusterSummary clusterSummary 
)
static

Definition at line 850 of file RNTupleSerialize.cxx.

◆ DeserializeColumnType()

RResult< std::uint16_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeColumnType ( const void buffer,
ROOT::Experimental::EColumnType type 
)
static

Definition at line 453 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelope() [1/2]

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeEnvelope ( const void buffer,
std::uint32_t  bufSize 
)
static

Definition at line 613 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelope() [2/2]

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeEnvelope ( const void buffer,
std::uint32_t  bufSize,
std::uint32_t &  crc32 
)
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 582 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelopeLink()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeEnvelopeLink ( const void buffer,
std::uint32_t  bufSize,
REnvelopeLink envelopeLink 
)
static

Definition at line 811 of file RNTupleSerialize.cxx.

◆ DeserializeFeatureFlags()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFeatureFlags ( const void buffer,
std::uint32_t  bufSize,
std::vector< std::int64_t > &  flags 
)
static

Definition at line 723 of file RNTupleSerialize.cxx.

◆ DeserializeFieldStructure()

RResult< std::uint16_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFieldStructure ( const void buffer,
ROOT::Experimental::ENTupleStructure structure 
)
static

Definition at line 524 of file RNTupleSerialize.cxx.

◆ DeserializeFooterV1()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFooterV1 ( const void buffer,
std::uint32_t  bufSize,
RNTupleDescriptorBuilder descBuilder 
)
static

Definition at line 1211 of file RNTupleSerialize.cxx.

◆ DeserializeFrameHeader() [1/2]

ROOT::Experimental::RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFrameHeader ( const void buffer,
std::uint32_t  bufSize,
std::uint32_t &  frameSize 
)
static

Definition at line 693 of file RNTupleSerialize.cxx.

◆ DeserializeFrameHeader() [2/2]

ROOT::Experimental::RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFrameHeader ( const void buffer,
std::uint32_t  bufSize,
std::uint32_t &  frameSize,
std::uint32_t &  nitems 
)
static

Definition at line 662 of file RNTupleSerialize.cxx.

◆ DeserializeHeaderV1()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeaderV1 ( const void buffer,
std::uint32_t  bufSize,
RNTupleDescriptorBuilder descBuilder 
)
static

Definition at line 1075 of file RNTupleSerialize.cxx.

◆ DeserializeInt16()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeInt16 ( const void buffer,
std::int16_t &  val 
)
static

Definition at line 305 of file RNTupleSerialize.cxx.

◆ DeserializeInt32()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeInt32 ( const void buffer,
std::int32_t &  val 
)
static

Definition at line 334 of file RNTupleSerialize.cxx.

◆ DeserializeInt64()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeInt64 ( const void buffer,
std::int64_t &  val 
)
static

Definition at line 368 of file RNTupleSerialize.cxx.

◆ DeserializeLocator()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeLocator ( const void buffer,
std::uint32_t  bufSize,
RNTupleLocator locator 
)
static

Definition at line 765 of file RNTupleSerialize.cxx.

◆ DeserializePageListV1()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializePageListV1 ( const void buffer,
std::uint32_t  bufSize,
std::vector< RClusterDescriptorBuilder > &  clusters 
)
static

Definition at line 1309 of file RNTupleSerialize.cxx.

◆ DeserializeString()

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeString ( const void buffer,
std::uint32_t  bufSize,
std::string &  val 
)
static

Definition at line 398 of file RNTupleSerialize.cxx.

◆ DeserializeUInt16()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeUInt16 ( const void buffer,
std::uint16_t &  val 
)
static

Definition at line 317 of file RNTupleSerialize.cxx.

◆ DeserializeUInt32()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeUInt32 ( const void buffer,
std::uint32_t &  val 
)
static

Definition at line 347 of file RNTupleSerialize.cxx.

◆ DeserializeUInt64()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::DeserializeUInt64 ( const void buffer,
std::uint64_t &  val 
)
static

Definition at line 383 of file RNTupleSerialize.cxx.

◆ SerializeClusterGroup()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeClusterGroup ( const RClusterGroup clusterGroup,
void buffer 
)
static

Definition at line 885 of file RNTupleSerialize.cxx.

◆ SerializeClusterSummary()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeClusterSummary ( const RClusterSummary clusterSummary,
void buffer 
)
static

Definition at line 828 of file RNTupleSerialize.cxx.

◆ SerializeColumnType()

std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeColumnType ( ROOT::Experimental::EColumnType  type,
void buffer 
)
static

Definition at line 418 of file RNTupleSerialize.cxx.

◆ SerializeCRC32()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeCRC32 ( const unsigned char *  data,
std::uint32_t  length,
std::uint32_t &  crc32,
void buffer 
)
static

Writes a CRC32 checksum of the byte range given by data and length.

Definition at line 264 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopeLink()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopeLink ( const REnvelopeLink envelopeLink,
void buffer 
)
static

Definition at line 802 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePostscript() [1/2]

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopePostscript ( const unsigned char *  envelope,
std::uint32_t  size,
std::uint32_t &  crc32,
void buffer 
)
static

Definition at line 567 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePostscript() [2/2]

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopePostscript ( const unsigned char *  envelope,
std::uint32_t  size,
void buffer 
)
static

Definition at line 573 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePreamble()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopePreamble ( void buffer)
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 555 of file RNTupleSerialize.cxx.

◆ SerializeFeatureFlags()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeFeatureFlags ( const std::vector< std::int64_t > &  flags,
void buffer 
)
static

Definition at line 700 of file RNTupleSerialize.cxx.

◆ SerializeFieldStructure()

std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeFieldStructure ( ROOT::Experimental::ENTupleStructure  structure,
void buffer 
)
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 503 of file RNTupleSerialize.cxx.

◆ SerializeFooterV1()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeFooterV1 ( void buffer,
const RNTupleDescriptor desc,
const RContext context 
)
static

Definition at line 1021 of file RNTupleSerialize.cxx.

◆ SerializeFramePostscript()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeFramePostscript ( void frame,
std::int32_t  size 
)
static

Definition at line 644 of file RNTupleSerialize.cxx.

◆ SerializeHeaderV1()

ROOT::Experimental::Internal::RNTupleSerializer::RContext ROOT::Experimental::Internal::RNTupleSerializer::SerializeHeaderV1 ( void buffer,
const RNTupleDescriptor desc 
)
static

Definition at line 928 of file RNTupleSerialize.cxx.

◆ SerializeInt16()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeInt16 ( std::int16_t  val,
void buffer 
)
static

Definition at line 295 of file RNTupleSerialize.cxx.

◆ SerializeInt32()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeInt32 ( std::int32_t  val,
void buffer 
)
static

Definition at line 322 of file RNTupleSerialize.cxx.

◆ SerializeInt64()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeInt64 ( std::int64_t  val,
void buffer 
)
static

Definition at line 352 of file RNTupleSerialize.cxx.

◆ SerializeListFramePreamble()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeListFramePreamble ( std::uint32_t  nitems,
void buffer 
)
static

Definition at line 628 of file RNTupleSerialize.cxx.

◆ SerializeLocator()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeLocator ( const RNTupleLocator locator,
void buffer 
)
static

Definition at line 741 of file RNTupleSerialize.cxx.

◆ SerializePageListV1()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializePageListV1 ( void buffer,
const RNTupleDescriptor desc,
std::span< DescriptorId_t physClusterIDs,
const RContext context 
)
static

Definition at line 975 of file RNTupleSerialize.cxx.

◆ SerializeRecordFramePreamble()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeRecordFramePreamble ( void buffer)
static

Definition at line 621 of file RNTupleSerialize.cxx.

◆ SerializeString()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeString ( const std::string &  val,
void buffer 
)
static

Definition at line 388 of file RNTupleSerialize.cxx.

◆ SerializeUInt16()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeUInt16 ( std::uint16_t  val,
void buffer 
)
static

Definition at line 312 of file RNTupleSerialize.cxx.

◆ SerializeUInt32()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeUInt32 ( std::uint32_t  val,
void buffer 
)
static

Definition at line 342 of file RNTupleSerialize.cxx.

◆ SerializeUInt64()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeUInt64 ( std::uint64_t  val,
void buffer 
)
static

Definition at line 378 of file RNTupleSerialize.cxx.

◆ VerifyCRC32() [1/2]

RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::VerifyCRC32 ( const unsigned char *  data,
std::uint32_t  length 
)
static

Definition at line 287 of file RNTupleSerialize.cxx.

◆ VerifyCRC32() [2/2]

RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::VerifyCRC32 ( const unsigned char *  data,
std::uint32_t  length,
std::uint32_t &  crc32 
)
static

Expects a CRC32 checksum in the 4 bytes following data + length and verifies it.

Definition at line 275 of file RNTupleSerialize.cxx.

Member Data Documentation

◆ kEnvelopeCurrentVersion

constexpr std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::kEnvelopeCurrentVersion = 1
staticconstexpr

In order to handle changes to the serialization routine in future ntuple versions.

Definition at line 57 of file RNTupleSerialize.hxx.

◆ kEnvelopeMinVersion

constexpr std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::kEnvelopeMinVersion = 1
staticconstexpr

Definition at line 58 of file RNTupleSerialize.hxx.

◆ kFlagAliasField

constexpr std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagAliasField = 0x02
staticconstexpr

Definition at line 62 of file RNTupleSerialize.hxx.

◆ kFlagNonNegativeColumn

constexpr std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagNonNegativeColumn = 0x04
staticconstexpr

Definition at line 66 of file RNTupleSerialize.hxx.

◆ kFlagRepetitiveField

constexpr std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagRepetitiveField = 0x01
staticconstexpr

Definition at line 61 of file RNTupleSerialize.hxx.

◆ kFlagSortAscColumn

constexpr std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagSortAscColumn = 0x01
staticconstexpr

Definition at line 64 of file RNTupleSerialize.hxx.

◆ kFlagSortDesColumn

constexpr std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagSortDesColumn = 0x02
staticconstexpr

Definition at line 65 of file RNTupleSerialize.hxx.

◆ kReleaseCandidateTag

constexpr std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::kReleaseCandidateTag = 1
staticconstexpr

Definition at line 59 of file RNTupleSerialize.hxx.

◆ kZeroFieldId

constexpr DescriptorId_t ROOT::Experimental::Internal::RNTupleSerializer::kZeroFieldId = std::uint64_t(-2)
staticconstexpr

Definition at line 68 of file RNTupleSerialize.hxx.

Libraries for ROOT::Experimental::Internal::RNTupleSerializer:

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