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

#include <Cursor.h>

Public Member Functions

 Cursor (std::span< const uint8_t > buf, std::string const &file, uint64_t fileOffset=0, int64_t origin=0)
 
size_t pos () const
 
int64_t displacement () const
 
size_t remaining () const
 
std::span< const uint8_t > buffer () const
 
void seek (size_t p)
 
void skip (size_t n)
 
void back (size_t n)
 
std::span< const uint8_t > bytes (size_t n)
 
uint8_t u8 ()
 
uint16_t u16 ()
 
uint32_t u32 ()
 
uint64_t u64 ()
 
int16_t i16 ()
 
int32_t i32 ()
 
int64_t i64 ()
 
double f64 ()
 
std::string string ()
 TString: 1-byte length, or 0xFF followed by a 4-byte length.
 
std::string cstring ()
 NUL-terminated string, as used for class names after kNewClassTag.
 
void fail (std::string const &what) const
 
std::string const & file () const
 

Detailed Description

Bounds-checked big-endian reader over a buffer. Every read past the end raises CorruptData, so malformed input can never cause an out-of-bounds read. fileOffset is where the buffer starts in the file, used in error messages. origin is added to positions to get ROOT's buffer displacement, which is what object references are keyed on (fKeylen for an object read from a key).

Definition at line 31 of file Cursor.h.

Constructor & Destructor Documentation

◆ Cursor()

o2::aod::native::Cursor::Cursor ( std::span< const uint8_t >  buf,
std::string const &  file,
uint64_t  fileOffset = 0,
int64_t  origin = 0 
)
inline

Definition at line 34 of file Cursor.h.

Member Function Documentation

◆ back()

void o2::aod::native::Cursor::back ( size_t  n)
inline

Definition at line 52 of file Cursor.h.

◆ buffer()

std::span< const uint8_t > o2::aod::native::Cursor::buffer ( ) const
inline

Definition at line 42 of file Cursor.h.

◆ bytes()

std::span< const uint8_t > o2::aod::native::Cursor::bytes ( size_t  n)
inline

Definition at line 60 of file Cursor.h.

◆ cstring()

std::string o2::aod::native::Cursor::cstring ( )
inline

NUL-terminated string, as used for class names after kNewClassTag.

Definition at line 88 of file Cursor.h.

◆ displacement()

int64_t o2::aod::native::Cursor::displacement ( ) const
inline

Definition at line 40 of file Cursor.h.

◆ f64()

double o2::aod::native::Cursor::f64 ( )
inline

Definition at line 74 of file Cursor.h.

◆ fail()

void o2::aod::native::Cursor::fail ( std::string const &  what) const
inline

Definition at line 96 of file Cursor.h.

◆ file()

std::string const & o2::aod::native::Cursor::file ( ) const
inline

Definition at line 101 of file Cursor.h.

◆ i16()

int16_t o2::aod::native::Cursor::i16 ( )
inline

Definition at line 71 of file Cursor.h.

◆ i32()

int32_t o2::aod::native::Cursor::i32 ( )
inline

Definition at line 72 of file Cursor.h.

◆ i64()

int64_t o2::aod::native::Cursor::i64 ( )
inline

Definition at line 73 of file Cursor.h.

◆ pos()

size_t o2::aod::native::Cursor::pos ( ) const
inline

Definition at line 39 of file Cursor.h.

◆ remaining()

size_t o2::aod::native::Cursor::remaining ( ) const
inline

Definition at line 41 of file Cursor.h.

◆ seek()

void o2::aod::native::Cursor::seek ( size_t  p)
inline

Definition at line 44 of file Cursor.h.

◆ skip()

void o2::aod::native::Cursor::skip ( size_t  n)
inline

Definition at line 51 of file Cursor.h.

◆ string()

std::string o2::aod::native::Cursor::string ( )
inline

TString: 1-byte length, or 0xFF followed by a 4-byte length.

Definition at line 77 of file Cursor.h.

◆ u16()

uint16_t o2::aod::native::Cursor::u16 ( )
inline

Definition at line 68 of file Cursor.h.

◆ u32()

uint32_t o2::aod::native::Cursor::u32 ( )
inline

Definition at line 69 of file Cursor.h.

◆ u64()

uint64_t o2::aod::native::Cursor::u64 ( )
inline

Definition at line 70 of file Cursor.h.

◆ u8()

uint8_t o2::aod::native::Cursor::u8 ( )
inline

Definition at line 67 of file Cursor.h.


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