29#include <unordered_map>
42 auto base =
reinterpret_cast<unsigned char *
>(buffer);
44 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
46 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
48 pos += RNTupleSerializer::SerializeUInt32(
fieldDesc.GetFieldVersion(), *
where);
49 pos += RNTupleSerializer::SerializeUInt32(
fieldDesc.GetTypeVersion(), *
where);
51 pos += RNTupleSerializer::SerializeFieldStructure(
fieldDesc.GetStructure(), *
where);
53 pos += RNTupleSerializer::SerializeUInt16(RNTupleSerializer::kFlagRepetitiveField, *
where);
54 pos += RNTupleSerializer::SerializeUInt64(
fieldDesc.GetNRepetitions(), *
where);
56 pos += RNTupleSerializer::SerializeUInt16(0, *
where);
58 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetFieldName(), *
where);
59 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetTypeName(), *
where);
60 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetTypeAlias(), *
where);
61 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetFieldDescription(), *
where);
63 auto size = pos - base;
64 RNTupleSerializer::SerializeFramePostscript(base,
size);
77 std::span<const ROOT::Experimental::DescriptorId_t>
fieldList,
81 auto base =
reinterpret_cast<unsigned char *
>(buffer);
83 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
103 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
116 ENTupleStructure structure{ENTupleStructure::kLeaf};
119 RNTupleSerializer::SerializeFieldStructure(structure,
nullptr) +
120 sizeof(std::uint16_t))
122 return R__FAIL(
"field record frame too short");
127 auto res16 = RNTupleSerializer::DeserializeFieldStructure(
bytes, structure);
131 bytes += RNTupleSerializer::DeserializeUInt16(
bytes, flags);
134 if (flags & RNTupleSerializer::kFlagRepetitiveField) {
136 return R__FAIL(
"field record frame too short");
143 std::string typeName;
168 std::span<const ROOT::Experimental::DescriptorId_t>
fieldList,
174 auto base =
reinterpret_cast<unsigned char *
>(buffer);
176 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
180 if (
c.IsAliasColumn())
184 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
186 auto type =
c.GetModel().GetType();
187 pos += RNTupleSerializer::SerializeColumnType(
type, *
where);
188 pos += RNTupleSerializer::SerializeUInt16(RColumnElementBase::GetBitsOnStorage(
type), *
where);
190 std::uint32_t flags = 0;
192 if (
c.GetModel().GetIsSorted())
193 flags |= RNTupleSerializer::kFlagSortAscColumn;
196 flags |= RNTupleSerializer::kFlagNonNegativeColumn;
199 flags |= RNTupleSerializer::kFlagDeferredColumn;
200 pos += RNTupleSerializer::SerializeUInt32(flags, *
where);
201 if (flags & RNTupleSerializer::kFlagDeferredColumn)
204 pos += RNTupleSerializer::SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
216 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
232 sizeof(std::uint16_t) + 2 *
sizeof(std::uint32_t))
234 return R__FAIL(
"column record frame too short");
236 auto res16 = RNTupleSerializer::DeserializeColumnType(
bytes,
type);
242 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, flags);
243 if (flags & RNTupleSerializer::kFlagDeferredColumn) {
245 return R__FAIL(
"column record frame too short");
250 return R__FAIL(
"column element size mismatch");
252 const bool isSorted = (flags & (RNTupleSerializer::kFlagSortAscColumn | RNTupleSerializer::kFlagSortDesColumn));
260 const auto &uri =
locator.GetPosition<std::string>();
261 if (uri.length() >= (1 << 16))
264 memcpy(buffer, uri.data(), uri.length());
272 auto &uri =
locator.fPosition.emplace<std::string>();
281 RNTupleSerializer::SerializeUInt32(
locator.fBytesOnStorage, buffer);
282 RNTupleSerializer::SerializeUInt64(
data.fLocation, buffer +
sizeof(std::uint32_t));
284 return sizeof(std::uint32_t) +
sizeof(std::uint64_t);
290 RNTupleSerializer::DeserializeUInt32(buffer,
locator.fBytesOnStorage);
291 RNTupleSerializer::DeserializeUInt64(buffer +
sizeof(std::uint32_t),
data.fLocation);
295 std::span<const ROOT::Experimental::DescriptorId_t>
fieldList,
299 auto base =
reinterpret_cast<unsigned char *
>(buffer);
301 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
305 if (!
c.IsAliasColumn())
309 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
314 pos += RNTupleSerializer::SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
324 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
334 return R__FAIL(
"alias column record frame too short");
347 std::uint64_t &
xxhash3,
void *buffer)
349 if (buffer !=
nullptr) {
363 return R__FAIL(
"XxHash-3 checksum mismatch");
377 if (buffer !=
nullptr) {
378 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
379 bytes[0] = (val & 0x00FF);
380 bytes[1] = (val & 0xFF00) >> 8;
387 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
388 val = std::int16_t(
bytes[0]) + (std::int16_t(
bytes[1]) << 8);
394 return SerializeInt16(val, buffer);
399 return DeserializeInt16(buffer, *
reinterpret_cast<std::int16_t *
>(&val));
404 if (buffer !=
nullptr) {
405 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
406 bytes[0] = (val & 0x000000FF);
407 bytes[1] = (val & 0x0000FF00) >> 8;
408 bytes[2] = (val & 0x00FF0000) >> 16;
409 bytes[3] = (val & 0xFF000000) >> 24;
416 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
417 val = std::int32_t(
bytes[0]) + (std::int32_t(
bytes[1]) << 8) +
418 (std::int32_t(
bytes[2]) << 16) + (std::int32_t(
bytes[3]) << 24);
424 return SerializeInt32(val, buffer);
429 return DeserializeInt32(buffer, *
reinterpret_cast<std::int32_t *
>(&val));
434 if (buffer !=
nullptr) {
435 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
436 bytes[0] = (val & 0x00000000000000FF);
437 bytes[1] = (val & 0x000000000000FF00) >> 8;
438 bytes[2] = (val & 0x0000000000FF0000) >> 16;
439 bytes[3] = (val & 0x00000000FF000000) >> 24;
440 bytes[4] = (val & 0x000000FF00000000) >> 32;
441 bytes[5] = (val & 0x0000FF0000000000) >> 40;
442 bytes[6] = (val & 0x00FF000000000000) >> 48;
443 bytes[7] = (val & 0xFF00000000000000) >> 56;
450 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
451 val = std::int64_t(
bytes[0]) + (std::int64_t(
bytes[1]) << 8) +
452 (std::int64_t(
bytes[2]) << 16) + (std::int64_t(
bytes[3]) << 24) +
453 (std::int64_t(
bytes[4]) << 32) + (std::int64_t(
bytes[5]) << 40) +
454 (std::int64_t(
bytes[6]) << 48) + (std::int64_t(
bytes[7]) << 56);
460 return SerializeInt64(val, buffer);
465 return DeserializeInt64(buffer, *
reinterpret_cast<std::int64_t *
>(&val));
471 auto pos =
reinterpret_cast<unsigned char *
>(buffer);
472 pos += SerializeUInt32(val.length(), pos);
473 memcpy(pos, val.data(), val.length());
475 return sizeof(std::uint32_t) + val.length();
482 if (
bufSize <
sizeof(std::uint32_t))
483 return R__FAIL(
"string buffer too short");
484 bufSize -=
sizeof(std::uint32_t);
486 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
491 return R__FAIL(
"string buffer too short");
495 return sizeof(std::uint32_t) +
length;
570 default:
return R__FAIL(
"unexpected on-disk column type");
582 return SerializeUInt16(0x00, buffer);
584 return SerializeUInt16(0x01, buffer);
586 return SerializeUInt16(0x02, buffer);
588 return SerializeUInt16(0x03, buffer);
590 return SerializeUInt16(0x04, buffer);
620 return R__FAIL(
"unexpected on-disk field structure value");
628 auto base =
reinterpret_cast<unsigned char *
>(buffer);
630 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
641 if (
size <
sizeof(std::uint64_t))
643 if (
size >=
static_cast<uint64_t
>(1) << 48)
665 const std::uint64_t
minEnvelopeSize =
sizeof(std::uint64_t) +
sizeof(std::uint64_t);
667 return R__FAIL(
"invalid envelope buffer, too short");
669 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
677 return R__FAIL(
"envelope type mismatch: expected " + std::to_string(
expectedType) +
", found " +
683 return R__FAIL(
"envelope buffer size too small");
685 return R__FAIL(
"invalid envelope, too short");
706 return SerializeInt64(1, buffer);
711 std::uint32_t
nitems,
void *buffer)
713 auto base =
reinterpret_cast<unsigned char *
>(buffer);
715 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
718 pos += SerializeInt64(-1, *
where);
730 DeserializeInt64(frame, marker);
733 SerializeInt64(marker *
static_cast<int64_t
>(
size), frame);
742 std::uint64_t
minSize =
sizeof(std::int64_t);
744 return R__FAIL(
"frame too short");
746 std::int64_t *
ssize =
reinterpret_cast<std::int64_t *
>(&
frameSize);
747 DeserializeInt64(buffer, *
ssize);
749 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
757 minSize +=
sizeof(std::uint32_t);
759 return R__FAIL(
"frame too short");
765 return R__FAIL(
"corrupt frame size");
767 return R__FAIL(
"frame too short");
769 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
785 return SerializeUInt64(0, buffer);
788 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
790 for (
unsigned i = 0; i < flags.size(); ++i) {
791 if (flags[i] & 0x8000000000000000)
795 if (i == (flags.size() - 1))
796 SerializeUInt64(flags[i],
bytes);
798 bytes += SerializeUInt64(flags[i] | 0x8000000000000000,
bytes);
801 return (flags.size() *
sizeof(std::int64_t));
806 std::vector<std::uint64_t> &flags)
808 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
813 if (
bufSize <
sizeof(std::uint64_t))
814 return R__FAIL(
"feature flag buffer too short");
816 bufSize -=
sizeof(std::uint64_t);
817 flags.emplace_back(
f & ~0x8000000000000000);
818 }
while (
f & 0x8000000000000000);
820 return (flags.size() *
sizeof(std::uint64_t));
829 std::uint32_t
size = 0;
831 if (
static_cast<std::int32_t
>(
locator.fBytesOnStorage) < 0)
833 size += SerializeUInt32(
locator.fBytesOnStorage, buffer);
834 size += SerializeUInt64(
locator.GetPosition<std::uint64_t>(),
835 buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
839 auto payloadp = buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
sizeof(std::int32_t) :
nullptr;
845 std::int32_t head =
sizeof(std::int32_t) +
size;
846 head |=
locator.fReserved << 16;
847 head |=
static_cast<int>(
locator.fType & 0x7F) << 24;
857 if (
bufSize <
sizeof(std::int32_t))
858 return R__FAIL(
"too short locator");
860 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
864 bufSize -=
sizeof(std::int32_t);
867 const int type = head >> 24;
868 const std::uint32_t
payloadSize = (
static_cast<std::uint32_t
>(head) & 0x0000FFFF) -
sizeof(std::int32_t);
870 return R__FAIL(
"too short locator");
872 locator.fReserved =
static_cast<std::uint32_t
>(head >> 16) & 0xFF;
876 default:
return R__FAIL(
"unsupported locator type: " + std::to_string(
type));
880 if (
bufSize <
sizeof(std::uint64_t))
881 return R__FAIL(
"too short locator");
885 locator.fBytesOnStorage = head;
888 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
896 buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
904 if (
bufSize <
sizeof(std::int64_t))
905 return R__FAIL(
"too short envelope link");
907 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
909 bufSize -=
sizeof(std::uint64_t);
914 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
921 auto base =
reinterpret_cast<unsigned char *
>(buffer);
923 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
926 pos += SerializeRecordFramePreamble(*
where);
934 auto size = pos - frame;
935 pos += SerializeFramePostscript(frame,
size);
943 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
953 return R__FAIL(
"too short cluster summary");
961 return R__FAIL(
"too short cluster summary");
978 auto base =
reinterpret_cast<unsigned char *
>(buffer);
980 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
983 pos += SerializeRecordFramePreamble(*
where);
988 auto size = pos - frame;
989 pos += SerializeFramePostscript(frame,
size);
997 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1007 if (
fnFrameSizeLeft() <
sizeof(std::uint32_t) + 2 *
sizeof(std::uint64_t))
1008 return R__FAIL(
"too short cluster group");
1040 R__ASSERT(GetHeaderExtensionOffset() == -1U);
1051 if (!
c.IsAliasColumn())
1052 MapColumnId(
c.GetLogicalId());
1056 if (
c.IsAliasColumn())
1057 MapColumnId(
c.GetLogicalId());
1062 BeginHeaderExtension();
1070 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1072 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
1097 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1102 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1107 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1111 pos += SerializeListFramePreamble(0, *
where);
1112 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1113 return static_cast<std::uint32_t
>(pos - base);
1120 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1136 for (
unsigned i = 0; i <
nFields; ++i) {
1163 std::unordered_map<DescriptorId_t, std::uint32_t>
maxIndexes;
1164 for (
unsigned i = 0; i <
nColumns; ++i) {
1172 std::uint32_t idx = 0;
1176 idx =
maxIdx->second + 1;
1207 std::uint32_t idx = 0;
1210 idx =
maxIdx->second + 1;
1231 return bytes - base;
1240 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1242 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1244 pos += SerializeEnvelopePreamble(kEnvelopeTypeHeader, *
where);
1252 pos += SerializeSchemaDescription(*
where, desc, context);
1254 std::uint64_t
size = pos - base;
1268 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1270 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
1272 pos += SerializeEnvelopePreamble(kEnvelopeTypePageList, *
where);
1306 pos += SerializeListFramePreamble(
pageRange.fPageInfos.size(), *
where);
1308 for (
const auto &pi :
pageRange.fPageInfos) {
1309 pos += SerializeUInt32(pi.fNElements, *
where);
1310 pos += SerializeLocator(pi.fLocator, *
where);
1321 std::uint64_t
size = pos - base;
1322 size += SerializeEnvelopePostscript(base,
size);
1331 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1333 void**
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
1335 pos += SerializeEnvelopePreamble(kEnvelopeTypeFooter, *
where);
1338 pos += SerializeFeatureFlags(std::vector<std::uint64_t>(), *
where);
1343 pos += SerializeRecordFramePreamble(*
where);
1344 pos += SerializeSchemaDescription(*
where, desc, context,
true);
1345 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1349 pos += SerializeListFramePreamble(0, *
where);
1350 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1366 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1370 pos += SerializeListFramePreamble(0, *
where);
1371 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1373 std::uint32_t
size = pos - base;
1374 size += SerializeEnvelopePostscript(base,
size);
1382 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1399 for (std::size_t i = 0; i <
featureFlags.size(); ++i) {
1402 unsigned int bit = 0;
1405 return R__FAIL(
"unsupported format feature: " + std::to_string(i * 64 +
bit));
1439 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1460 if (
fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint64_t)))
1461 return R__FAIL(
"footer too short");
1464 return R__FAIL(
"XxHash-3 mismatch between header and footer");
1488 return R__FAIL(
"sharded clusters are still unsupported");
1507 .PageListLocator(
clusterGroup.fPageListEnvelopeLink.fLocator)
1508 .PageListLength(
clusterGroup.fPageListEnvelopeLink.fLength)
1533 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1544 if (
fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint64_t)))
1545 return R__FAIL(
"page list too short");
1548 return R__FAIL(
"XxHash-3 mismatch between header and page list");
1572 return R__FAIL(
"sharded clusters are still unsupported");
1591 return R__FAIL(
"mismatch between number of clusters and number of cluster summaries");
1593 std::vector<RClusterDescriptor>
clusters;
1594 for (std::uint32_t i = 0; i <
nClusters; ++i) {
1618 for (std::uint32_t k = 0; k <
nPages; ++k) {
1620 return R__FAIL(
"inner frame too short");
1636 return R__FAIL(
"page list frame too short");
#define R__FORWARD_ERROR(res)
Short-hand to return an RResult<T> in an error state (i.e. after checking)
#define R__FORWARD_RESULT(res)
Short-hand to return an RResult<T> value from a subroutine to the calling stack frame.
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_WARNING(...)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 offset
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 result
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 bytes
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 RClusterDescriptor.
A helper class for piece-wise construction of an RClusterGroupDescriptor.
A helper class for piece-wise construction of an RColumnDescriptor.
A column element encapsulates the translation between basic C++ types and their column representation...
std::size_t GetBitsOnStorage() const
A helper class for piece-wise construction of an RFieldDescriptor.
A helper class for piece-wise construction of an RNTupleDescriptor.
The serialization context is used for the piecewise serialization of a descriptor.
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,...
DescriptorId_t GetOnDiskFieldId(DescriptorId_t memId) const
DescriptorId_t GetMemColumnId(DescriptorId_t onDiskId) const
std::uint64_t GetHeaderXxHash3() const
void SetHeaderXxHash3(std::uint64_t xxhash3)
std::size_t GetHeaderExtensionOffset() const
Return the offset of the first element in fOnDisk2MemFieldIDs that is part of the schema extension.
DescriptorId_t GetMemClusterGroupId(DescriptorId_t onDiskId) const
DescriptorId_t GetMemClusterId(DescriptorId_t onDiskId) const
void SetHeaderSize(std::uint64_t size)
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 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 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 RContext SerializeHeader(void *buffer, const RNTupleDescriptor &desc)
static std::uint32_t SerializeFeatureFlags(const std::vector< std::uint64_t > &flags, void *buffer)
static std::uint16_t SerializeColumnType(ROOT::Experimental::EColumnType type, void *buffer)
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 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 std::uint32_t SerializeClusterSummary(const RClusterSummary &clusterSummary, void *buffer)
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 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 > DeserializeSchemaDescription(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t SerializeLocator(const RNTupleLocator &locator, void *buffer)
static std::uint32_t SerializeInt32(std::int32_t val, void *buffer)
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::uint16_t > DeserializeColumnType(const void *buffer, ROOT::Experimental::EColumnType &type)
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 RResult< std::uint16_t > DeserializeFieldStructure(const void *buffer, ROOT::Experimental::ENTupleStructure &structure)
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 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 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 a...
static RResult< std::uint32_t > DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType)
static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
static RResult< std::uint32_t > DeserializeLocator(const void *buffer, std::uint64_t bufSize, RNTupleLocator &locator)
Base class for all ROOT issued exceptions.
Meta-data stored for every field of an ntuple.
The on-storage meta-data of an ntuple.
std::size_t GetNLogicalColumns() const
std::string GetDescription() const
std::string GetName() const
std::uint64_t GetOnDiskHeaderXxHash3() const
DescriptorId_t GetFieldZeroId() const
Returns the logical parent of all top-level NTuple data fields.
const RClusterDescriptor & GetClusterDescriptor(DescriptorId_t clusterId) const
RFieldDescriptorIterable GetFieldIterable(const RFieldDescriptor &fieldDesc) const
std::size_t GetNFields() const
RResult< void > AddClusterGroupDetails(DescriptorId_t clusterGroupId, std::vector< RClusterDescriptor > &clusterDescs)
Methods to load and drop cluster group details (cluster IDs and page locations)
std::size_t GetNClusterGroups() const
const RFieldDescriptor & GetFieldDescriptor(DescriptorId_t fieldId) const
const RClusterGroupDescriptor & GetClusterGroupDescriptor(DescriptorId_t clusterGroupId) const
RColumnDescriptorIterable GetColumnIterable() const
std::size_t GetNPhysicalColumns() const
const RHeaderExtension * GetHeaderExtension() const
Return header extension information; if the descriptor does not have a header extension,...
std::vector< std::uint64_t > GetFeatureFlags() const
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
const_iterator begin() const
const_iterator end() const
RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
RNTupleLocator payload that is common for object stores using 64bit location information.
Generic information about the physical location of data.
ELocatorType
Values for the Type field in non-disk locators.