28#include <unordered_map>
37std::uint32_t SerializeFieldV1(
41 auto base =
reinterpret_cast<unsigned char *
>(buffer);
43 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
45 pos += RNTupleSerializer::SerializeRecordFramePreamble(*where);
47 pos += RNTupleSerializer::SerializeUInt32(fieldDesc.
GetFieldVersion(), *where);
48 pos += RNTupleSerializer::SerializeUInt32(fieldDesc.
GetTypeVersion(), *where);
49 pos += RNTupleSerializer::SerializeUInt32(physParentId, *where);
50 pos += RNTupleSerializer::SerializeFieldStructure(fieldDesc.
GetStructure(), *where);
52 pos += RNTupleSerializer::SerializeUInt16(RNTupleSerializer::kFlagRepetitiveField, *where);
53 pos += RNTupleSerializer::SerializeUInt64(fieldDesc.
GetNRepetitions(), *where);
55 pos += RNTupleSerializer::SerializeUInt16(0, *where);
57 pos += RNTupleSerializer::SerializeString(fieldDesc.
GetFieldName(), *where);
58 pos += RNTupleSerializer::SerializeString(fieldDesc.
GetTypeName(), *where);
59 pos += RNTupleSerializer::SerializeString(
"" , *where);
62 auto size = pos - base;
63 RNTupleSerializer::SerializeFramePostscript(base,
size);
68std::uint32_t SerializeFieldTree(
73 auto base =
reinterpret_cast<unsigned char *
>(buffer);
75 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
77 std::deque<ROOT::Experimental::DescriptorId_t> idQueue{desc.
GetFieldZeroId()};
79 while (!idQueue.empty()) {
80 auto parentId = idQueue.front();
86 pos += SerializeFieldV1(
f, physParentId, *where);
87 idQueue.push_back(
f.GetId());
96 std::uint32_t bufSize,
101 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
103 std::uint32_t frameSize;
104 auto fnFrameSizeLeft = [&]() {
return frameSize -
static_cast<std::uint32_t
>(
bytes - base); };
105 auto result = RNTupleSerializer::DeserializeFrameHeader(
bytes, bufSize, frameSize);
110 std::uint32_t fieldVersion;
111 std::uint32_t typeVersion;
112 std::uint32_t parentId;
114 ENTupleStructure structure{ENTupleStructure::kLeaf};
116 if (fnFrameSizeLeft() < 3 *
sizeof(std::uint32_t) +
117 RNTupleSerializer::SerializeFieldStructure(structure,
nullptr) +
118 sizeof(std::uint16_t))
120 return R__FAIL(
"field record frame too short");
122 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, fieldVersion);
123 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, typeVersion);
124 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, parentId);
125 auto res16 = RNTupleSerializer::DeserializeFieldStructure(
bytes, structure);
128 bytes += res16.Unwrap();
129 bytes += RNTupleSerializer::DeserializeUInt16(
bytes, flags);
132 if (flags & RNTupleSerializer::kFlagRepetitiveField) {
133 if (fnFrameSizeLeft() <
sizeof(std::uint64_t))
134 return R__FAIL(
"field record frame too short");
135 std::uint64_t nRepetitions;
136 bytes += RNTupleSerializer::DeserializeUInt64(
bytes, nRepetitions);
140 std::string fieldName;
141 std::string typeName;
142 std::string aliasName;
143 std::string description;
144 result = RNTupleSerializer::DeserializeString(
bytes, fnFrameSizeLeft(), fieldName).Unwrap();
148 result = RNTupleSerializer::DeserializeString(
bytes, fnFrameSizeLeft(), typeName).Unwrap();
152 result = RNTupleSerializer::DeserializeString(
bytes, fnFrameSizeLeft(), aliasName).Unwrap();
156 result = RNTupleSerializer::DeserializeString(
bytes, fnFrameSizeLeft(), description).Unwrap();
165std::uint32_t SerializeColumnListV1(
172 auto base =
reinterpret_cast<unsigned char *
>(buffer);
174 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
176 std::deque<ROOT::Experimental::DescriptorId_t> idQueue{desc.
GetFieldZeroId()};
178 while (!idQueue.empty()) {
179 auto parentId = idQueue.front();
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);
189 pos += RNTupleSerializer::SerializeUInt32(context.
GetPhysFieldId(
c.GetFieldId()), *where);
190 std::uint32_t flags = 0;
192 if (
c.GetModel().GetIsSorted())
193 flags |= RNTupleSerializer::kFlagSortAscColumn;
196 flags |= RNTupleSerializer::kFlagNonNegativeColumn;
197 pos += RNTupleSerializer::SerializeUInt32(flags, *where);
199 pos += RNTupleSerializer::SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
205 idQueue.push_back(
f.GetId());
213 std::uint32_t bufSize,
218 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
220 std::uint32_t frameSize;
221 auto fnFrameSizeLeft = [&]() {
return frameSize -
static_cast<std::uint32_t
>(
bytes - base); };
222 auto result = RNTupleSerializer::DeserializeFrameHeader(
bytes, bufSize, frameSize);
229 std::uint16_t bitsOnStorage;
230 std::uint32_t fieldId;
232 if (fnFrameSizeLeft() < RNTupleSerializer::SerializeColumnType(
type,
nullptr) +
233 sizeof(std::uint16_t) + 2 *
sizeof(std::uint32_t))
235 return R__FAIL(
"column record frame too short");
237 auto res16 = RNTupleSerializer::DeserializeColumnType(
bytes,
type);
240 bytes += res16.Unwrap();
241 bytes += RNTupleSerializer::DeserializeUInt16(
bytes, bitsOnStorage);
242 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, fieldId);
243 bytes += RNTupleSerializer::DeserializeUInt32(
bytes, flags);
246 return R__FAIL(
"column element size mismatch");
248 const bool isSorted = (flags & (RNTupleSerializer::kFlagSortAscColumn | RNTupleSerializer::kFlagSortDesColumn));
256 const auto &uri = locator.
GetPosition<std::string>();
257 if (uri.length() >= (1 << 16))
260 memcpy(buffer, uri.data(), uri.length());
264void DeserializeLocatorPayloadURI(
const unsigned char *buffer, std::uint32_t payloadSize,
268 auto &uri = locator.
fPosition.emplace<std::string>();
269 uri.resize(payloadSize);
270 memcpy(uri.data(), buffer, payloadSize);
278 RNTupleSerializer::SerializeUInt64(
data.fLocation, buffer +
sizeof(std::uint32_t));
280 return sizeof(std::uint32_t) +
sizeof(std::uint64_t);
287 RNTupleSerializer::DeserializeUInt64(buffer +
sizeof(std::uint32_t),
data.fLocation);
294 const unsigned char *
data, std::uint32_t
length, std::uint32_t &crc32,
void *buffer)
296 if (buffer !=
nullptr) {
297 crc32 = R__crc32(0,
nullptr, 0);
305 const unsigned char *
data, std::uint32_t
length, std::uint32_t &crc32)
307 auto checksumReal = R__crc32(0,
nullptr, 0);
308 checksumReal = R__crc32(checksumReal,
data,
length);
310 if (crc32 != checksumReal)
311 return R__FAIL(
"CRC32 checksum mismatch");
317 const unsigned char *
data, std::uint32_t
length)
326 if (buffer !=
nullptr) {
327 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
328 bytes[0] = (val & 0x00FF);
329 bytes[1] = (val & 0xFF00) >> 8;
336 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
337 val = std::int16_t(
bytes[0]) + (std::int16_t(
bytes[1]) << 8);
343 return SerializeInt16(val, buffer);
348 return DeserializeInt16(buffer, *
reinterpret_cast<std::int16_t *
>(&val));
353 if (buffer !=
nullptr) {
354 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
355 bytes[0] = (val & 0x000000FF);
356 bytes[1] = (val & 0x0000FF00) >> 8;
357 bytes[2] = (val & 0x00FF0000) >> 16;
358 bytes[3] = (val & 0xFF000000) >> 24;
365 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
366 val = std::int32_t(
bytes[0]) + (std::int32_t(
bytes[1]) << 8) +
367 (std::int32_t(
bytes[2]) << 16) + (std::int32_t(
bytes[3]) << 24);
373 return SerializeInt32(val, buffer);
378 return DeserializeInt32(buffer, *
reinterpret_cast<std::int32_t *
>(&val));
383 if (buffer !=
nullptr) {
384 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
385 bytes[0] = (val & 0x00000000000000FF);
386 bytes[1] = (val & 0x000000000000FF00) >> 8;
387 bytes[2] = (val & 0x0000000000FF0000) >> 16;
388 bytes[3] = (val & 0x00000000FF000000) >> 24;
389 bytes[4] = (val & 0x000000FF00000000) >> 32;
390 bytes[5] = (val & 0x0000FF0000000000) >> 40;
391 bytes[6] = (val & 0x00FF000000000000) >> 48;
392 bytes[7] = (val & 0xFF00000000000000) >> 56;
399 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
400 val = std::int64_t(
bytes[0]) + (std::int64_t(
bytes[1]) << 8) +
401 (std::int64_t(
bytes[2]) << 16) + (std::int64_t(
bytes[3]) << 24) +
402 (std::int64_t(
bytes[4]) << 32) + (std::int64_t(
bytes[5]) << 40) +
403 (std::int64_t(
bytes[6]) << 48) + (std::int64_t(
bytes[7]) << 56);
409 return SerializeInt64(val, buffer);
414 return DeserializeInt64(buffer, *
reinterpret_cast<std::int64_t *
>(&val));
420 auto pos =
reinterpret_cast<unsigned char *
>(buffer);
421 pos += SerializeUInt32(val.length(), pos);
422 memcpy(pos, val.data(), val.length());
424 return sizeof(std::uint32_t) + val.length();
428 const void *buffer, std::uint32_t bufSize, std::string &val)
430 if (bufSize <
sizeof(std::uint32_t))
431 return R__FAIL(
"string buffer too short");
432 bufSize -=
sizeof(std::uint32_t);
434 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
439 return R__FAIL(
"string buffer too short");
443 return sizeof(std::uint32_t) +
length;
453 return SerializeUInt16(0x02, buffer);
455 return SerializeUInt16(0x03, buffer);
457 return SerializeUInt16(0x04, buffer);
459 return SerializeUInt16(0x05, buffer);
461 return SerializeUInt16(0x06, buffer);
463 return SerializeUInt16(0x07, buffer);
465 return SerializeUInt16(0x08, buffer);
467 return SerializeUInt16(0x09, buffer);
469 return SerializeUInt16(0x0A, buffer);
471 return SerializeUInt16(0x0B, buffer);
473 return SerializeUInt16(0x0C, buffer);
475 return SerializeUInt16(0x0D, buffer);
486 std::uint16_t onDiskType;
487 auto result = DeserializeUInt16(buffer, onDiskType);
488 switch (onDiskType) {
526 return R__FAIL(
"unexpected on-disk column type");
538 return SerializeUInt16(0x00, buffer);
540 return SerializeUInt16(0x01, buffer);
542 return SerializeUInt16(0x02, buffer);
544 return SerializeUInt16(0x03, buffer);
546 return SerializeUInt16(0x04, buffer);
557 std::uint16_t onDiskValue;
558 auto result = DeserializeUInt16(buffer, onDiskValue);
559 switch (onDiskValue) {
576 return R__FAIL(
"unexpected on-disk field structure value");
586 auto base =
reinterpret_cast<unsigned char *
>(buffer);
588 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
590 pos += SerializeUInt16(kEnvelopeCurrentVersion, *where);
591 pos += SerializeUInt16(kEnvelopeMinVersion, *where);
597 const unsigned char *envelope, std::uint32_t
size, std::uint32_t &crc32,
void *buffer)
599 return SerializeCRC32(envelope,
size, crc32, buffer);
603 const unsigned char *envelope, std::uint32_t
size,
void *buffer)
606 return SerializeEnvelopePostscript(envelope,
size, crc32, buffer);
612 const void *buffer, std::uint32_t bufSize, std::uint32_t &crc32)
614 if (bufSize < (2 *
sizeof(std::uint16_t) +
sizeof(std::uint32_t)))
615 return R__FAIL(
"invalid envelope, too short");
617 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
620 std::uint16_t protocolVersionAtWrite;
621 std::uint16_t protocolVersionMinRequired;
622 bytes += DeserializeUInt16(
bytes, protocolVersionAtWrite);
624 if (protocolVersionAtWrite < 1)
625 return R__FAIL(
"The RNTuple format is too old (version 0)");
627 bytes += DeserializeUInt16(
bytes, protocolVersionMinRequired);
628 if (protocolVersionMinRequired > kEnvelopeCurrentVersion) {
629 return R__FAIL(std::string(
"The RNTuple format is too new (version ") +
630 std::to_string(protocolVersionMinRequired) +
")");
634 auto result = VerifyCRC32(base, bufSize - 4, crc32);
638 return sizeof(protocolVersionAtWrite) +
sizeof(protocolVersionMinRequired);
643 const void *buffer, std::uint32_t bufSize)
653 return SerializeInt32(1, buffer);
658 std::uint32_t
nitems,
void *buffer)
663 auto base =
reinterpret_cast<unsigned char *
>(buffer);
665 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
669 pos += SerializeUInt32(
nitems, *where);
674 void *frame, std::int32_t
size)
678 if (
size <
static_cast<std::int32_t
>(
sizeof(std::int32_t)))
682 DeserializeInt32(frame, marker);
683 if ((marker < 0) && (
size <
static_cast<std::int32_t
>(2 *
sizeof(std::int32_t))))
686 SerializeInt32(marker *
size, frame);
692 const void *buffer, std::uint32_t bufSize, std::uint32_t &frameSize, std::uint32_t &
nitems)
694 if (bufSize <
sizeof(std::int32_t))
695 return R__FAIL(
"frame too short");
697 std::int32_t *ssize =
reinterpret_cast<std::int32_t *
>(&frameSize);
698 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
703 if (frameSize <
sizeof(std::int32_t))
704 return R__FAIL(
"corrupt record frame size");
707 if (bufSize < 2 *
sizeof(std::int32_t))
708 return R__FAIL(
"frame too short");
712 if (frameSize < 2 *
sizeof(std::int32_t))
713 return R__FAIL(
"corrupt list frame size");
716 if (bufSize < frameSize)
717 return R__FAIL(
"frame too short");
719 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
723 const void *buffer, std::uint32_t bufSize, std::uint32_t &frameSize)
730 const std::vector<std::int64_t> &flags,
void *buffer)
733 return SerializeInt64(0, buffer);
736 auto bytes =
reinterpret_cast<unsigned char *
>(buffer);
738 for (
unsigned i = 0; i < flags.size(); ++i) {
743 if (i == (flags.size() - 1))
744 SerializeInt64(flags[i],
bytes);
746 bytes += SerializeInt64(flags[i] | 0x8000000000000000,
bytes);
749 return (flags.size() *
sizeof(std::int64_t));
753 const void *buffer, std::uint32_t bufSize, std::vector<std::int64_t> &flags)
755 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
760 if (bufSize <
sizeof(std::int64_t))
761 return R__FAIL(
"feature flag buffer too short");
763 bufSize -=
sizeof(std::int64_t);
764 flags.emplace_back(
f & ~0x8000000000000000);
767 return (flags.size() *
sizeof(std::int64_t));
773 std::uint32_t
size = 0;
779 buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
783 auto payloadp = buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
sizeof(std::int32_t) :
nullptr;
784 switch (locator.
fType) {
789 std::int32_t head =
sizeof(std::int32_t) +
size;
791 head |=
static_cast<int>(locator.
fType & 0x7F) << 24;
798 const void *buffer, std::uint32_t bufSize,
RNTupleLocator &locator)
800 if (bufSize <
sizeof(std::int32_t))
801 return R__FAIL(
"too short locator");
803 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
807 bufSize -=
sizeof(std::int32_t);
810 const int type = head >> 24;
811 const std::uint32_t payloadSize = (
static_cast<std::uint32_t
>(head) & 0x0000FFFF) -
sizeof(std::int32_t);
812 if (bufSize < payloadSize)
813 return R__FAIL(
"too short locator");
815 locator.
fReserved =
static_cast<std::uint32_t
>(head >> 16) & 0xFF;
819 default:
return R__FAIL(
"unsupported locator type: " + std::to_string(
type));
821 bytes += payloadSize;
823 if (bufSize <
sizeof(std::uint64_t))
824 return R__FAIL(
"too short locator");
831 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
839 buffer ?
reinterpret_cast<unsigned char *
>(buffer) +
size :
nullptr);
844 const void *buffer, std::uint32_t bufSize,
REnvelopeLink &envelopeLink)
846 if (bufSize <
sizeof(std::int32_t))
847 return R__FAIL(
"too short envelope link");
849 auto bytes =
reinterpret_cast<const unsigned char *
>(buffer);
851 bufSize -=
sizeof(std::uint32_t);
856 return bytes -
reinterpret_cast<const unsigned char *
>(buffer);
863 auto base =
reinterpret_cast<unsigned char *
>(buffer);
865 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
868 pos += SerializeRecordFramePreamble(*where);
869 pos += SerializeUInt64(clusterSummary.
fFirstEntry, *where);
871 pos += SerializeInt64(-
static_cast<int64_t
>(clusterSummary.
fNEntries), *where);
874 pos += SerializeInt64(
static_cast<int64_t
>(clusterSummary.
fNEntries), *where);
876 auto size = pos - frame;
877 pos += SerializeFramePostscript(frame,
size);
883 const void *buffer, std::uint32_t bufSize,
RClusterSummary &clusterSummary)
885 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
887 std::uint32_t frameSize;
888 auto result = DeserializeFrameHeader(
bytes, bufSize, frameSize);
893 auto fnBufSizeLeft = [&]() {
return frameSize -
static_cast<std::uint32_t
>(
bytes - base); };
894 if (fnBufSizeLeft() < 2 *
sizeof(std::uint64_t))
895 return R__FAIL(
"too short cluster summary");
898 std::int64_t nEntries;
902 if (fnBufSizeLeft() <
sizeof(std::uint32_t))
903 return R__FAIL(
"too short cluster summary");
905 std::uint32_t columnGroupID;
906 bytes += DeserializeUInt32(
bytes, columnGroupID);
920 auto base =
reinterpret_cast<unsigned char *
>(buffer);
922 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
925 pos += SerializeRecordFramePreamble(*where);
926 pos += SerializeUInt32(clusterGroup.
fNClusters, *where);
928 auto size = pos - frame;
929 pos += SerializeFramePostscript(frame,
size);
935 const void *buffer, std::uint32_t bufSize,
RClusterGroup &clusterGroup)
937 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
940 std::uint32_t frameSize;
941 auto result = DeserializeFrameHeader(
bytes, bufSize, frameSize);
946 auto fnFrameSizeLeft = [&]() {
return frameSize -
static_cast<std::uint32_t
>(
bytes - base); };
947 if (fnFrameSizeLeft() <
sizeof(std::uint32_t))
948 return R__FAIL(
"too short cluster group");
965 auto base =
reinterpret_cast<unsigned char *
>(buffer);
967 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
969 pos += SerializeEnvelopePreamble(*where);
971 pos += SerializeFeatureFlags(std::vector<std::int64_t>(), *where);
972 pos += SerializeUInt32(kReleaseCandidateTag, *where);
973 pos += SerializeString(desc.
GetName(), *where);
975 pos += SerializeString(std::string(
"ROOT v") +
ROOT_RELEASE, *where);
979 pos += SerializeListFramePreamble(desc.
GetNFields() - 1, *where);
980 pos += SerializeFieldTree(desc, context, *where);
981 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
984 pos += SerializeListFramePreamble(desc.
GetNColumns(), *where);
985 pos += SerializeColumnListV1(desc, context, *where);
986 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
990 pos += SerializeListFramePreamble(0, *where);
991 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
995 pos += SerializeListFramePreamble(0, *where);
996 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
998 std::uint32_t
size = pos - base;
999 std::uint32_t crc32 = 0;
1000 size += SerializeEnvelopePostscript(base,
size, crc32, *where);
1010 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1012 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
1014 pos += SerializeEnvelopePreamble(*where);
1015 auto topMostFrame = pos;
1016 pos += SerializeListFramePreamble(physClusterIDs.size(), *where);
1018 for (
auto clusterId : physClusterIDs) {
1021 std::set<DescriptorId_t> physColumnIds;
1022 for (
auto column : clusterDesc.GetColumnIds())
1025 auto outerFrame = pos;
1026 pos += SerializeListFramePreamble(physColumnIds.size(), *where);
1027 for (
auto physId : physColumnIds) {
1029 const auto &columnRange = clusterDesc.GetColumnRange(memId);
1030 const auto &pageRange = clusterDesc.GetPageRange(memId);
1032 auto innerFrame = pos;
1033 pos += SerializeListFramePreamble(pageRange.fPageInfos.size(), *where);
1035 for (
const auto &pi : pageRange.fPageInfos) {
1036 pos += SerializeUInt32(pi.fNElements, *where);
1037 pos += SerializeLocator(pi.fLocator, *where);
1039 pos += SerializeUInt64(columnRange.fFirstElementIndex, *where);
1040 pos += SerializeUInt32(columnRange.fCompressionSettings, *where);
1042 pos += SerializeFramePostscript(buffer ? innerFrame :
nullptr, pos - innerFrame);
1044 pos += SerializeFramePostscript(buffer ? outerFrame :
nullptr, pos - outerFrame);
1047 pos += SerializeFramePostscript(buffer ? topMostFrame :
nullptr, pos - topMostFrame);
1048 std::uint32_t
size = pos - base;
1049 size += SerializeEnvelopePostscript(base,
size, *where);
1056 auto base =
reinterpret_cast<unsigned char *
>(buffer);
1058 void** where = (buffer ==
nullptr) ? &buffer :
reinterpret_cast<void**
>(&pos);
1060 pos += SerializeEnvelopePreamble(*where);
1063 pos += SerializeFeatureFlags(std::vector<std::int64_t>(), *where);
1068 pos += SerializeListFramePreamble(0, *where);
1069 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1073 pos += SerializeListFramePreamble(0, *where);
1074 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1078 unsigned int nClusters = 0;
1080 nClusters += cgDesc.GetNClusters();
1082 pos += SerializeListFramePreamble(nClusters, *where);
1083 for (
unsigned int i = 0; i < nClusterGroups; ++i) {
1086 const auto &clusterIds = cgDesc.GetClusterIds();
1087 for (
unsigned int j = 0; j < nClustersInGroup; ++j) {
1089 RClusterSummary summary{clusterDesc.GetFirstEntryIndex(), clusterDesc.GetNEntries(), -1};
1090 pos += SerializeClusterSummary(summary, *where);
1093 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1097 pos += SerializeListFramePreamble(nClusterGroups, *where);
1098 for (
unsigned int i = 0; i < nClusterGroups; ++i) {
1101 clusterGroup.
fNClusters = cgDesc.GetNClusters();
1104 pos += SerializeClusterGroup(clusterGroup, *where);
1106 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1110 pos += SerializeListFramePreamble(0, *where);
1111 pos += SerializeFramePostscript(buffer ? frame :
nullptr, pos - frame);
1113 std::uint32_t
size = pos - base;
1114 size += SerializeEnvelopePostscript(base,
size, *where);
1121 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1123 auto fnBufSizeLeft = [&]() {
return bufSize - (
bytes - base); };
1126 std::uint32_t crc32{0};
1127 result = DeserializeEnvelope(
bytes, fnBufSizeLeft(), crc32);
1133 std::vector<std::int64_t> featureFlags;
1134 result = DeserializeFeatureFlags(
bytes, fnBufSizeLeft(), featureFlags);
1138 for (
auto f: featureFlags) {
1143 std::uint32_t rcTag;
1144 if (fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint32_t)))
1145 return R__FAIL(
"header too short");
1152 std::string description;
1158 result = DeserializeString(
bytes, fnBufSizeLeft(), description);
1168 std::uint32_t frameSize;
1170 auto fnFrameSizeLeft = [&]() {
return frameSize - (
bytes - frame); };
1172 std::uint32_t nFields;
1173 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nFields);
1179 .FieldId(kZeroFieldId)
1183 for (std::uint32_t fieldId = 0; fieldId < nFields; ++fieldId) {
1185 result = DeserializeFieldV1(
bytes, fnFrameSizeLeft(), fieldBuilder);
1190 fieldBuilder.
ParentId(kZeroFieldId);
1194 auto parentId = fieldDesc.Inspect().GetParentId();
1195 descBuilder.
AddField(fieldDesc.Unwrap());
1196 auto resVoid = descBuilder.
AddFieldLink(parentId, fieldId);
1200 bytes = frame + frameSize;
1202 std::uint32_t nColumns;
1204 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nColumns);
1208 std::unordered_map<DescriptorId_t, std::uint32_t> maxIndexes;
1209 for (std::uint32_t columnId = 0; columnId < nColumns; ++columnId) {
1211 result = DeserializeColumnV1(
bytes, fnFrameSizeLeft(), columnBuilder);
1216 std::uint32_t idx = 0;
1217 const auto fieldId = columnBuilder.
GetFieldId();
1218 auto maxIdx = maxIndexes.find(fieldId);
1219 if (maxIdx != maxIndexes.end())
1220 idx = maxIdx->second + 1;
1221 maxIndexes[fieldId] = idx;
1226 auto resVoid = descBuilder.
AddColumn(columnDesc.Unwrap());
1230 bytes = frame + frameSize;
1232 std::uint32_t nAliasColumns;
1234 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nAliasColumns);
1238 if (nAliasColumns > 0)
1241 std::uint32_t nTypeInfo;
1243 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nTypeInfo);
1257 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1259 auto fnBufSizeLeft = [&]() {
return bufSize - (
bytes - base); };
1262 result = DeserializeEnvelope(
bytes, fnBufSizeLeft());
1267 std::vector<std::int64_t> featureFlags;
1268 result = DeserializeFeatureFlags(
bytes, fnBufSizeLeft(), featureFlags);
1272 for (
auto f: featureFlags) {
1277 std::uint32_t crc32{0};
1278 if (fnBufSizeLeft() <
static_cast<int>(
sizeof(std::uint32_t)))
1279 return R__FAIL(
"footer too short");
1282 return R__FAIL(
"CRC32 mismatch between header and footer");
1284 std::uint32_t frameSize;
1286 auto fnFrameSizeLeft = [&]() {
return frameSize - (
bytes - frame); };
1288 std::uint32_t nXHeaders;
1289 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nXHeaders);
1294 bytes = frame + frameSize;
1296 std::uint32_t nColumnGroups;
1298 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nColumnGroups);
1301 if (nColumnGroups > 0)
1302 return R__FAIL(
"sharded clusters are still unsupported");
1303 bytes = frame + frameSize;
1305 std::uint32_t nClusterSummaries;
1307 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nClusterSummaries);
1311 for (std::uint32_t clusterId = 0; clusterId < nClusterSummaries; ++clusterId) {
1313 result = DeserializeClusterSummary(
bytes, fnFrameSizeLeft(), clusterSummary);
1318 return R__FAIL(
"sharded clusters are still unsupported");
1321 bytes = frame + frameSize;
1323 std::uint32_t nClusterGroups;
1325 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nClusterGroups);
1329 std::uint64_t clusterId = 0;
1330 for (std::uint32_t groupId = 0; groupId < nClusterGroups; ++groupId) {
1332 result = DeserializeClusterGroup(
bytes, fnFrameSizeLeft(), clusterGroup);
1342 for (std::uint64_t i = 0; i < clusterGroup.
fNClusters; ++i)
1343 clusterGroupBuilder.
AddCluster(clusterId + i);
1347 bytes = frame + frameSize;
1349 std::uint32_t nMDBlocks;
1351 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), frameSize, nMDBlocks);
1356 bytes = frame + frameSize;
1363 const void *buffer, std::uint32_t bufSize, std::vector<RClusterDescriptorBuilder> &clusters)
1365 auto base =
reinterpret_cast<const unsigned char *
>(buffer);
1367 auto fnBufSizeLeft = [&]() {
return bufSize - (
bytes - base); };
1370 result = DeserializeEnvelope(
bytes, fnBufSizeLeft());
1375 std::uint32_t topMostFrameSize;
1376 auto topMostFrame =
bytes;
1377 auto fnTopMostFrameSizeLeft = [&]() {
return topMostFrameSize - (
bytes - topMostFrame); };
1379 std::uint32_t nClusters;
1380 result = DeserializeFrameHeader(
bytes, fnBufSizeLeft(), topMostFrameSize, nClusters);
1385 if (nClusters != clusters.size())
1386 return R__FAIL(
"mismatch of page list and cluster summaries");
1388 for (std::uint32_t i = 0; i < nClusters; ++i) {
1389 std::uint32_t outerFrameSize;
1390 auto outerFrame =
bytes;
1391 auto fnOuterFrameSizeLeft = [&]() {
return outerFrameSize - (
bytes - outerFrame); };
1393 std::uint32_t nColumns;
1394 result = DeserializeFrameHeader(
bytes, fnTopMostFrameSizeLeft(), outerFrameSize, nColumns);
1399 for (std::uint32_t j = 0; j < nColumns; ++j) {
1400 std::uint32_t innerFrameSize;
1401 auto innerFrame =
bytes;
1402 auto fnInnerFrameSizeLeft = [&]() {
return innerFrameSize - (
bytes - innerFrame); };
1404 std::uint32_t nPages;
1405 result = DeserializeFrameHeader(
bytes, fnOuterFrameSizeLeft(), innerFrameSize, nPages);
1412 for (std::uint32_t k = 0; k < nPages; ++k) {
1413 if (fnInnerFrameSizeLeft() <
static_cast<int>(
sizeof(std::uint32_t)))
1414 return R__FAIL(
"inner frame too short");
1415 std::uint32_t nElements;
1417 bytes += DeserializeUInt32(
bytes, nElements);
1418 result = DeserializeLocator(
bytes, fnInnerFrameSizeLeft(), locator);
1425 if (fnInnerFrameSizeLeft() <
static_cast<int>(
sizeof(std::uint32_t) +
sizeof(std::uint64_t)))
1426 return R__FAIL(
"page list frame too short");
1427 std::uint64_t columnOffset;
1428 bytes += DeserializeUInt64(
bytes, columnOffset);
1429 std::uint32_t compressionSettings;
1430 bytes += DeserializeUInt32(
bytes, compressionSettings);
1432 clusters[i].CommitColumnRange(j, columnOffset, compressionSettings, pageRange);
1433 bytes = innerFrame + innerFrameSize;
1436 bytes = outerFrame + outerFrameSize;
#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
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 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
virtual std::size_t GetBitsOnStorage() const
The available trivial, native content types of a column.
The serialization context is used for the piecewise serialization of a descriptor.
void SetHeaderCRC32(std::uint32_t crc32)
void SetHeaderSize(std::uint32_t size)
std::uint32_t GetHeaderCRC32() const
DescriptorId_t MapColumnId(DescriptorId_t memId)
DescriptorId_t MapFieldId(DescriptorId_t memId)
DescriptorId_t GetMemClusterId(DescriptorId_t physId) const
DescriptorId_t GetPhysColumnId(DescriptorId_t memId) const
DescriptorId_t GetPhysFieldId(DescriptorId_t memId) const
DescriptorId_t GetMemClusterGroupId(DescriptorId_t physId) const
DescriptorId_t GetMemColumnId(DescriptorId_t physId) const
A helper class for serializing and deserialization of the RNTuple binary format.
static RResult< std::uint32_t > DeserializeString(const void *buffer, std::uint32_t bufSize, std::string &val)
static std::uint32_t SerializeFeatureFlags(const std::vector< std::int64_t > &flags, void *buffer)
static std::uint32_t SerializePageListV1(void *buffer, const RNTupleDescriptor &desc, std::span< DescriptorId_t > physClusterIDs, const RContext &context)
static std::uint32_t SerializeListFramePreamble(std::uint32_t nitems, void *buffer)
static RResult< std::uint32_t > DeserializeLocator(const void *buffer, std::uint32_t bufSize, RNTupleLocator &locator)
static std::uint32_t SerializeCRC32(const unsigned char *data, std::uint32_t length, std::uint32_t &crc32, void *buffer)
Writes a CRC32 checksum of the byte range given by data and length.
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 > DeserializePageListV1(const void *buffer, std::uint32_t bufSize, std::vector< RClusterDescriptorBuilder > &clusters)
static std::uint32_t SerializeString(const std::string &val, void *buffer)
static RResult< std::uint32_t > DeserializeEnvelope(const void *buffer, std::uint32_t bufSize)
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 DeserializeInt16(const void *buffer, std::int16_t &val)
static std::uint32_t SerializeClusterSummary(const RClusterSummary &clusterSummary, void *buffer)
static RContext SerializeHeaderV1(void *buffer, const RNTupleDescriptor &desc)
static RResult< void > DeserializeFooterV1(const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static std::uint32_t SerializeInt16(std::int16_t val, void *buffer)
static std::uint32_t SerializeLocator(const RNTupleLocator &locator, void *buffer)
static std::uint32_t SerializeInt32(std::int32_t val, void *buffer)
static std::uint32_t SerializeEnvelopePreamble(void *buffer)
Currently all enevelopes have the same version number (1).
static RResult< std::uint16_t > DeserializeColumnType(const void *buffer, ROOT::Experimental::EColumnType &type)
static RResult< std::uint32_t > DeserializeClusterGroup(const void *buffer, std::uint32_t bufSize, RClusterGroup &clusterGroup)
static std::uint32_t DeserializeUInt64(const void *buffer, std::uint64_t &val)
static std::uint32_t DeserializeInt32(const void *buffer, std::int32_t &val)
static std::uint32_t DeserializeInt64(const void *buffer, std::int64_t &val)
static RResult< std::uint32_t > DeserializeEnvelopeLink(const void *buffer, std::uint32_t bufSize, REnvelopeLink &envelopeLink)
static std::uint32_t SerializeEnvelopePostscript(const unsigned char *envelope, std::uint32_t size, void *buffer)
static RResult< std::uint16_t > DeserializeFieldStructure(const void *buffer, ROOT::Experimental::ENTupleStructure &structure)
static std::uint32_t SerializeEnvelopeLink(const REnvelopeLink &envelopeLink, void *buffer)
static std::uint32_t SerializeRecordFramePreamble(void *buffer)
static std::uint32_t SerializeUInt16(std::uint16_t val, void *buffer)
static RResult< std::uint32_t > DeserializeFrameHeader(const void *buffer, std::uint32_t bufSize, std::uint32_t &frameSize, std::uint32_t &nitems)
static RResult< std::uint32_t > DeserializeFeatureFlags(const void *buffer, std::uint32_t bufSize, std::vector< std::int64_t > &flags)
static std::uint32_t SerializeClusterGroup(const RClusterGroup &clusterGroup, void *buffer)
static std::uint32_t SerializeFramePostscript(void *frame, std::int32_t size)
static std::uint32_t SerializeFooterV1(void *buffer, const RNTupleDescriptor &desc, const RContext &context)
static std::uint32_t SerializeInt64(std::int64_t val, void *buffer)
static RResult< void > VerifyCRC32(const unsigned char *data, std::uint32_t length, std::uint32_t &crc32)
Expects a CRC32 checksum in the 4 bytes following data + length and verifies it.
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 std::uint32_t SerializeUInt32(std::uint32_t val, void *buffer)
static RResult< void > DeserializeHeaderV1(const void *buffer, std::uint32_t bufSize, RNTupleDescriptorBuilder &descBuilder)
static RResult< std::uint32_t > DeserializeClusterSummary(const void *buffer, std::uint32_t bufSize, RClusterSummary &clusterSummary)
A helper class for piece-wise construction of an RClusterGroupDescriptor.
RClusterGroupDescriptorBuilder & ClusterGroupId(DescriptorId_t clusterGroupId)
void AddCluster(DescriptorId_t clusterId)
RClusterGroupDescriptorBuilder & PageListLength(std::uint32_t pageListLength)
RClusterGroupDescriptorBuilder & PageListLocator(const RNTupleLocator &pageListLocator)
std::uint64_t GetNClusters() const
A helper class for piece-wise construction of an RColumnDescriptor.
RColumnDescriptorBuilder & Model(const RColumnModel &model)
RResult< RColumnDescriptor > MakeDescriptor() const
Attempt to make a column descriptor.
RColumnDescriptorBuilder & FieldId(DescriptorId_t fieldId)
DescriptorId_t GetFieldId() const
RColumnDescriptorBuilder & Index(std::uint32_t index)
RColumnDescriptorBuilder & ColumnId(DescriptorId_t columnId)
Base class for all ROOT issued exceptions.
A helper class for piece-wise construction of an RFieldDescriptor.
RFieldDescriptorBuilder & FieldName(const std::string &fieldName)
RFieldDescriptorBuilder & NRepetitions(std::uint64_t nRepetitions)
DescriptorId_t GetParentId() const
RFieldDescriptorBuilder & Structure(const ENTupleStructure &structure)
RResult< RFieldDescriptor > MakeDescriptor() const
Attempt to make a field descriptor.
RFieldDescriptorBuilder & TypeName(const std::string &typeName)
RFieldDescriptorBuilder & TypeVersion(std::uint32_t typeVersion)
RFieldDescriptorBuilder & ParentId(DescriptorId_t id)
RFieldDescriptorBuilder & FieldDescription(const std::string &fieldDescription)
RFieldDescriptorBuilder & FieldVersion(std::uint32_t fieldVersion)
RFieldDescriptorBuilder & FieldId(DescriptorId_t fieldId)
Meta-data stored for every field of an ntuple.
std::uint32_t GetTypeVersion() const
std::string GetFieldName() const
std::uint32_t GetFieldVersion() const
std::string GetFieldDescription() const
std::string GetTypeName() const
std::uint64_t GetNRepetitions() const
ENTupleStructure GetStructure() const
A helper class for piece-wise construction of an RNTupleDescriptor.
void AddColumn(DescriptorId_t columnId, DescriptorId_t fieldId, const RColumnModel &model, std::uint32_t index)
std::uint32_t GetHeaderCRC32() const
void AddToOnDiskFooterSize(std::uint64_t size)
The real footer size also include the page list envelopes.
RResult< void > AddClusterSummary(DescriptorId_t clusterId, std::uint64_t firstEntry, std::uint64_t nEntries)
RResult< void > AddFieldLink(DescriptorId_t fieldId, DescriptorId_t linkId)
void SetHeaderCRC32(std::uint32_t crc32)
void SetNTuple(const std::string_view name, const std::string_view description)
void AddClusterGroup(RClusterGroupDescriptorBuilder &&clusterGroup)
void AddField(const RFieldDescriptor &fieldDesc)
The on-storage meta-data of an ntuple.
RClusterGroupDescriptorIterable GetClusterGroupIterable() const
std::string GetDescription() const
std::string GetName() const
DescriptorId_t GetFieldZeroId() const
Returns the logical parent of all top-level NTuple data fields.
RColumnDescriptorIterable GetColumnIterable(const RFieldDescriptor &fieldDesc) const
const RClusterDescriptor & GetClusterDescriptor(DescriptorId_t clusterId) const
RFieldDescriptorIterable GetFieldIterable(const RFieldDescriptor &fieldDesc) const
std::size_t GetNFields() const
std::size_t GetNClusterGroups() const
std::size_t GetNColumns() const
const RClusterGroupDescriptor & GetClusterGroupDescriptor(DescriptorId_t clusterGroupId) const
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
RClusterSize ClusterSize_t
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.
REnvelopeLink fPageListEnvelopeLink
std::uint64_t fFirstEntry
std::int32_t fColumnGroupID
-1 for "all columns"
std::uint32_t fUnzippedSize
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; see doc/specifications.md for details.
std::uint8_t fReserved
Reserved for use by concrete storage backends.
ELocatorType fType
For non-disk locators, the value for the Type field.
std::uint32_t fBytesOnStorage
std::variant< std::uint64_t, std::string, RNTupleLocatorObject64 > fPosition
Simple on-disk locators consisting of a 64-bit offset use variant type uint64_t; extended locators ha...
const T & GetPosition() const