Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleSerialize.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleSerialize.hxx
2/// \author Jakob Blomer <jblomer@cern.ch>
3/// \author Javier Lopez-Gomez <javier.lopez.gomez@cern.ch>
4/// \date 2021-08-02
5
6/*************************************************************************
7 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
8 * All rights reserved. *
9 * *
10 * For the licensing terms see $ROOTSYS/LICENSE. *
11 * For the list of contributors see $ROOTSYS/README/CREDITS. *
12 *************************************************************************/
13
14#ifndef ROOT_RNTupleSerialize
15#define ROOT_RNTupleSerialize
16
17#include <ROOT/RError.hxx>
18#include <ROOT/RNTupleTypes.hxx>
19#include <ROOT/RSpan.hxx>
20
21#include <Rtypes.h>
22
23#include <cstdint>
24#include <limits>
25#include <map>
26#include <string>
27#include <unordered_map>
28#include <vector>
29
31
32namespace ROOT {
33
34class RNTupleDescriptor;
35class RClusterDescriptor;
36enum class EExtraTypeInfoIds;
37class RNTupleAttrSetDescriptor;
38
39namespace Internal {
40
41class RNTupleAttrSetDescriptorBuilder;
42class RClusterDescriptorBuilder;
43class RNTupleDescriptorBuilder;
44
45// clang-format off
46/**
47\class ROOT::Internal::RNTupleSerializer
48\ingroup NTuple
49\brief A helper class for serializing and deserialization of the RNTuple binary format
50
51All serialization and deserialization routines return the number of bytes processed (written or read).
52
53The serialization routines can be called with a nullptr buffer, in which case only the size required to perform
54a serialization is returned. Deserialization routines must be called with a buffer that is sufficiently large.
55
56Deserialization errors throw exceptions. Only when indicated or when passed as a parameter is the buffer size checked.
57*/
58// clang-format on
61 DeserializePageListRaw(const void *buffer, std::uint64_t bufSize, ROOT::DescriptorId_t clusterGroupId,
62 const RNTupleDescriptor &desc);
63
64public:
65 static constexpr std::uint16_t kEnvelopeTypeHeader = 0x01;
66 static constexpr std::uint16_t kEnvelopeTypeFooter = 0x02;
67 static constexpr std::uint16_t kEnvelopeTypePageList = 0x03;
68
69 static constexpr std::uint16_t kFlagRepetitiveField = 0x01;
70 static constexpr std::uint16_t kFlagProjectedField = 0x02;
71 static constexpr std::uint16_t kFlagHasTypeChecksum = 0x04;
72 static constexpr std::uint16_t kFlagIsSoACollection = 0x08;
73
74 static constexpr std::uint16_t kFlagDeferredColumn = 0x01;
75 static constexpr std::uint16_t kFlagHasValueRange = 0x02;
76
77 static constexpr ROOT::DescriptorId_t kZeroFieldId = std::uint64_t(-2);
78
79 static constexpr int64_t kSuppressedColumnMarker = std::numeric_limits<std::int64_t>::min();
80
81 // In the page sink and the streamer field, the seen streamer infos are stored in a map
82 // with the unique streamer info number being the key. Sorted by unique number.
83 using StreamerInfoMap_t = std::map<Int_t, TVirtualStreamerInfo *>;
84
86 std::uint64_t fLength = 0;
88 };
89
91 std::uint64_t fFirstEntry = 0;
92 std::uint64_t fNEntries = 0;
93 std::uint8_t fFlags = 0;
94 };
95
97 std::uint64_t fMinEntry = 0;
98 std::uint64_t fEntrySpan = 0;
99 std::uint32_t fNClusters = 0;
101 };
102
103 /// The serialization context is used for the piecewise serialization of a descriptor. During header serialization,
104 /// the mapping of in-memory field and column IDs to on-disk IDs is built so that it can be used for the
105 /// footer serialization in a second step.
106 class RContext {
107 private:
108 std::uint64_t fHeaderSize = 0;
109 std::uint64_t fHeaderXxHash3 = 0;
110 std::map<ROOT::DescriptorId_t, ROOT::DescriptorId_t> fMem2OnDiskFieldIDs;
111 std::map<ROOT::DescriptorId_t, ROOT::DescriptorId_t> fMem2OnDiskColumnIDs;
112 std::map<ROOT::DescriptorId_t, ROOT::DescriptorId_t> fMem2OnDiskClusterIDs;
113 std::map<ROOT::DescriptorId_t, ROOT::DescriptorId_t> fMem2OnDiskClusterGroupIDs;
114 std::vector<ROOT::DescriptorId_t> fOnDisk2MemFieldIDs;
115 std::vector<ROOT::DescriptorId_t> fOnDisk2MemColumnIDs;
116 std::vector<ROOT::DescriptorId_t> fOnDisk2MemClusterIDs;
117 std::vector<ROOT::DescriptorId_t> fOnDisk2MemClusterGroupIDs;
118
119 public:
120 void SetHeaderSize(std::uint64_t size) { fHeaderSize = size; }
121 std::uint64_t GetHeaderSize() const { return fHeaderSize; }
122 void SetHeaderXxHash3(std::uint64_t xxhash3) { fHeaderXxHash3 = xxhash3; }
123 std::uint64_t GetHeaderXxHash3() const { return fHeaderXxHash3; }
124 /// Map an in-memory field ID to its on-disk counterpart. It is allowed to call this function multiple times for
125 /// the same `memId`, in which case the return value is the on-disk ID assigned on the first call.
127 {
128 auto onDiskId = fOnDisk2MemFieldIDs.size();
129 const auto &p = fMem2OnDiskFieldIDs.try_emplace(memId, onDiskId);
130 if (p.second)
131 fOnDisk2MemFieldIDs.push_back(memId);
132 return (*p.first).second;
133 }
134 /// Map an in-memory column ID to its on-disk counterpart. It is allowed to call this function multiple times for
135 /// the same `memId`, in which case the return value is the on-disk ID assigned on the first call.
136 /// Note that we only map physical column IDs. Logical column IDs of alias columns are shifted before the
137 /// serialization of the extension header. Also, we only need to query physical column IDs for the page list
138 /// serialization.
140 {
141 auto onDiskId = fOnDisk2MemColumnIDs.size();
142 const auto &p = fMem2OnDiskColumnIDs.try_emplace(memId, onDiskId);
143 if (p.second)
144 fOnDisk2MemColumnIDs.push_back(memId);
145 return (*p.first).second;
146 }
148 {
149 auto onDiskId = fOnDisk2MemClusterIDs.size();
150 fMem2OnDiskClusterIDs[memId] = onDiskId;
151 fOnDisk2MemClusterIDs.push_back(memId);
152 return onDiskId;
153 }
155 {
156 auto onDiskId = fOnDisk2MemClusterGroupIDs.size();
157 fMem2OnDiskClusterGroupIDs[memId] = onDiskId;
158 fOnDisk2MemClusterGroupIDs.push_back(memId);
159 return onDiskId;
160 }
161 /// Map in-memory field and column IDs to their on-disk counterparts. This function is unconditionally called
162 /// during header serialization. This function must be manually called after an incremental schema update as page
163 /// list serialization requires all columns to be mapped.
164 void MapSchema(const RNTupleDescriptor &desc, bool forHeaderExtension);
165
181 {
182 return fOnDisk2MemColumnIDs[onDiskId];
183 }
185 {
186 return fOnDisk2MemClusterIDs[onDiskId];
187 }
192
193 /// Return a vector containing the in-memory field ID for each on-disk counterpart, in order, i.e. the `i`-th
194 /// value corresponds to the in-memory field ID for `i`-th on-disk ID
195 const std::vector<ROOT::DescriptorId_t> &GetOnDiskFieldList() const { return fOnDisk2MemFieldIDs; }
196 };
197
198 /// Writes a XxHash-3 64bit checksum of the byte range given by data and length.
199 static std::uint32_t
200 SerializeXxHash3(const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3, void *buffer);
201 /// Expects an xxhash3 checksum in the 8 bytes following data + length and verifies it.
202 static RResult<void> VerifyXxHash3(const unsigned char *data, std::uint64_t length, std::uint64_t &xxhash3);
203 static RResult<void> VerifyXxHash3(const unsigned char *data, std::uint64_t length);
204
205 static std::uint32_t SerializeInt16(std::int16_t val, void *buffer);
206 static std::uint32_t DeserializeInt16(const void *buffer, std::int16_t &val);
207 static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer);
208 static std::uint32_t DeserializeUInt16(const void *buffer, std::uint16_t &val);
209
210 static std::uint32_t SerializeInt32(std::int32_t val, void *buffer);
211 static std::uint32_t DeserializeInt32(const void *buffer, std::int32_t &val);
212 static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer);
213 static std::uint32_t DeserializeUInt32(const void *buffer, std::uint32_t &val);
214
215 static std::uint32_t SerializeInt64(std::int64_t val, void *buffer);
216 static std::uint32_t DeserializeInt64(const void *buffer, std::int64_t &val);
217 static std::uint32_t SerializeUInt64(std::uint64_t val, void *buffer);
218 static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val);
219
220 static std::uint32_t SerializeString(const std::string &val, void *buffer);
221 static RResult<std::uint32_t> DeserializeString(const void *buffer, std::uint64_t bufSize, std::string &val);
222
223 /// While we could just interpret the enums as ints, we make the translation explicit
224 /// in order to avoid accidentally changing the on-disk numbers when adjusting the enum classes.
228 static RResult<std::uint32_t> DeserializeFieldStructure(const void *buffer, ROOT::ENTupleStructure &structure);
231
232 static std::uint32_t SerializeEnvelopePreamble(std::uint16_t envelopeType, void *buffer);
233 static RResult<std::uint32_t> SerializeEnvelopePostscript(unsigned char *envelope, std::uint64_t size);
235 SerializeEnvelopePostscript(unsigned char *envelope, std::uint64_t size, std::uint64_t &xxhash3);
236 // The bufSize must include the 8 bytes for the final xxhash3 checksum.
238 DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType);
240 DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType, std::uint64_t &xxhash3);
241
242 static std::uint32_t SerializeRecordFramePreamble(void *buffer);
243 static std::uint32_t SerializeListFramePreamble(std::uint32_t nitems, void *buffer);
244 static RResult<std::uint32_t> SerializeFramePostscript(void *frame, std::uint64_t size);
246 DeserializeFrameHeader(const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize, std::uint32_t &nitems);
248 DeserializeFrameHeader(const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize);
249
250 // An empty flags vector will be serialized as a single, zero feature flag
251 // The most significant bit in every flag is reserved and must _not_ be set
252 static RResult<std::uint32_t> SerializeFeatureFlags(const std::vector<std::uint64_t> &flags, void *buffer);
254 DeserializeFeatureFlags(const void *buffer, std::uint64_t bufSize, std::vector<std::uint64_t> &flags);
255
256 static RResult<std::uint32_t> SerializeLocator(const RNTupleLocator &locator, void *buffer);
257 static RResult<std::uint32_t> SerializeEnvelopeLink(const REnvelopeLink &envelopeLink, void *buffer);
258 static RResult<std::uint32_t> DeserializeLocator(const void *buffer, std::uint64_t bufSize, RNTupleLocator &locator);
260 DeserializeEnvelopeLink(const void *buffer, std::uint64_t bufSize, REnvelopeLink &envelopeLink);
261
262 static RResult<std::uint32_t> SerializeClusterSummary(const RClusterSummary &clusterSummary, void *buffer);
263 static RResult<std::uint32_t> SerializeClusterGroup(const RClusterGroup &clusterGroup, void *buffer);
265 DeserializeClusterSummary(const void *buffer, std::uint64_t bufSize, RClusterSummary &clusterSummary);
267 DeserializeClusterGroup(const void *buffer, std::uint64_t bufSize, RClusterGroup &clusterGroup);
268
269 /// Serialize the schema description in `desc` into `buffer`. If `forHeaderExtension` is true, serialize only the
270 /// fields and columns tagged as part of the header extension (see `RNTupleDescriptorBuilder::BeginHeaderExtension`).
272 const RContext &context, bool forHeaderExtension = false);
273 static RResult<std::uint32_t> DeserializeSchemaDescription(const void *buffer, std::uint64_t bufSize,
275
277 SerializeAttributeSet(const RNTupleAttrSetDescriptor &attrSetDesc, void *buffer);
279 DeserializeAttributeSet(const void *buffer, std::uint64_t bufSize,
281
282 static RResult<RContext> SerializeHeader(void *buffer, const RNTupleDescriptor &desc);
283 static RResult<std::uint32_t> SerializePageList(void *buffer, const RNTupleDescriptor &desc,
284 std::span<ROOT::DescriptorId_t> physClusterIDs,
285 const RContext &context);
286 static RResult<std::uint32_t> SerializeFooter(void *buffer, const RNTupleDescriptor &desc, const RContext &context);
287
288 static RResult<void>
289 DeserializeHeader(const void *buffer, std::uint64_t bufSize, ROOT::Internal::RNTupleDescriptorBuilder &descBuilder);
290 static RResult<void>
291 DeserializeFooter(const void *buffer, std::uint64_t bufSize, ROOT::Internal::RNTupleDescriptorBuilder &descBuilder);
292
294 /// Deserializes the descriptor as-is without performing any additional fixup. The produced descriptor is
295 /// unsuitable for reading or writing, but it's a faithful representation of the on-disk information.
296 kRaw,
297 /// Deserializes the descriptor and performs fixup on the suppressed column ranges. This produces a descriptor
298 /// that is suitable for writing, but not reading.
300 /// Deserializes the descriptor and performs fixup on the suppressed column ranges and on clusters, taking
301 /// into account the header extension. This produces a descriptor that is suitable for reading.
303 };
304 // The clusters vector must be initialized with the cluster summaries corresponding to the page list
305 static RResult<void> DeserializePageList(const void *buffer, std::uint64_t bufSize,
306 ROOT::DescriptorId_t clusterGroupId, RNTupleDescriptor &desc,
307 EDescriptorDeserializeMode mode);
308
309 // Helper functions to (de-)serialize the streamer info type extra information
310 static std::string SerializeStreamerInfos(const StreamerInfoMap_t &infos);
311 static RResult<StreamerInfoMap_t> DeserializeStreamerInfos(const std::string &extraTypeInfoContent);
312}; // class RNTupleSerializer
313
314} // namespace Internal
315} // namespace ROOT
316
317#endif // ROOT_RNTupleSerialize
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 mode
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.
ROOT::DescriptorId_t GetOnDiskClusterGroupId(ROOT::DescriptorId_t memId) const
std::map< ROOT::DescriptorId_t, ROOT::DescriptorId_t > fMem2OnDiskClusterIDs
ROOT::DescriptorId_t GetOnDiskFieldId(ROOT::DescriptorId_t memId) const
ROOT::DescriptorId_t GetMemColumnId(ROOT::DescriptorId_t onDiskId) const
ROOT::DescriptorId_t GetMemClusterGroupId(ROOT::DescriptorId_t onDiskId) const
std::vector< ROOT::DescriptorId_t > fOnDisk2MemColumnIDs
std::map< ROOT::DescriptorId_t, ROOT::DescriptorId_t > fMem2OnDiskColumnIDs
ROOT::DescriptorId_t GetOnDiskClusterId(ROOT::DescriptorId_t memId) const
std::map< ROOT::DescriptorId_t, ROOT::DescriptorId_t > fMem2OnDiskFieldIDs
std::map< ROOT::DescriptorId_t, ROOT::DescriptorId_t > fMem2OnDiskClusterGroupIDs
std::vector< ROOT::DescriptorId_t > fOnDisk2MemFieldIDs
ROOT::DescriptorId_t GetOnDiskColumnId(ROOT::DescriptorId_t memId) const
void MapSchema(const RNTupleDescriptor &desc, bool forHeaderExtension)
Map in-memory field and column IDs to their on-disk counterparts.
std::vector< ROOT::DescriptorId_t > fOnDisk2MemClusterGroupIDs
ROOT::DescriptorId_t MapClusterId(ROOT::DescriptorId_t memId)
std::vector< ROOT::DescriptorId_t > fOnDisk2MemClusterIDs
ROOT::DescriptorId_t MapPhysicalColumnId(ROOT::DescriptorId_t memId)
Map an in-memory column ID to its on-disk counterpart.
ROOT::DescriptorId_t GetMemClusterId(ROOT::DescriptorId_t onDiskId) const
const std::vector< ROOT::DescriptorId_t > & GetOnDiskFieldList() const
Return a vector containing the in-memory field ID for each on-disk counterpart, in order,...
ROOT::DescriptorId_t GetMemFieldId(ROOT::DescriptorId_t onDiskId) const
ROOT::DescriptorId_t MapClusterGroupId(ROOT::DescriptorId_t memId)
ROOT::DescriptorId_t MapFieldId(ROOT::DescriptorId_t memId)
Map an in-memory field ID to its on-disk counterpart.
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 kFlagDeferredColumn
static RResult< std::vector< ROOT::Internal::RClusterDescriptorBuilder > > DeserializePageListRaw(const void *buffer, std::uint64_t bufSize, ROOT::DescriptorId_t clusterGroupId, const RNTupleDescriptor &desc)
static RResult< std::uint32_t > SerializeSchemaDescription(void *buffer, const RNTupleDescriptor &desc, const RContext &context, bool forHeaderExtension=false)
Serialize the schema description in desc into buffer.
static RResult< std::uint32_t > DeserializeString(const void *buffer, std::uint64_t bufSize, std::string &val)
static constexpr std::uint16_t kEnvelopeTypePageList
static RResult< std::uint32_t > SerializeEnvelopeLink(const REnvelopeLink &envelopeLink, void *buffer)
static std::uint32_t SerializeInt32(std::int32_t val, void *buffer)
static RResult< std::uint32_t > DeserializeEnvelopeLink(const void *buffer, std::uint64_t bufSize, REnvelopeLink &envelopeLink)
static constexpr std::uint16_t kFlagIsSoACollection
static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
static RResult< std::uint32_t > SerializeFieldStructure(ROOT::ENTupleStructure structure, void *buffer)
While we could just interpret the enums as ints, we make the translation explicit in order to avoid a...
static RResult< std::uint32_t > SerializeEnvelopePostscript(unsigned char *envelope, std::uint64_t size)
static RResult< std::uint32_t > SerializeFeatureFlags(const std::vector< std::uint64_t > &flags, void *buffer)
static std::uint32_t DeserializeUInt32(const void *buffer, std::uint32_t &val)
static RResult< std::uint32_t > DeserializeFrameHeader(const void *buffer, std::uint64_t bufSize, std::uint64_t &frameSize, std::uint32_t &nitems)
static RResult< std::uint32_t > DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType)
static constexpr std::uint16_t kFlagRepetitiveField
static constexpr int64_t kSuppressedColumnMarker
static RResult< std::uint32_t > SerializeColumnType(ROOT::ENTupleColumnType type, void *buffer)
static std::uint32_t SerializeListFramePreamble(std::uint32_t nitems, void *buffer)
static std::uint32_t SerializeInt16(std::int16_t val, void *buffer)
static RResult< std::uint32_t > SerializeFramePostscript(void *frame, std::uint64_t size)
static constexpr std::uint16_t kEnvelopeTypeFooter
static RResult< std::uint32_t > DeserializeClusterGroup(const void *buffer, std::uint64_t bufSize, RClusterGroup &clusterGroup)
static RResult< std::uint32_t > DeserializeLocator(const void *buffer, std::uint64_t bufSize, RNTupleLocator &locator)
static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer)
static RResult< void > DeserializePageList(const void *buffer, std::uint64_t bufSize, ROOT::DescriptorId_t clusterGroupId, RNTupleDescriptor &desc, EDescriptorDeserializeMode mode)
static constexpr std::uint16_t kFlagProjectedField
static RResult< void > DeserializeFooter(const void *buffer, std::uint64_t bufSize, ROOT::Internal::RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t DeserializeInt64(const void *buffer, std::int64_t &val)
static std::uint32_t SerializeEnvelopePreamble(std::uint16_t envelopeType, void *buffer)
static std::uint32_t DeserializeInt32(const void *buffer, std::int32_t &val)
static std::uint32_t SerializeString(const std::string &val, void *buffer)
std::map< Int_t, TVirtualStreamerInfo * > StreamerInfoMap_t
static RResult< std::uint32_t > SerializeExtraTypeInfoId(ROOT::EExtraTypeInfoIds id, void *buffer)
static RResult< StreamerInfoMap_t > DeserializeStreamerInfos(const std::string &extraTypeInfoContent)
static std::uint32_t DeserializeUInt16(const void *buffer, std::uint16_t &val)
static constexpr std::uint16_t kFlagHasValueRange
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 RResult< std::uint32_t > SerializeClusterSummary(const RClusterSummary &clusterSummary, void *buffer)
static RResult< std::uint32_t > DeserializeColumnType(const void *buffer, ROOT::ENTupleColumnType &type)
static RResult< std::uint32_t > SerializeAttributeSet(const RNTupleAttrSetDescriptor &attrSetDesc, void *buffer)
static constexpr ROOT::DescriptorId_t kZeroFieldId
static constexpr std::uint16_t kFlagHasTypeChecksum
static std::uint32_t DeserializeInt16(const void *buffer, std::int16_t &val)
static RResult< std::uint32_t > DeserializeExtraTypeInfoId(const void *buffer, ROOT::EExtraTypeInfoIds &id)
static RResult< std::uint32_t > DeserializeClusterSummary(const void *buffer, std::uint64_t bufSize, RClusterSummary &clusterSummary)
@ kForReading
Deserializes the descriptor and performs fixup on the suppressed column ranges and on clusters,...
@ kRaw
Deserializes the descriptor as-is without performing any additional fixup.
@ kForWriting
Deserializes the descriptor and performs fixup on the suppressed column ranges.
static RResult< std::uint32_t > DeserializeAttributeSet(const void *buffer, std::uint64_t bufSize, Internal::RNTupleAttrSetDescriptorBuilder &attrSetDescBld)
static constexpr std::uint16_t kEnvelopeTypeHeader
static RResult< std::uint32_t > SerializeClusterGroup(const RClusterGroup &clusterGroup, void *buffer)
static std::uint32_t SerializeRecordFramePreamble(void *buffer)
static RResult< std::uint32_t > SerializePageList(void *buffer, const RNTupleDescriptor &desc, std::span< ROOT::DescriptorId_t > physClusterIDs, const RContext &context)
static RResult< std::uint32_t > DeserializeFieldStructure(const void *buffer, ROOT::ENTupleStructure &structure)
static std::uint32_t SerializeInt64(std::int64_t val, void *buffer)
static RResult< void > DeserializeHeader(const void *buffer, std::uint64_t bufSize, ROOT::Internal::RNTupleDescriptorBuilder &descBuilder)
static RResult< std::uint32_t > SerializeFooter(void *buffer, const RNTupleDescriptor &desc, const RContext &context)
static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static RResult< std::uint32_t > SerializeLocator(const RNTupleLocator &locator, void *buffer)
static RResult< std::uint32_t > DeserializeSchemaDescription(const void *buffer, std::uint64_t bufSize, ROOT::Internal::RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t SerializeUInt64(std::uint64_t val, void *buffer)
static RResult< std::uint32_t > DeserializeFeatureFlags(const void *buffer, std::uint64_t bufSize, std::vector< std::uint64_t > &flags)
static RResult< RContext > SerializeHeader(void *buffer, const RNTupleDescriptor &desc)
static std::string SerializeStreamerInfos(const StreamerInfoMap_t &infos)
Metadata stored for every Attribute Set linked to an RNTuple.
The on-storage metadata of an RNTuple.
Generic information about the physical location of data.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
Definition RError.hxx:222
Abstract Interface class describing Streamer information for one class.
EExtraTypeInfoIds
Used in RExtraTypeInfoDescriptor.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
ENTupleStructure
The fields in the RNTuple data model tree can carry different structural information about the type s...