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)
 

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 read with the XRootD client (root://, roots://, xroot://, xroots://). readvInto() sends all its ranges at once, as vectored reads for the small ones and plain reads for the large ones, and waits for all of them: one round trip for a whole read plan.

Definition at line 31 of file XRootDByteSource.h.

Constructor & Destructor Documentation

◆ XRootDByteSource()

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

Definition at line 118 of file XRootDByteSource.cxx.

◆ ~XRootDByteSource()

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

Definition at line 135 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 39 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 44 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 41 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 149 of file XRootDByteSource.cxx.

◆ readvInto()

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

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

Definition at line 155 of file XRootDByteSource.cxx.

◆ size()

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

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

Definition at line 36 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 43 of file XRootDByteSource.h.


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