11#ifndef ROOT_RRawFileTFile
12#define ROOT_RRawFileTFile
36 size_t ReadAtImpl(
void *buffer,
size_t nbytes, std::uint64_t offset)
final
38 if (
fFile->ReadBuffer(
static_cast<char *
>(buffer), offset, nbytes)) {
39 throw std::runtime_error(
"failed to read expected number of bytes");
49 std::unique_ptr<ROOT::Internal::RRawFile>
Clone() const final {
return std::make_unique<RRawFileTFile>(
fFile); }
RRawFileTFile(TFile *file)
void OpenImpl() final
OpenImpl() is called at most once and before any call to either DoReadAt or DoGetSize.
size_t ReadAtImpl(void *buffer, size_t nbytes, std::uint64_t offset) final
Derived classes should implement low-level reading without buffering.
std::unique_ptr< ROOT::Internal::RRawFile > Clone() const final
Create a new RawFile that accesses the same resource. The file pointer is reset to zero.
std::uint64_t GetSizeImpl() final
Derived classes should return the file size.
RRawFile(std::string_view url, ROptions options)
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...