12#ifndef ROOT_RRawFileUnix
13#define ROOT_RRawFileUnix
37 size_t ReadAtImpl(
void *buffer,
size_t nbytes, std::uint64_t offset) final;
39 void *
MapImpl(
size_t nbytes, std::uint64_t offset, std::uint64_t &mapdOffset) final;
40 void UnmapImpl(
void *region,
size_t nbytes) final;
The RRawFileUnix class uses POSIX calls to read from a mounted file system.
void UnmapImpl(void *region, size_t nbytes) final
Derived classes with mmap support must be able to unmap the memory area handed out by Map()
std::unique_ptr< 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 or kUnknownFileSize.
int GetFeatures() const final
Derived classes shall inform the user about the supported functionality, which can possibly depend on...
void * MapImpl(size_t nbytes, std::uint64_t offset, std::uint64_t &mapdOffset) final
If a derived class supports mmap, the MapImpl and UnmapImpl calls are supposed to be implemented,...
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.
The RRawFile provides read-only access to local and remote files.
static constexpr int kFeatureHasMmap
Map() and Unmap() are implemented.
static constexpr int kFeatureHasSize
GetSize() does not return kUnknownFileSize.
On construction, an ROptions parameter can customize the RRawFile behavior.