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

#include <XRootDByteSource.h>

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

Public Member Functions

 XRootDByteSource (std::string url, Options const &options)
 
 ~XRootDByteSource () 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
 
uint64_t bytesRead () const override
 
uint64_t readCalls () const override
 Requests sent to the server: a vectored read counts once.
 
std::string url () const override
 Without the query, which may hold an access token.
 
bool isRemote () const override
 Whether each read is a network round trip, worth hiding behind decoding.
 
- Public Member Functions inherited from o2::aod::native::ByteSource
virtual ~ByteSource ()
 
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 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 std::string replicaLabel () const
 The label of the replica being read, for a source opened with openReplicas().
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::aod::native::ByteSource
static std::unique_ptr< ByteSource > open (std::string url, const Options &)
 
static std::unique_ptr< ByteSource > openReplicas (std::vector< Replica > replicas, const Options &, std::function< void(std::string const &)> log={})
 

Detailed Description

A file read with the XRootD client (root://, roots://, xroot://, xroots://). readvInto() sends its ranges as vectored reads for the small ones, within the server's kXR_readv limits, and plain reads of at most 8 MB for the large ones, in rounds of at most Options::remoteInFlightBytes: usually one round trip for a whole read plan, and no request so large that it expires on a slow link. Errors are not retried here: see FailoverByteSource.

Definition at line 33 of file XRootDByteSource.h.

Constructor & Destructor Documentation

◆ XRootDByteSource()

o2::aod::native::XRootDByteSource::XRootDByteSource ( std::string  url,
Options const &  options 
)

Definition at line 154 of file XRootDByteSource.cxx.

◆ ~XRootDByteSource()

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

Definition at line 176 of file XRootDByteSource.cxx.

Member Function Documentation

◆ bytesRead()

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

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

Definition at line 41 of file XRootDByteSource.h.

◆ isRemote()

bool o2::aod::native::XRootDByteSource::isRemote ( ) const
inlineoverridevirtual

Whether each read is a network round trip, worth hiding behind decoding.

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

Definition at line 46 of file XRootDByteSource.h.

◆ readCalls()

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

Requests sent to the server: a vectored read counts once.

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

Definition at line 43 of file XRootDByteSource.h.

◆ readInto()

void o2::aod::native::XRootDByteSource::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 190 of file XRootDByteSource.cxx.

◆ readvInto()

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

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

Definition at line 196 of file XRootDByteSource.cxx.

◆ size()

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

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

Definition at line 38 of file XRootDByteSource.h.

◆ url()

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

Without the query, which may hold an access token.

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

Definition at line 45 of file XRootDByteSource.h.


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