![]() |
Project
|
#include <ByteSource.h>
Inherited by o2::aod::native::HttpByteSource, o2::aod::native::LocalByteSource, o2::aod::native::PlannedByteSource, o2::aod::native::XRootDByteSource, and o2::aod::native::test::MemoryByteSource.
Public Member Functions | |
| virtual | ~ByteSource () |
| virtual uint64_t | size () const =0 |
| virtual void | readInto (uint64_t off, size_t len, void *dst)=0 |
| Throws IoError, or CorruptData when the range is past the end of the file. | |
| virtual void | readvInto (std::span< ReadRequest > requests)=0 |
| virtual std::span< const uint8_t > | tryMap (uint64_t off, size_t len) |
| A view of the bytes without copying them, if the backend can provide it. | |
| virtual bool | canMap () const |
| Whether tryMap() provides every range, so that nothing needs reading. | |
| virtual bool | isRemote () const |
| Whether each read is a network round trip, worth hiding behind decoding. | |
| virtual void | willNeed (uint64_t off, size_t len) |
| Hints that a range will be needed soon, or is no longer needed. | |
| virtual void | dontNeed (uint64_t off, size_t len) |
| virtual uint64_t | bytesRead () const =0 |
| virtual uint64_t | readCalls () const =0 |
| virtual std::string | url () const =0 |
Static Public Member Functions | |
| static std::unique_ptr< ByteSource > | open (std::string url, const Options &) |
Random access to the bytes of a file. Everything above this is I/O-agnostic. The caller always owns the destination. Implementations are thread-safe for concurrent reads.
Definition at line 55 of file ByteSource.h.
|
virtualdefault |
|
pure virtual |
|
inlinevirtual |
Whether tryMap() provides every range, so that nothing needs reading.
Reimplemented in o2::aod::native::LocalByteSource.
Definition at line 66 of file ByteSource.h.
|
inlinevirtual |
Reimplemented in o2::aod::native::LocalByteSource.
Definition at line 71 of file ByteSource.h.
|
inlinevirtual |
Whether each read is a network round trip, worth hiding behind decoding.
Reimplemented in o2::aod::native::HttpByteSource, and o2::aod::native::XRootDByteSource.
Definition at line 68 of file ByteSource.h.
|
static |
Definition at line 27 of file ByteSource.cxx.
|
pure virtual |
|
pure virtual |
Throws IoError, or CorruptData when the range is past the end of the file.
Implemented in o2::aod::native::PlannedByteSource, o2::aod::native::HttpByteSource, o2::aod::native::LocalByteSource, o2::aod::native::XRootDByteSource, and o2::aod::native::test::MemoryByteSource.
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
A view of the bytes without copying them, if the backend can provide it.
Reimplemented in o2::aod::native::PlannedByteSource, o2::aod::native::LocalByteSource, and o2::aod::native::test::MemoryByteSource.
Definition at line 64 of file ByteSource.h.
|
pure virtual |
|
inlinevirtual |
Hints that a range will be needed soon, or is no longer needed.
Reimplemented in o2::aod::native::LocalByteSource.
Definition at line 70 of file ByteSource.h.