32 auto classVersion = buf.
ReadVersion(&offClassBuf, &bcnt);
41 lenStrip += (classVersion == 4) *
sizeof(std::uint64_t);
46 auto lenCkData = bcnt - lenStrip;
49 auto expectedChecksum = XXH3_64bits(buf.
Buffer() + offCkData, lenCkData);
51 std::uint64_t onDiskChecksum;
52 if (classVersion == 4) {
56 constexpr std::size_t expectedBytes = 66;
57 if (bcnt != expectedBytes)
59 std::to_string(expectedBytes) +
", got=" + std::to_string(bcnt)));
70 buf >> onDiskChecksum;
75 if (
static_cast<std::size_t
>(buf.
BufferSize()) < buf.
Length() +
sizeof(onDiskChecksum))
76 throw RException(
R__FAIL(
"the buffer containing RNTuple is too small to contain the checksum!"));
77 buf >> onDiskChecksum;
80 if (expectedChecksum != onDiskChecksum)
88 std::uint64_t checksum = XXH3_64bits(buf.
Buffer() + offCkData, buf.
Length() - offCkData);
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Base class for all ROOT issued exceptions.
std::uint16_t fVersionMajor
Changing the major version indicates forward incompatible changes; such changes should correspond to ...
std::uint64_t fSeekFooter
The file offset of the footer excluding the TKey part.
std::uint16_t fVersionMinor
Changing the minor version indicates new optional fields added to the RNTuple meta-data.
std::uint16_t fVersionEpoch
Version of the RNTuple binary format that the writer supports (see specification).
std::uint64_t fNBytesFooter
The size of the compressed ntuple footer.
std::uint64_t fLenFooter
The size of the uncompressed ntuple footer.
TFile * fFile
! The file from which the ntuple was streamed, registered in the custom streamer
std::uint64_t fLenHeader
The size of the uncompressed ntuple header.
std::uint64_t fNBytesHeader
The size of the compressed ntuple header.
std::uint16_t fVersionPatch
Changing the patch version indicates new backported features from newer binary format versions.
std::uint64_t fSeekHeader
The file offset of the header excluding the TKey part.
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
void SetBufferOffset(Int_t offset=0)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".