17#ifndef ROOT7_RNTupleSerialize
18#define ROOT7_RNTupleSerialize
30#include <unordered_map>
36namespace Experimental {
40class RClusterDescriptor;
41class RNTupleDescriptor;
45class RClusterDescriptorBuilder;
46class RNTupleDescriptorBuilder;
131 return (*
p.first).second;
144 return (*
p.first).second;
196 static std::uint32_t
SerializeInt16(std::int16_t val,
void *buffer);
197 static std::uint32_t
DeserializeInt16(
const void *buffer, std::int16_t &val);
201 static std::uint32_t
SerializeInt32(std::int32_t val,
void *buffer);
202 static std::uint32_t
DeserializeInt32(
const void *buffer, std::int32_t &val);
206 static std::uint32_t
SerializeInt64(std::int64_t val,
void *buffer);
207 static std::uint32_t
DeserializeInt64(
const void *buffer, std::int64_t &val);
211 static std::uint32_t
SerializeString(
const std::string &val,
void *buffer);
231 DeserializeEnvelope(
const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType);
233 DeserializeEnvelope(
const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType, std::uint64_t &xxhash3);
265 bool forHeaderExtension =
false);
271 std::span<DescriptorId_t> physClusterIDs,
const RContext &context);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t nitems
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The available trivial, native content types of a column.
A helper class for piece-wise construction of an RNTupleDescriptor.
The serialization context is used for the piecewise serialization of a descriptor.
DescriptorId_t MapClusterId(DescriptorId_t memId)
DescriptorId_t GetOnDiskColumnId(DescriptorId_t memId) const
const std::vector< DescriptorId_t > & GetOnDiskFieldList() const
Return a vector containing the in-memory field ID for each on-disk counterpart, in order,...
std::map< DescriptorId_t, DescriptorId_t > fMem2OnDiskClusterIDs
std::uint64_t fHeaderSize
DescriptorId_t GetOnDiskFieldId(DescriptorId_t memId) const
std::uint64_t GetHeaderSize() const
DescriptorId_t GetMemColumnId(DescriptorId_t onDiskId) const
std::uint64_t fHeaderXxHash3
DescriptorId_t MapFieldId(DescriptorId_t memId)
Map an in-memory field ID to its on-disk counterpart.
DescriptorId_t GetMemFieldId(DescriptorId_t onDiskId) const
std::size_t fHeaderExtensionOffset
std::vector< DescriptorId_t > fOnDisk2MemFieldIDs
std::vector< DescriptorId_t > fOnDisk2MemClusterGroupIDs
std::uint64_t GetHeaderXxHash3() const
void SetHeaderXxHash3(std::uint64_t xxhash3)
std::map< DescriptorId_t, DescriptorId_t > fMem2OnDiskFieldIDs
std::map< DescriptorId_t, DescriptorId_t > fMem2OnDiskColumnIDs
std::vector< DescriptorId_t > fOnDisk2MemClusterIDs
std::size_t GetHeaderExtensionOffset() const
Return the offset of the first element in fOnDisk2MemFieldIDs that is part of the schema extension.
std::map< DescriptorId_t, DescriptorId_t > fMem2OnDiskClusterGroupIDs
DescriptorId_t GetMemClusterGroupId(DescriptorId_t onDiskId) const
DescriptorId_t GetMemClusterId(DescriptorId_t onDiskId) const
void SetHeaderSize(std::uint64_t size)
DescriptorId_t MapClusterGroupId(DescriptorId_t memId)
std::vector< DescriptorId_t > fOnDisk2MemColumnIDs
DescriptorId_t GetOnDiskClusterGroupId(DescriptorId_t memId) const
DescriptorId_t GetOnDiskClusterId(DescriptorId_t memId) const
void BeginHeaderExtension()
Mark the first on-disk field ID that is part of the schema extension.
DescriptorId_t MapPhysicalColumnId(DescriptorId_t memId)
Map an in-memory column ID to its on-disk counterpart.
void MapSchema(const RNTupleDescriptor &desc, bool forHeaderExtension)
Map in-memory field and column IDs to their on-disk counterparts.
A helper class for serializing and deserialization of the RNTuple binary format.
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 constexpr std::uint16_t kFlagHasTypeChecksum
static RResult< std::uint32_t > DeserializeClusterSummary(const void *buffer, std::uint64_t bufSize, RClusterSummary &clusterSummary)
static std::uint32_t SerializeListFramePreamble(std::uint32_t nitems, void *buffer)
static constexpr std::uint16_t kFlagDeferredColumn
static constexpr std::uint16_t kEnvelopeTypeHeader
static RResult< std::uint32_t > DeserializeClusterGroup(const void *buffer, std::uint64_t bufSize, RClusterGroup &clusterGroup)
static std::uint32_t SerializeEnvelopePostscript(unsigned char *envelope, std::uint64_t size)
static std::uint32_t SerializeColumnType(ROOT::Experimental::EColumnType type, void *buffer)
static RContext SerializeHeader(void *buffer, const RNTupleDescriptor &desc)
static RResult< std::uint32_t > DeserializeColumnType(const void *buffer, ROOT::Experimental::EColumnType &type)
static std::uint32_t SerializeFeatureFlags(const std::vector< std::uint64_t > &flags, void *buffer)
static RResult< std::uint32_t > DeserializeExtraTypeInfoId(const void *buffer, ROOT::Experimental::EExtraTypeInfoIds &id)
static constexpr std::uint16_t kFlagRepetitiveField
static std::uint32_t DeserializeUInt16(const void *buffer, std::uint16_t &val)
static RResult< void > DeserializeHeader(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< void > DeserializeFooter(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t SerializeString(const std::string &val, void *buffer)
static std::string SerializeStreamerInfos(const StreamerInfoMap_t &infos)
static RResult< std::uint32_t > DeserializeFrameHeader(const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize, std::uint32_t &nitems)
static std::uint32_t SerializePageList(void *buffer, const RNTupleDescriptor &desc, std::span< DescriptorId_t > physClusterIDs, const RContext &context)
static std::uint32_t DeserializeUInt32(const void *buffer, std::uint32_t &val)
static std::uint32_t SerializeUInt64(std::uint64_t val, void *buffer)
static std::uint32_t SerializeEnvelopePreamble(std::uint16_t envelopeType, void *buffer)
static std::uint32_t DeserializeInt16(const void *buffer, std::int16_t &val)
static RResult< std::uint32_t > DeserializeFieldStructure(const void *buffer, ROOT::Experimental::ENTupleStructure &structure)
static std::uint32_t SerializeClusterSummary(const RClusterSummary &clusterSummary, void *buffer)
static RResult< StreamerInfoMap_t > DeserializeStreamerInfos(const std::string &extraTypeInfoContent)
static constexpr std::uint16_t kFlagProjectedField
static std::uint32_t SerializeFramePostscript(void *frame, std::uint64_t size)
static std::uint32_t SerializeInt16(std::int16_t val, void *buffer)
static RResult< void > DeserializePageList(const void *buffer, std::uint64_t bufSize, DescriptorId_t clusterGroupId, RNTupleDescriptor &desc)
static std::uint32_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 a...
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 constexpr std::uint16_t kFlagHasValueRange
static RResult< std::uint32_t > DeserializeSchemaDescription(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
std::map< Int_t, TVirtualStreamerInfo * > StreamerInfoMap_t
static std::uint32_t SerializeLocator(const RNTupleLocator &locator, void *buffer)
static std::uint32_t SerializeInt32(std::int32_t val, void *buffer)
static constexpr std::uint16_t kEnvelopeTypePageList
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 std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static RResult< std::uint32_t > DeserializeFeatureFlags(const void *buffer, std::uint64_t bufSize, std::vector< std::uint64_t > &flags)
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 std::uint32_t SerializeEnvelopeLink(const REnvelopeLink &envelopeLink, void *buffer)
static RResult< std::uint32_t > DeserializeString(const void *buffer, std::uint64_t bufSize, std::string &val)
static std::uint32_t SerializeRecordFramePreamble(void *buffer)
static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer)
static constexpr std::uint16_t kEnvelopeTypeFooter
static std::uint32_t SerializeClusterGroup(const RClusterGroup &clusterGroup, void *buffer)
static RResult< std::uint32_t > DeserializeEnvelopeLink(const void *buffer, std::uint64_t bufSize, REnvelopeLink &envelopeLink)
static std::uint32_t SerializeFooter(void *buffer, const RNTupleDescriptor &desc, const RContext &context)
static std::uint32_t SerializeInt64(std::int64_t val, void *buffer)
static RResult< std::uint32_t > DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType)
static constexpr DescriptorId_t kZeroFieldId
static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
static constexpr int64_t kSuppressedColumnMarker
static RResult< std::uint32_t > DeserializeLocator(const void *buffer, std::uint64_t bufSize, RNTupleLocator &locator)
static std::uint32_t SerializeExtraTypeInfoId(ROOT::Experimental::EExtraTypeInfoIds id, void *buffer)
The on-storage meta-data of an ntuple.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
Abstract Interface class describing Streamer information for one class.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
EExtraTypeInfoIds
Used in RExtraTypeInfoDescriptor.
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
REnvelopeLink fPageListEnvelopeLink
std::uint64_t fFirstEntry
Generic information about the physical location of data.