HIPO  4.3.0
High Performance Output data format for experimental physics
hipo::datastreamXrootd Class Reference

Data stream implementation for XRootD remote file access. More...

#include <datastream.h>

Public Member Functions

 datastreamXrootd ()
 Default constructor. More...
 
 ~datastreamXrootd ()
 Destructor; closes the remote connection. More...
 
long size ()
 
long position ()
 
long position (long pos)
 Seek to the given byte position. More...
 
void open (const char *filename)
 Open a remote file via XRootD. More...
 
int read (char *s, int size)
 Read bytes from the remote file. More...
 

Detailed Description

Data stream implementation for XRootD remote file access.

Definition at line 153 of file datastream.h.

Constructor & Destructor Documentation

◆ datastreamXrootd()

hipo::datastreamXrootd::datastreamXrootd ( )

Default constructor.

The constructor for reader, printWarning routine will printout a warning message if the library was not compiled with compression libraries LZ4 or GZIP

Definition at line 51 of file datastream.cpp.

◆ ~datastreamXrootd()

hipo::datastreamXrootd::~datastreamXrootd ( )

Destructor; closes the remote connection.

Default destructor. Does nothing

Definition at line 61 of file datastream.cpp.

Member Function Documentation

◆ open()

void hipo::datastreamXrootd::open ( const char *  filename)

Open a remote file via XRootD.

Parameters
filenameXRootD URL of the file

Definition at line 68 of file datastream.cpp.

◆ position() [1/2]

long hipo::datastreamXrootd::position ( )
Returns
Current read position in bytes.

Definition at line 87 of file datastream.cpp.

◆ position() [2/2]

long hipo::datastreamXrootd::position ( long  pos)

Seek to the given byte position.

Parameters
posByte offset from the beginning
Returns
The new position

Definition at line 88 of file datastream.cpp.

◆ read()

int hipo::datastreamXrootd::read ( char *  s,
int  size 
)

Read bytes from the remote file.

Parameters
sDestination buffer
sizeNumber of bytes to read
Returns
Number of bytes read

Definition at line 89 of file datastream.cpp.

◆ size()

long hipo::datastreamXrootd::size ( )
Returns
Total size of the remote file in bytes.

Definition at line 76 of file datastream.cpp.


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