16#ifndef ROOT7_RNTupleSerialize
17#define ROOT7_RNTupleSerialize
29namespace Experimental {
32class RClusterDescriptor;
33class RClusterDescriptorBuilder;
34class RNTupleDescriptor;
35class RNTupleDescriptorBuilder;
139 static std::uint32_t
SerializeCRC32(
const unsigned char *data, std::uint32_t length,
140 std::uint32_t &crc32,
void *buffer);
145 static std::uint32_t
SerializeInt16(std::int16_t val,
void *buffer);
146 static std::uint32_t
DeserializeInt16(
const void *buffer, std::int16_t &val);
150 static std::uint32_t
SerializeInt32(std::int32_t val,
void *buffer);
151 static std::uint32_t
DeserializeInt32(
const void *buffer, std::int32_t &val);
155 static std::uint32_t
SerializeInt64(std::int64_t val,
void *buffer);
156 static std::uint32_t
DeserializeInt64(
const void *buffer, std::int64_t &val);
160 static std::uint32_t
SerializeString(
const std::string &val,
void *buffer);
173 std::uint32_t &crc32,
void *buffer);
182 std::uint32_t &frameSize, std::uint32_t &nitems);
184 std::uint32_t &frameSize);
190 std::vector<std::int64_t> &flags);
196 REnvelopeLink &envelopeLink);
201 RClusterSummary &clusterSummary);
203 RClusterGroup &clusterGroup);
208 std::span<DescriptorId_t> physClusterIDs,
209 const RContext &context);
213 std::uint32_t bufSize,
216 std::uint32_t bufSize,
219 std::uint32_t bufSize,
220 std::vector<RClusterDescriptorBuilder> &clusters);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
The available trivial, native content types of a column.
The serialization context is used for the piecewise serialization of a descriptor.
std::uint32_t fHeaderSize
std::vector< RClusterGroup > fClusterGroups
void SetHeaderCRC32(std::uint32_t crc32)
DescriptorId_t MapClusterId(DescriptorId_t memId)
void SetHeaderSize(std::uint32_t size)
std::uint32_t GetHeaderCRC32() const
DescriptorId_t GetPhysClusterId(DescriptorId_t memId) const
std::map< DescriptorId_t, DescriptorId_t > fMem2PhysColumnIDs
void AddClusterGroup(std::uint32_t nClusters, const REnvelopeLink &pageListEnvelope)
DescriptorId_t MapColumnId(DescriptorId_t memId)
std::vector< DescriptorId_t > fPhys2MemFieldIDs
DescriptorId_t MapFieldId(DescriptorId_t memId)
DescriptorId_t GetMemClusterId(DescriptorId_t physId) const
std::map< DescriptorId_t, DescriptorId_t > fMem2PhysClusterIDs
std::map< DescriptorId_t, DescriptorId_t > fMem2PhysFieldIDs
const std::vector< RClusterGroup > & GetClusterGroups() const
DescriptorId_t GetPhysColumnId(DescriptorId_t memId) const
std::vector< DescriptorId_t > fPhys2MemColumnIDs
DescriptorId_t GetMemFieldId(DescriptorId_t physId) const
std::uint32_t GetHeaderSize() const
DescriptorId_t GetPhysFieldId(DescriptorId_t memId) const
std::uint32_t fHeaderCrc32
DescriptorId_t GetMemColumnId(DescriptorId_t physId) const
std::vector< DescriptorId_t > fPhys2MemClusterIDs
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 constexpr std::uint32_t kReleaseCandidateTag
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 constexpr std::uint16_t kFlagRepetitiveField
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 constexpr std::uint16_t kEnvelopeCurrentVersion
In order to handle changes to the serialization routine in future ntuple versions.
static constexpr std::uint32_t kFlagNonNegativeColumn
static constexpr std::uint32_t kFlagSortDesColumn
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 constexpr std::uint16_t kFlagAliasField
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 constexpr std::uint16_t kEnvelopeMinVersion
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 constexpr std::uint32_t kFlagSortAscColumn
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 constexpr DescriptorId_t kZeroFieldId
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 RNTupleDescriptor.
The on-storage meta-data of an ntuple.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
REnvelopeLink fPageListEnvelopeLink
std::uint64_t fFirstEntry
std::int32_t fColumnGroupID
-1 for "all columns"
std::uint32_t fUnzippedSize
Generic information about the physical location of data.