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

#include <LocalByteSource.h>

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

Public Member Functions

 LocalByteSource (std::string path, Options const &options)
 
 ~LocalByteSource () override
 
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.
 
bool canMap () const override
 Whether tryMap() provides every range, so that nothing needs reading.
 
void willNeed (uint64_t off, size_t len) override
 Hints that a range will be needed soon, or is no longer needed.
 
void dontNeed (uint64_t off, size_t len) override
 
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 isRemote () const
 Whether each read is a network round trip, worth hiding behind decoding.
 

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 local file, mmapped read-only on 64-bit hosts, with pread as fallback (mmap failure, or –aod-reader-local-io=pread).

Definition at line 23 of file LocalByteSource.h.

Constructor & Destructor Documentation

◆ LocalByteSource()

o2::aod::native::LocalByteSource::LocalByteSource ( std::string  path,
Options const &  options 
)

Definition at line 34 of file LocalByteSource.cxx.

◆ ~LocalByteSource()

o2::aod::native::LocalByteSource::~LocalByteSource ( )
override

Definition at line 56 of file LocalByteSource.cxx.

Member Function Documentation

◆ bytesRead()

uint64_t o2::aod::native::LocalByteSource::bytesRead ( ) const
inlineoverridevirtual

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

Definition at line 35 of file LocalByteSource.h.

◆ canMap()

bool o2::aod::native::LocalByteSource::canMap ( ) const
inlineoverridevirtual

Whether tryMap() provides every range, so that nothing needs reading.

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

Definition at line 32 of file LocalByteSource.h.

◆ dontNeed()

void o2::aod::native::LocalByteSource::dontNeed ( uint64_t  off,
size_t  len 
)
overridevirtual

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

Definition at line 128 of file LocalByteSource.cxx.

◆ readCalls()

uint64_t o2::aod::native::LocalByteSource::readCalls ( ) const
inlineoverridevirtual

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

Definition at line 36 of file LocalByteSource.h.

◆ readInto()

void o2::aod::native::LocalByteSource::readInto ( uint64_t  off,
size_t  len,
void *  dst 
)
overridevirtual

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

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

Definition at line 71 of file LocalByteSource.cxx.

◆ readvInto()

void o2::aod::native::LocalByteSource::readvInto ( std::span< ReadRequest >  requests)
overridevirtual

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

Definition at line 98 of file LocalByteSource.cxx.

◆ size()

uint64_t o2::aod::native::LocalByteSource::size ( ) const
inlineoverridevirtual

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

Definition at line 28 of file LocalByteSource.h.

◆ tryMap()

std::span< const uint8_t > o2::aod::native::LocalByteSource::tryMap ( uint64_t  off,
size_t  len 
)
overridevirtual

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

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

Definition at line 105 of file LocalByteSource.cxx.

◆ url()

std::string o2::aod::native::LocalByteSource::url ( ) const
inlineoverridevirtual

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

Definition at line 37 of file LocalByteSource.h.

◆ willNeed()

void o2::aod::native::LocalByteSource::willNeed ( uint64_t  off,
size_t  len 
)
overridevirtual

Hints that a range will be needed soon, or is no longer needed.

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

Definition at line 127 of file LocalByteSource.cxx.


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