Project
Loading...
Searching...
No Matches
o2::aod::native::test::MemoryByteSource Class Reference

A file made of concatenated in-memory buffers. More...

#include <RootFraming.h>

Inherits o2::aod::native::ByteSource.

Public Member Functions

 MemoryByteSource (std::vector< uint8_t > data, bool mappable=true)
 
uint64_t size () const override
 
void readInto (uint64_t off, size_t len, void *dst) override
 Throws IoError, or CorruptData when the range is past the end of the file.
 
void readvInto (std::span< ReadRequest > requests) override
 
std::span< const uint8_t > tryMap (uint64_t off, size_t len) override
 A view of the bytes without copying them, if the backend can provide it.
 
uint64_t bytesRead () const override
 
uint64_t readCalls () const override
 
std::string url () const override
 
- Public Member Functions inherited from o2::aod::native::ByteSource
virtual ~ByteSource ()
 
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)
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::aod::native::ByteSource
static std::unique_ptr< ByteSource > open (std::string url, const Options &)
 

Detailed Description

A file made of concatenated in-memory buffers.

Definition at line 150 of file RootFraming.h.

Constructor & Destructor Documentation

◆ MemoryByteSource()

o2::aod::native::test::MemoryByteSource::MemoryByteSource ( std::vector< uint8_t >  data,
bool  mappable = true 
)
inlineexplicit

Definition at line 153 of file RootFraming.h.

Member Function Documentation

◆ bytesRead()

uint64_t o2::aod::native::test::MemoryByteSource::bytesRead ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 183 of file RootFraming.h.

◆ readCalls()

uint64_t o2::aod::native::test::MemoryByteSource::readCalls ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 184 of file RootFraming.h.

◆ readInto()

void o2::aod::native::test::MemoryByteSource::readInto ( uint64_t  off,
size_t  len,
void *  dst 
)
inlineoverridevirtual

Throws IoError, or CorruptData when the range is past the end of the file.

Implements o2::aod::native::ByteSource.

Definition at line 155 of file RootFraming.h.

◆ readvInto()

void o2::aod::native::test::MemoryByteSource::readvInto ( std::span< ReadRequest >  requests)
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 167 of file RootFraming.h.

◆ size()

uint64_t o2::aod::native::test::MemoryByteSource::size ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 154 of file RootFraming.h.

◆ tryMap()

std::span< const uint8_t > o2::aod::native::test::MemoryByteSource::tryMap ( uint64_t  off,
size_t  len 
)
inlineoverridevirtual

A view of the bytes without copying them, if the backend can provide it.

Reimplemented from o2::aod::native::ByteSource.

Definition at line 173 of file RootFraming.h.

◆ url()

std::string o2::aod::native::test::MemoryByteSource::url ( ) const
inlineoverridevirtual

Implements o2::aod::native::ByteSource.

Definition at line 185 of file RootFraming.h.


The documentation for this class was generated from the following file: