38#include <unordered_map>
47 auto base =
reinterpret_cast<unsigned char *
>(buffer);
51 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
53 pos += RNTupleSerializer::SerializeUInt32(
fieldDesc.GetFieldVersion(), *
where);
54 pos += RNTupleSerializer::SerializeUInt32(
fieldDesc.GetTypeVersion(), *
where);
56 pos += RNTupleSerializer::SerializeFieldStructure(
fieldDesc.GetStructure(), *
where);
58 std::uint16_t flags = 0;
60 flags |= RNTupleSerializer::kFlagRepetitiveField;
62 flags |= RNTupleSerializer::kFlagProjectedField;
63 if (
fieldDesc.GetTypeChecksum().has_value())
64 flags |= RNTupleSerializer::kFlagHasTypeChecksum;
65 pos += RNTupleSerializer::SerializeUInt16(flags, *
where);
67 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetFieldName(), *
where);
68 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetTypeName(), *
where);
69 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetTypeAlias(), *
where);
70 pos += RNTupleSerializer::SerializeString(
fieldDesc.GetFieldDescription(), *
where);
72 if (flags & RNTupleSerializer::kFlagRepetitiveField) {
73 pos += RNTupleSerializer::SerializeUInt64(
fieldDesc.GetNRepetitions(), *
where);
75 if (flags & RNTupleSerializer::kFlagProjectedField) {
78 if (flags & RNTupleSerializer::kFlagHasTypeChecksum) {
79 pos += RNTupleSerializer::SerializeUInt32(
fieldDesc.GetTypeChecksum().value(), *
where);
82 auto size = pos - base;
83 RNTupleSerializer::SerializeFramePostscript(base,
size);
99 auto base =
reinterpret_cast<unsigned char *
>(buffer);
123 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
136 ENTupleStructure structure{ENTupleStructure::kLeaf};
138 if (
fnFrameSizeLeft() < 3 *
sizeof(std::uint32_t) + RNTupleSerializer::SerializeFieldStructure(structure,
nullptr) +
139 sizeof(std::uint16_t)) {
140 return R__FAIL(
"field record frame too short");
145 result = RNTupleSerializer::DeserializeFieldStructure(
bytes, structure);
149 bytes += RNTupleSerializer::DeserializeUInt16(
bytes, flags);
153 std::string typeName;
174 if (flags & RNTupleSerializer::kFlagRepetitiveField) {
176 return R__FAIL(
"field record frame too short");
182 if (flags & RNTupleSerializer::kFlagProjectedField) {
184 return R__FAIL(
"field record frame too short");
190 if (flags & RNTupleSerializer::kFlagHasTypeChecksum) {
192 return R__FAIL(
"field record frame too short");
207 auto base =
reinterpret_cast<unsigned char *
>(buffer);
211 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
213 pos += RNTupleSerializer::SerializeColumnType(
columnDesc.GetType(), *
where);
214 pos += RNTupleSerializer::SerializeUInt16(
columnDesc.GetBitsOnStorage(), *
where);
216 std::uint16_t flags = 0;
218 flags |= RNTupleSerializer::kFlagDeferredColumn;
220 flags |= RNTupleSerializer::kFlagHasValueRange;
224 pos += RNTupleSerializer::SerializeUInt16(flags, *
where);
225 pos += RNTupleSerializer::SerializeUInt16(
columnDesc.GetRepresentationIndex(), *
where);
226 if (flags & RNTupleSerializer::kFlagDeferredColumn)
228 if (flags & RNTupleSerializer::kFlagHasValueRange) {
229 auto [min, max] = *
columnDesc.GetValueRange();
231 static_assert(
sizeof(min) ==
sizeof(
intMin) &&
sizeof(max) ==
sizeof(
intMax));
234 pos += RNTupleSerializer::SerializeUInt64(
intMin, *
where);
235 pos += RNTupleSerializer::SerializeUInt64(
intMax, *
where);
238 pos += RNTupleSerializer::SerializeFramePostscript(buffer ? base : nullptr, pos - base);
244 std::span<const ROOT::DescriptorId_t>
fieldList,
248 auto base =
reinterpret_cast<unsigned char *
>(buffer);
261 for (
const auto &
c : desc.GetColumnIterable(
parentId)) {
262 if (
c.IsAliasColumn() || (
xHeader &&
xHeader->ContainsExtendedColumnRepresentation(
c.GetLogicalId())))
277 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
294 RNTupleSerializer::SerializeColumnType(
type,
nullptr) +
sizeof(std::uint16_t) + 2 *
sizeof(std::uint32_t)) {
295 return R__FAIL(
"column record frame too short");
303 bytes += RNTupleSerializer::DeserializeUInt16(
bytes, flags);
305 if (flags & RNTupleSerializer::kFlagDeferredColumn) {
307 return R__FAIL(
"column record frame too short");
310 if (flags & RNTupleSerializer::kFlagHasValueRange) {
312 return R__FAIL(
"field record frame too short");
332 auto base =
reinterpret_cast<unsigned char *
>(buffer);
336 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
343 auto size = pos - base;
344 RNTupleSerializer::SerializeFramePostscript(base,
size);
351 auto base =
reinterpret_cast<unsigned char *
>(buffer);
368 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
377 EExtraTypeInfoIds
contentId{EExtraTypeInfoIds::kInvalid};
380 return R__FAIL(
"extra type info record frame too short");
388 std::string typeName;
407 RNTupleSerializer::SerializeUInt64(
locator.GetNBytesOnStorage(), buffer);
408 RNTupleSerializer::SerializeUInt64(
locator.GetPosition<std::uint64_t>(), buffer +
sizeof(std::uint64_t));
410 return sizeof(std::uint64_t) +
sizeof(std::uint64_t);
416 std::uint64_t position;
418 RNTupleSerializer::DeserializeUInt64(buffer +
sizeof(std::uint64_t), position);
427 ?
sizeof(std::uint64_t)
428 :
sizeof(std::uint32_t);
431 RNTupleSerializer::SerializeUInt32(
locator.GetNBytesOnStorage(), buffer);
433 RNTupleSerializer::SerializeUInt64(
locator.GetNBytesOnStorage(), buffer);
443 std::uint64_t location;
448 RNTupleSerializer::DeserializeUInt64(buffer +
sizeof(std::uint32_t), location);
453 RNTupleSerializer::DeserializeUInt64(buffer +
sizeof(std::uint64_t), location);
466 auto base =
reinterpret_cast<unsigned char *
>(buffer);
470 pos += RNTupleSerializer::SerializeRecordFramePreamble(*
where);
475 pos += RNTupleSerializer::SerializeFramePostscript(buffer ? base : nullptr, pos - base);
481 std::span<const ROOT::DescriptorId_t>
fieldList,
485 auto base =
reinterpret_cast<unsigned char *
>(buffer);
495 for (
const auto &
c : desc.GetColumnIterable(
parentId)) {
496 if (!
c.IsAliasColumn() || (
xHeader &&
xHeader->ContainsExtendedColumnRepresentation(
c.GetLogicalId())))
509 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
519 return R__FAIL(
"alias column record frame too short");
532 std::uint64_t &
xxhash3,
void *buffer)
534 if (buffer !=
nullptr) {
548 return R__FAIL(
"XxHash-3 checksum mismatch");
561 if (buffer !=
nullptr) {
562 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
563 bytes[0] = (val & 0x00FF);
564 bytes[1] = (val & 0xFF00) >> 8;
571 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
572 val = std::int16_t(
bytes[0]) + (std::int16_t(
bytes[1]) << 8);
578 return SerializeInt16(val, buffer);
583 return DeserializeInt16(buffer, *
reinterpret_cast<std::int16_t *
>(&val));
588 if (buffer !=
nullptr) {
589 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
590 bytes[0] = (val & 0x000000FF);
591 bytes[1] = (val & 0x0000FF00) >> 8;
592 bytes[2] = (val & 0x00FF0000) >> 16;
593 bytes[3] = (val & 0xFF000000) >> 24;
600 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
601 val = std::int32_t(
bytes[0]) + (std::int32_t(
bytes[1]) << 8) + (std::int32_t(
bytes[2]) << 16) +
602 (std::int32_t(
bytes[3]) << 24);
608 return SerializeInt32(val, buffer);
613 return DeserializeInt32(buffer, *
reinterpret_cast<std::int32_t *
>(&val));
618 if (buffer !=
nullptr) {
619 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
620 bytes[0] = (val & 0x00000000000000FF);
621 bytes[1] = (val & 0x000000000000FF00) >> 8;
622 bytes[2] = (val & 0x0000000000FF0000) >> 16;
623 bytes[3] = (val & 0x00000000FF000000) >> 24;
624 bytes[4] = (val & 0x000000FF00000000) >> 32;
625 bytes[5] = (val & 0x0000FF0000000000) >> 40;
626 bytes[6] = (val & 0x00FF000000000000) >> 48;
627 bytes[7] = (val & 0xFF00000000000000) >> 56;
634 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
635 val = std::int64_t(
bytes[0]) + (std::int64_t(
bytes[1]) << 8) + (std::int64_t(
bytes[2]) << 16) +
636 (std::int64_t(
bytes[3]) << 24) + (std::int64_t(
bytes[4]) << 32) + (std::int64_t(
bytes[5]) << 40) +
637 (std::int64_t(
bytes[6]) << 48) + (std::int64_t(
bytes[7]) << 56);
643 return SerializeInt64(val, buffer);
648 return DeserializeInt64(buffer, *
reinterpret_cast<std::int64_t *
>(&val));
654 auto pos =
reinterpret_cast<unsigned char *
>(buffer);
655 pos += SerializeUInt32(val.length(), pos);
656 memcpy(pos, val.data(), val.length());
658 return sizeof(std::uint32_t) + val.length();
665 if (
bufSize <
sizeof(std::uint32_t))
666 return R__FAIL(
"string buffer too short");
667 bufSize -=
sizeof(std::uint32_t);
669 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
674 return R__FAIL(
"string buffer too short");
678 return sizeof(std::uint32_t) +
length;
714 if (
type == kTestFutureType)
715 return SerializeUInt16(0x99, buffer);
777 return SerializeUInt16(0x99, buffer);
831 auto base =
reinterpret_cast<unsigned char *
>(buffer);
833 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
844 if (
size <
sizeof(std::uint64_t))
846 if (
size >=
static_cast<uint64_t
>(1) << 48)
868 const std::uint64_t
minEnvelopeSize =
sizeof(std::uint64_t) +
sizeof(std::uint64_t);
870 return R__FAIL(
"invalid envelope buffer, too short");
872 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
880 return R__FAIL(
"envelope type mismatch: expected " + std::to_string(
expectedType) +
", found " +
886 return R__FAIL(
"envelope buffer size too small");
888 return R__FAIL(
"invalid envelope, too short");
908 return SerializeInt64(1, buffer);
914 auto base =
reinterpret_cast<unsigned char *
>(buffer);
916 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
919 pos += SerializeInt64(-1, *
where);
931 DeserializeInt64(frame, marker);
934 SerializeInt64(marker *
static_cast<int64_t
>(
size), frame);
943 std::uint64_t
minSize =
sizeof(std::int64_t);
945 return R__FAIL(
"frame too short");
947 std::int64_t *
ssize =
reinterpret_cast<std::int64_t *
>(&
frameSize);
948 DeserializeInt64(buffer, *
ssize);
950 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
958 minSize +=
sizeof(std::uint32_t);
960 return R__FAIL(
"frame too short");
966 return R__FAIL(
"corrupt frame size");
968 return R__FAIL(
"frame too short");
970 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
986 return SerializeUInt64(0, buffer);
989 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
991 for (
unsigned i = 0; i < flags.size(); ++i) {
992 if (flags[i] & 0x8000000000000000)
996 if (i == (flags.size() - 1))
997 SerializeUInt64(flags[i],
bytes);
999 bytes += SerializeUInt64(flags[i] | 0x8000000000000000,
bytes);
1002 return (flags.size() *
sizeof(std::int64_t));
1007 std::vector<std::uint64_t> &flags)
1009 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
1014 if (
bufSize <
sizeof(std::uint64_t))
1015 return R__FAIL(
"feature flag buffer too short");
1017 bufSize -=
sizeof(std::uint64_t);
1018 flags.emplace_back(
f & ~0x8000000000000000);
1019 }
while (
f & 0x8000000000000000);
1021 return (flags.size() *
sizeof(std::uint64_t));
1030 std::uint32_t
size = 0;
1032 (
locator.GetNBytesOnStorage() <= std::numeric_limits<std::int32_t>::max())) {
1033 size += SerializeUInt32(
locator.GetNBytesOnStorage(), buffer);
1034 size += SerializeUInt64(
locator.GetPosition<std::uint64_t>(),
1035 buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
1040 auto payloadp = buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
sizeof(std::int32_t) :
nullptr;
1059 std::int32_t head =
sizeof(std::int32_t) +
size;
1060 head |=
locator.GetReserved() << 16;
1061 head |=
static_cast<int>(
locatorType & 0x7F) << 24;
1071 if (
bufSize <
sizeof(std::int32_t))
1072 return R__FAIL(
"too short locator");
1074 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
1078 bufSize -=
sizeof(std::int32_t);
1081 const int type = head >> 24;
1082 const std::uint32_t
payloadSize = (
static_cast<std::uint32_t
>(head) & 0x0000FFFF) -
sizeof(std::int32_t);
1084 return R__FAIL(
"too short locator");
1086 locator.SetReserved(
static_cast<std::uint32_t
>(head >> 16) & 0xFF);
1100 if (
bufSize <
sizeof(std::uint64_t))
1101 return R__FAIL(
"too short locator");
1105 locator.SetNBytesOnStorage(head);
1109 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
1116 size += SerializeLocator(
envelopeLink.fLocator, buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
1124 if (
bufSize <
sizeof(std::int64_t))
1125 return R__FAIL(
"too short envelope link");
1127 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
1129 bufSize -=
sizeof(std::uint64_t);
1134 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
1141 if (
clusterSummary.fNEntries >= (
static_cast<std::uint64_t
>(1) << 56)) {
1142 throw RException(
R__FAIL(
"number of entries in cluster exceeds maximum of 2^56"));
1145 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1147 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1150 pos += SerializeRecordFramePreamble(*
where);
1156 auto size = pos - frame;
1157 pos += SerializeFramePostscript(frame,
size);
1165 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1175 return R__FAIL(
"too short cluster summary");
1185 return R__FAIL(
"sharded cluster flag set in cluster summary; sharded clusters are currently unsupported.");
1197 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1199 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1202 pos += SerializeRecordFramePreamble(*
where);
1207 auto size = pos - frame;
1208 pos += SerializeFramePostscript(frame,
size);
1216 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1226 if (
fnFrameSizeLeft() <
sizeof(std::uint32_t) + 2 *
sizeof(std::uint64_t))
1227 return R__FAIL(
"too short cluster group");
1259 std::vector<ROOT::DescriptorId_t>
fieldTrees;
1268 if (!
c.IsAliasColumn()) {
1269 MapPhysicalColumnId(
c.GetPhysicalId());
1280 MapPhysicalColumnId(
columnDesc.GetPhysicalId());
1291 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1293 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1297 std::vector<std::reference_wrapper<const RColumnDescriptor>>
extraColumns;
1317 (
xHeader->GetNLogicalColumns() -
xHeader->GetNPhysicalColumns());
1333 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1339 if (!
c.get().IsAliasColumn()) {
1343 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1349 if (
c.get().IsAliasColumn()) {
1353 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1358 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1360 return static_cast<std::uint32_t
>(pos - base);
1367 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1383 for (
unsigned i = 0; i <
nFields; ++i) {
1427 if (
descBuilder.GetDescriptor().GetNLogicalColumns() >
descBuilder.GetDescriptor().GetNPhysicalColumns())
1431 for (
unsigned i = 0; i <
nColumns; ++i) {
1504 return bytes - base;
1513 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1515 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1517 pos += SerializeEnvelopePreamble(kEnvelopeTypeHeader, *
where);
1525 pos += SerializeSchemaDescription(*
where, desc, context);
1527 std::uint64_t
size = pos - base;
1541 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1543 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1545 pos += SerializeEnvelopePreamble(kEnvelopeTypePageList, *
where);
1580 pos += SerializeListFramePreamble(0, *
where);
1581 pos += SerializeInt64(kSuppressedColumnMarker, *
where);
1584 pos += SerializeListFramePreamble(
pageRange.fPageInfos.size(), *
where);
1586 for (
const auto &pi :
pageRange.fPageInfos) {
1587 std::int32_t
nElements = pi.fHasChecksum ? -
static_cast<std::int32_t
>(pi.fNElements) : pi.fNElements;
1589 pos += SerializeLocator(pi.fLocator, *
where);
1601 std::uint64_t
size = pos - base;
1602 size += SerializeEnvelopePostscript(base,
size);
1611 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1613 void **
where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void **
>(&pos);
1615 pos += SerializeEnvelopePreamble(kEnvelopeTypeFooter, *
where);
1618 pos += SerializeFeatureFlags(std::vector<std::uint64_t>(), *
where);
1623 pos += SerializeRecordFramePreamble(*
where);
1624 pos += SerializeSchemaDescription(*
where, desc, context,
true);
1625 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1641 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1643 std::uint32_t
size = pos - base;
1644 size += SerializeEnvelopePostscript(base,
size);
1652 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1669 for (std::size_t i = 0; i <
featureFlags.size(); ++i) {
1672 unsigned int bit = 0;
1675 return R__FAIL(
"unsupported format feature: " + std::to_string(i * 64 +
bit));
1697 .FieldId(kZeroFieldId)
1712 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1733 if (
fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint64_t)))
1734 return R__FAIL(
"footer too short");
1737 return R__FAIL(
"XxHash-3 mismatch between header and footer");
1771 .PageListLocator(
clusterGroup.fPageListEnvelopeLink.fLocator)
1772 .PageListLength(
clusterGroup.fPageListEnvelopeLink.fLength)
1788 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1799 if (
fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint64_t)))
1800 return R__FAIL(
"page list too short");
1803 return R__FAIL(
"XxHash-3 mismatch between header and page list");
1844 return R__FAIL(
"mismatch between number of clusters and number of cluster summaries");
1846 for (std::uint32_t i = 0; i <
nClusters; ++i) {
1870 for (std::uint32_t k = 0; k <
nPages; ++k) {
1872 return R__FAIL(
"inner frame too short");
1889 return R__FAIL(
"page list frame too short");
1894 return R__FAIL(
"unexpected non-empty page list");
1898 return R__FAIL(
"page list frame too short");
1925 std::vector<RClusterDescriptor>
clusters;
1930 case EDescriptorDeserializeMode::kForReading:
1932 if (
auto res = builder.CommitSuppressedColumnRanges(desc); !res)
1934 builder.AddExtendedColumnRanges(desc);
1935 clusters.emplace_back(builder.MoveDescriptor().Unwrap());
1938 case EDescriptorDeserializeMode::kForWriting:
1940 if (
auto res = builder.CommitSuppressedColumnRanges(desc); !res)
1942 clusters.emplace_back(builder.MoveDescriptor().Unwrap());
1945 case EDescriptorDeserializeMode::kRaw:
1947 clusters.emplace_back(builder.MoveDescriptor().Unwrap());
#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(...)
#define R__LOG_DEBUG(DEBUGLEVEL,...)
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.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
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 offset
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 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 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.
RClusterDescriptorBuilder & NEntries(std::uint64_t nEntries)
RClusterDescriptorBuilder & FirstEntryIndex(std::uint64_t firstEntryIndex)
RClusterDescriptorBuilder & ClusterId(ROOT::DescriptorId_t clusterId)
A helper class for piece-wise construction of an RClusterGroupDescriptor.
A helper class for piece-wise construction of an RColumnDescriptor.
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.
ROOT::DescriptorId_t GetMemClusterGroupId(ROOT::DescriptorId_t onDiskId) const
ROOT::DescriptorId_t GetOnDiskFieldId(ROOT::DescriptorId_t memId) const
ROOT::DescriptorId_t GetOnDiskColumnId(ROOT::DescriptorId_t memId) const
std::uint64_t GetHeaderXxHash3() const
void SetHeaderXxHash3(std::uint64_t xxhash3)
ROOT::DescriptorId_t GetMemClusterId(ROOT::DescriptorId_t onDiskId) const
ROOT::DescriptorId_t GetMemColumnId(ROOT::DescriptorId_t onDiskId) const
void SetHeaderSize(std::uint64_t size)
const std::vector< ROOT::DescriptorId_t > & GetOnDiskFieldList() const
Return a vector containing the in-memory field ID for each on-disk counterpart, in order,...
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 > DeserializeColumnType(const void *buffer, ROOT::ENTupleColumnType &type)
static std::uint32_t SerializeListFramePreamble(std::uint32_t nitems, void *buffer)
static RResult< std::uint32_t > DeserializeSchemaDescription(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< std::uint32_t > DeserializeFieldStructure(const void *buffer, ROOT::ENTupleStructure &structure)
static RResult< StreamerInfoMap_t > DeserializeStreamerInfos(const std::string &extraTypeInfoContent)
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 RResult< std::uint32_t > DeserializeEnvelope(const void *buffer, std::uint64_t bufSize, std::uint16_t expectedType)
static std::uint32_t DeserializeUInt16(const void *buffer, std::uint16_t &val)
static RResult< std::uint32_t > DeserializeString(const void *buffer, std::uint64_t bufSize, std::string &val)
static RResult< std::uint32_t > DeserializeFeatureFlags(const void *buffer, std::uint64_t bufSize, std::vector< std::uint64_t > &flags)
static std::uint32_t SerializeColumnType(ROOT::ENTupleColumnType type, void *buffer)
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 RResult< std::uint32_t > DeserializeEnvelopeLink(const void *buffer, std::uint64_t bufSize, REnvelopeLink &envelopeLink)
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)
EDescriptorDeserializeMode
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 std::uint32_t SerializeSchemaDescription(void *buffer, const RNTupleDescriptor &desc, const RContext &context, bool forHeaderExtension=false)
Serialize the schema description in desc into buffer.
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 RResult< void > DeserializeFooter(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< std::vector< RClusterDescriptorBuilder > > DeserializePageListRaw(const void *buffer, std::uint64_t bufSize, ROOT::DescriptorId_t clusterGroupId, const RNTupleDescriptor &desc)
static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static RResult< void > DeserializeHeader(const void *buffer, std::uint64_t bufSize, RNTupleDescriptorBuilder &descBuilder)
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 SerializePageList(void *buffer, const RNTupleDescriptor &desc, std::span< ROOT::DescriptorId_t > physClusterIDs, const RContext &context)
static RResult< std::uint32_t > DeserializeClusterGroup(const void *buffer, std::uint64_t bufSize, RClusterGroup &clusterGroup)
static RResult< std::uint32_t > DeserializeExtraTypeInfoId(const void *buffer, ROOT::Experimental::EExtraTypeInfoIds &id)
static std::uint32_t SerializeEnvelopeLink(const REnvelopeLink &envelopeLink, void *buffer)
static 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 std::uint32_t SerializeRecordFramePreamble(void *buffer)
static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer)
static RResult< std::uint32_t > DeserializeLocator(const void *buffer, std::uint64_t bufSize, RNTupleLocator &locator)
static std::uint32_t SerializeClusterGroup(const RClusterGroup &clusterGroup, void *buffer)
static std::uint32_t SerializeFooter(void *buffer, const RNTupleDescriptor &desc, const RContext &context)
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 SerializeInt64(std::int64_t val, void *buffer)
static RResult< std::uint32_t > DeserializeClusterSummary(const void *buffer, std::uint64_t bufSize, RClusterSummary &clusterSummary)
static std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
static RResult< void > DeserializePageList(const void *buffer, std::uint64_t bufSize, ROOT::DescriptorId_t clusterGroupId, RNTupleDescriptor &desc, EDescriptorDeserializeMode mode)
static std::uint32_t SerializeExtraTypeInfoId(ROOT::Experimental::EExtraTypeInfoIds id, void *buffer)
Meta-data stored for every column of an ntuple.
Meta-data stored for every field of an ntuple.
The on-storage meta-data of an ntuple.
std::size_t GetNLogicalColumns() const
const RClusterGroupDescriptor & GetClusterGroupDescriptor(ROOT::DescriptorId_t clusterGroupId) const
RResult< void > AddClusterGroupDetails(ROOT::DescriptorId_t clusterGroupId, std::vector< RClusterDescriptor > &clusterDescs)
Methods to load and drop cluster group details (cluster IDs and page locations)
const std::string & GetName() const
std::uint64_t GetOnDiskHeaderXxHash3() const
ROOT::DescriptorId_t GetFieldZeroId() const
Returns the logical parent of all top-level NTuple data fields.
RColumnDescriptorIterable GetColumnIterable() const
const RColumnDescriptor & GetColumnDescriptor(ROOT::DescriptorId_t columnId) const
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
std::size_t GetNExtraTypeInfos() const
std::size_t GetNFields() const
std::size_t GetNClusterGroups() const
std::size_t GetNPhysicalColumns() const
const std::string & GetDescription() const
const RClusterDescriptor & GetClusterDescriptor(ROOT::DescriptorId_t clusterId) const
const RHeaderExtension * GetHeaderExtension() const
Return header extension information; if the descriptor does not have a header extension,...
RFieldDescriptorIterable GetFieldIterable(const RFieldDescriptor &fieldDesc) const
std::vector< std::uint64_t > GetFeatureFlags() const
Base class for all ROOT issued exceptions.
RNTupleLocator payload that is common for object stores using 64bit location information.
Generic information about the physical location of data.
const_iterator begin() const
const_iterator end() const
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
TObject * ReadObject(const TClass *cl) override
Read object from I/O buffer.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
Wrapper around a TObject so it can be stored in a TList.
Describes a persistent version of a class.
constexpr RNTupleLocator::ELocatorType kTestLocatorType
constexpr ROOT::ENTupleStructure kTestFutureFieldStructure
EExtraTypeInfoIds
Used in RExtraTypeInfoDescriptor.
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr DescriptorId_t kInvalidDescriptorId
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.