#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 | ) |
Usual constructor.
Definition at line 17 of file RawFile.cc.
References open(), and EnsembleCalibrationLA_cfg::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 esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), DTDDUFileReader::~DTDDUFileReader(), DTNewROS8FileReader::~DTNewROS8FileReader(), DTROS25FileReader::~DTROS25FileReader(), DTROS8FileReader::~DTROS8FileReader(), and ~RawFile().
int RawFile::eof | ( | ) |
Check end of file.
Definition at line 94 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 72 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 92 of file RawFile.cc.
References HLT_IsoTrack_cff::offset, and 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 70 of file RawFile.cc.
References inputFile.
Referenced by fail().
RawFile * RawFile::open | ( | const char * | path | ) |
Open file.
Definition at line 19 of file RawFile.cc.
References gather_cfg::cout, corrVsCorr::filename, inputFile, EnsembleCalibrationLA_cfg::path, ConfigBuilder::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 76 of file RawFile.cc.
References data, 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 84 of file RawFile.cc.
References inputFile, HLT_IsoTrack_cff::offset, and xrootdFlag.
Referenced by ignore().
long RawFile::tell | ( | ) |
|
private |