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 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::uint64_t bufSize, RClusterGroup &clusterGroup)
 
static RResult< std::uint32_t > DeserializeClusterSummary (const void *buffer, std::uint64_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::uint64_t bufSize, std::uint16_t expectedType)
 
static RResult< std::uint32_t > DeserializeEnvelope (const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType, std::uint64_t &xxhash3)
 
static RResult< std::uint32_t > DeserializeEnvelopeLink (const void *buffer, std::uint64_t bufSize, REnvelopeLink &envelopeLink)
 
static RResult< std::uint32_t > DeserializeFeatureFlags (const void *buffer, std::uint64_t bufSize, std::vector< std::uint64_t > &flags)
 
static RResult< std::uint16_t > DeserializeFieldStructure (const void *buffer, ROOT::Experimental::ENTupleStructure &structure)
 
static RResult< void > DeserializeFooter (const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
 
static RResult< std::uint32_t > DeserializeFrameHeader (const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize)
 
static RResult< std::uint32_t > DeserializeFrameHeader (const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize, std::uint32_t &nitems)
 
static RResult< void > DeserializeHeader (const void *buffer, std::uint64_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::uint64_t bufSize, RNTupleLocator &locator)
 
static RResult< void > DeserializePageList (const void *buffer, std::uint64_t bufSize, DescriptorId_t clusterGroupId, RNTupleDescriptor &desc)
 
static RResult< std::uint32_t > DeserializeSchemaDescription (const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
 
static RResult< std::uint32_t > DeserializeString (const void *buffer, std::uint64_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 SerializeEnvelopeLink (const REnvelopeLink &envelopeLink, void *buffer)
 
static std::uint32_t SerializeEnvelopePostscript (unsigned char *envelope, std::uint64_t size)
 
static std::uint32_t SerializeEnvelopePostscript (unsigned char *envelope, std::uint64_t size, std::uint64_t &xxhash3)
 
static std::uint32_t SerializeEnvelopePreamble (std::uint16_t envelopeType, void *buffer)
 
static std::uint32_t SerializeFeatureFlags (const std::vector< std::uint64_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 SerializeFooter (void *buffer, const RNTupleDescriptor &desc, const RContext &context)
 
static std::uint32_t SerializeFramePostscript (void *frame, std::uint64_t size)
 
static RContext SerializeHeader (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 SerializePageList (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 std::uint32_t SerializeXxHash3 (const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3, void *buffer)
 Writes a XxHash-3 64bit checksum of the byte range given by data and length.
 
static RResult< void > VerifyXxHash3 (const unsigned char *data, std::uint64_t length)
 
static RResult< void > VerifyXxHash3 (const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3)
 Expects an xxhash3 checksum in the 8 bytes following data + length and verifies it.
 

Static Public Attributes

static constexpr std::uint16_t kEnvelopeTypeFooter = 0x02
 
static constexpr std::uint16_t kEnvelopeTypeHeader = 0x01
 
static constexpr std::uint16_t kEnvelopeTypePageList = 0x03
 
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 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::uint64_t  bufSize,
RClusterGroup clusterGroup 
)
static

Definition at line 977 of file RNTupleSerialize.cxx.

◆ DeserializeClusterSummary()

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

Definition at line 923 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 536 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelope() [1/2]

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

Definition at line 677 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelope() [2/2]

RResult< std::uint32_t > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeEnvelope ( const void *  buffer,
std::uint64_t  bufSize,
std::uint16_t  expectedType,
std::uint64_t &  xxhash3 
)
static

Definition at line 645 of file RNTupleSerialize.cxx.

◆ DeserializeEnvelopeLink()

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

Definition at line 884 of file RNTupleSerialize.cxx.

◆ DeserializeFeatureFlags()

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

Definition at line 788 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 591 of file RNTupleSerialize.cxx.

◆ DeserializeFooter()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeFooter ( const void *  buffer,
std::uint64_t  bufSize,
RNTupleDescriptorBuilder descBuilder 
)
static

Definition at line 1419 of file RNTupleSerialize.cxx.

◆ DeserializeFrameHeader() [1/2]

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

Definition at line 756 of file RNTupleSerialize.cxx.

◆ DeserializeFrameHeader() [2/2]

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

Definition at line 722 of file RNTupleSerialize.cxx.

◆ DeserializeHeader()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeader ( const void *  buffer,
std::uint64_t  bufSize,
RNTupleDescriptorBuilder descBuilder 
)
static

Definition at line 1362 of file RNTupleSerialize.cxx.

◆ DeserializeInt16()

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

Definition at line 385 of file RNTupleSerialize.cxx.

◆ DeserializeInt32()

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

Definition at line 414 of file RNTupleSerialize.cxx.

◆ DeserializeInt64()

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

Definition at line 448 of file RNTupleSerialize.cxx.

◆ DeserializeLocator()

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

Definition at line 836 of file RNTupleSerialize.cxx.

◆ DeserializePageList()

ROOT::Experimental::RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::DeserializePageList ( const void *  buffer,
std::uint64_t  bufSize,
DescriptorId_t  clusterGroupId,
RNTupleDescriptor desc 
)
static

Definition at line 1512 of file RNTupleSerialize.cxx.

◆ DeserializeSchemaDescription()

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

Definition at line 1100 of file RNTupleSerialize.cxx.

◆ DeserializeString()

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

Definition at line 478 of file RNTupleSerialize.cxx.

◆ DeserializeUInt16()

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

Definition at line 397 of file RNTupleSerialize.cxx.

◆ DeserializeUInt32()

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

Definition at line 427 of file RNTupleSerialize.cxx.

◆ DeserializeUInt64()

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

Definition at line 463 of file RNTupleSerialize.cxx.

◆ SerializeClusterGroup()

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

Definition at line 958 of file RNTupleSerialize.cxx.

◆ SerializeClusterSummary()

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

Definition at line 901 of file RNTupleSerialize.cxx.

◆ SerializeColumnType()

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

Definition at line 499 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopeLink()

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

Definition at line 874 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePostscript() [1/2]

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

Definition at line 637 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePostscript() [2/2]

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopePostscript ( unsigned char *  envelope,
std::uint64_t  size,
std::uint64_t &  xxhash3 
)
static

Definition at line 620 of file RNTupleSerialize.cxx.

◆ SerializeEnvelopePreamble()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeEnvelopePreamble ( std::uint16_t  envelopeType,
void *  buffer 
)
static

Definition at line 609 of file RNTupleSerialize.cxx.

◆ SerializeFeatureFlags()

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

Definition at line 764 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 576 of file RNTupleSerialize.cxx.

◆ SerializeFooter()

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

Definition at line 1310 of file RNTupleSerialize.cxx.

◆ SerializeFramePostscript()

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

Definition at line 706 of file RNTupleSerialize.cxx.

◆ SerializeHeader()

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

Definition at line 1218 of file RNTupleSerialize.cxx.

◆ SerializeInt16()

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

Definition at line 375 of file RNTupleSerialize.cxx.

◆ SerializeInt32()

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

Definition at line 402 of file RNTupleSerialize.cxx.

◆ SerializeInt64()

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

Definition at line 432 of file RNTupleSerialize.cxx.

◆ SerializeListFramePreamble()

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

Definition at line 693 of file RNTupleSerialize.cxx.

◆ SerializeLocator()

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

Definition at line 806 of file RNTupleSerialize.cxx.

◆ SerializePageList()

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

Definition at line 1247 of file RNTupleSerialize.cxx.

◆ SerializeRecordFramePreamble()

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

Definition at line 686 of file RNTupleSerialize.cxx.

◆ SerializeSchemaDescription()

std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::SerializeSchemaDescription ( void *  buffer,
const RNTupleDescriptor desc,
const RContext context,
bool  forHeaderExtension = false 
)
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 1048 of file RNTupleSerialize.cxx.

◆ SerializeString()

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

Definition at line 468 of file RNTupleSerialize.cxx.

◆ SerializeUInt16()

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

Definition at line 392 of file RNTupleSerialize.cxx.

◆ SerializeUInt32()

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

Definition at line 422 of file RNTupleSerialize.cxx.

◆ SerializeUInt64()

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

Definition at line 458 of file RNTupleSerialize.cxx.

◆ SerializeXxHash3()

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

Writes a XxHash-3 64bit checksum of the byte range given by data and length.

Definition at line 345 of file RNTupleSerialize.cxx.

◆ VerifyXxHash3() [1/2]

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

Definition at line 368 of file RNTupleSerialize.cxx.

◆ VerifyXxHash3() [2/2]

RResult< void > ROOT::Experimental::Internal::RNTupleSerializer::VerifyXxHash3 ( const unsigned char *  data,
std::uint64_t  length,
std::uint64_t &  xxhash3 
)
static

Expects an xxhash3 checksum in the 8 bytes following data + length and verifies it.

Definition at line 356 of file RNTupleSerialize.cxx.

Member Data Documentation

◆ kEnvelopeTypeFooter

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

Definition at line 58 of file RNTupleSerialize.hxx.

◆ kEnvelopeTypeHeader

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

Definition at line 57 of file RNTupleSerialize.hxx.

◆ kEnvelopeTypePageList

constexpr std::uint16_t ROOT::Experimental::Internal::RNTupleSerializer::kEnvelopeTypePageList = 0x03
staticconstexpr

Definition at line 59 of file RNTupleSerialize.hxx.

◆ kFlagDeferredColumn

constexpr std::uint32_t ROOT::Experimental::Internal::RNTupleSerializer::kFlagDeferredColumn = 0x08
staticconstexpr

Definition at line 66 of file RNTupleSerialize.hxx.

◆ kFlagNonNegativeColumn

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

Definition at line 65 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 63 of file RNTupleSerialize.hxx.

◆ kFlagSortDesColumn

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

Definition at line 64 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: