#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 | 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 52 of file RawFile.cc.
References RemoveAddSevLevel::flag, inputFile, 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 93 of file RawFile.cc.
References inputFile.
Referenced by DTNewROS8FileReader::checkEndOfFile(), DTROS8FileReader::checkEndOfFile(), DTROS25FileReader::checkEndOfFile(), and DTDDUFileReader::checkEndOfFile().
bool RawFile::fail | ( | ) |
It is not OK.
Definition at line 71 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 91 of file RawFile.cc.
References seek().
Referenced by DTDDUFileReader::DTDDUFileReader().
bool RawFile::isRFIO | ( | ) |
Castor flag.
bool RawFile::isXROOTD | ( | ) |
bool RawFile::ok | ( | ) |
It is OK (i.e. file was correctly opened)
Definition at line 69 of file RawFile.cc.
References inputFile.
Referenced by fail().
RawFile * RawFile::open | ( | const char * | path | ) |
Open file.
Definition at line 20 of file RawFile.cc.
References gather_cfg::cout, corrVsCorr::filename, inputFile, tablePrinter::prefix, 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 75 of file RawFile.cc.
References inputFile, 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 83 of file RawFile.cc.
References inputFile, and xrootdFlag.
Referenced by ignore().
long RawFile::tell | ( | ) |
|
private |