#include <RawFile.h>
Public Member Functions | |
int | close () |
Close file if necessary. More... | |
int | eof () |
Check end of file. More... | |
bool | fail () |
It is not OK. More... | |
FILE * | GetPointer () |
Get file pointer. More... | |
int | ignore (long offset) |
Ignore some bytes. More... | |
bool | isRFIO () |
Castor flag. More... | |
bool | isXROOTD () |
XROOTD flag. More... | |
bool | ok () |
It is OK (i.e. file was correctly opened) More... | |
RawFile * | open (const char *path) |
Open file. More... | |
RawFile () | |
Default constructor. More... | |
RawFile (const char *path) | |
Usual constructor. More... | |
int | read (void *data, size_t nbytes) |
Read from file. More... | |
int | seek (long offset, int whence) |
Go somewhere. More... | |
long | tell () |
Tell instruction. More... | |
virtual | ~RawFile () |
Destructor. More... | |
Private Attributes | |
FILE * | inputFile |
bool | rfioFlag |
bool | xrootdFlag |
Utility class to open, read and manage local and rfio files in a transparent way
RawFile::RawFile | ( | ) |
RawFile::RawFile | ( | const char * | path | ) |
|
virtual |
int RawFile::close | ( | void | ) |
Close file if necessary.
Definition at line 66 of file RawFile.cc.
References inputFile, rfio_fclose(), rfioFlag, and xrootdFlag.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), DTDDUFileReader::~DTDDUFileReader(), DTNewROS8FileReader::~DTNewROS8FileReader(), DTROS25FileReader::~DTROS25FileReader(), DTROS8FileReader::~DTROS8FileReader(), and ~RawFile().
int RawFile::eof | ( | ) |
Check end of file.
Definition at line 118 of file RawFile.cc.
References inputFile, rfio_feof(), and rfioFlag.
Referenced by DTNewROS8FileReader::checkEndOfFile(), DTROS8FileReader::checkEndOfFile(), DTROS25FileReader::checkEndOfFile(), and DTDDUFileReader::checkEndOfFile().
bool RawFile::fail | ( | ) |
It is not OK.
Definition at line 88 of file RawFile.cc.
References ok().
Referenced by DTDDUFileReader::DTDDUFileReader(), DTNewROS8FileReader::DTNewROS8FileReader(), DTROS25FileReader::DTROS25FileReader(), and DTROS8FileReader::DTROS8FileReader().
FILE * RawFile::GetPointer | ( | ) |
int RawFile::ignore | ( | long | offset | ) |
Ignore some bytes.
Definition at line 116 of file RawFile.cc.
References seek().
Referenced by DTDDUFileReader::DTDDUFileReader().
bool RawFile::isRFIO | ( | ) |
bool RawFile::isXROOTD | ( | ) |
bool RawFile::ok | ( | ) |
It is OK (i.e. file was correctly opened)
Definition at line 86 of file RawFile.cc.
References inputFile.
Referenced by fail().
RawFile * RawFile::open | ( | const char * | path | ) |
Open file.
Definition at line 29 of file RawFile.cc.
References gather_cfg::cout, lut2db_cfg::filename, inputFile, rfio_fopen(), rfioFlag, and xrootdFlag.
Referenced by DTDDUFileReader::DTDDUFileReader(), DTNewROS8FileReader::DTNewROS8FileReader(), DTROS25FileReader::DTROS25FileReader(), DTROS8FileReader::DTROS8FileReader(), and RawFile().
int RawFile::read | ( | void * | data, |
size_t | nbytes | ||
) |
Read from file.
Definition at line 94 of file RawFile.cc.
References inputFile, rfio_fread(), rfioFlag, and xrootdFlag.
Referenced by DTDDUFileReader::dmaUnpack(), DTDDUFileReader::DTDDUFileReader(), DTNewROS8FileReader::fillRawData(), DTROS8FileReader::fillRawData(), DTDDUFileReader::fillRawData(), DTROS25FileReader::fillRawData(), and edmIntegrityCheck.PublishToFileSystem::get().
int RawFile::seek | ( | long | offset, |
int | whence | ||
) |
Go somewhere.
Definition at line 105 of file RawFile.cc.
References inputFile, rfio_fseek(), rfioFlag, and xrootdFlag.
Referenced by ignore().
long RawFile::tell | ( | ) |
Tell instruction.
Definition at line 126 of file RawFile.cc.
References inputFile, rfio_ftell(), rfioFlag, and xrootdFlag.
|
private |
|
private |