#include <RFIOFile.h>
Public Member Functions | |
void | abort (void) |
virtual void | close (void) override |
void | create (const char *name, bool exclusive=false, int perms=0666) |
void | create (const std::string &name, bool exclusive=false, int perms=0666) |
void | open (const char *name, int flags=IOFlags::OpenRead, int perms=0666) |
void | open (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666) |
virtual IOOffset | position (IOOffset offset, Relative whence=SET) override |
virtual IOSize | read (void *into, IOSize n) override |
virtual IOSize | readv (IOPosBuffer *into, IOSize buffers) override |
virtual void | resize (IOOffset size) override |
RFIOFile (void) | |
RFIOFile (IOFD fd) | |
RFIOFile (const char *name, int flags=IOFlags::OpenRead, int perms=0666) | |
RFIOFile (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666) | |
virtual IOSize | write (const void *from, IOSize n) override |
~RFIOFile (void) | |
Public Member Functions inherited from Storage | |
virtual bool | eof (void) const |
virtual void | flush (void) |
virtual IOOffset | position (void) const |
virtual bool | prefetch (const IOPosBuffer *what, IOSize n) |
virtual IOSize | read (void *into, IOSize n, IOOffset pos) |
IOSize | read (IOBuffer into, IOOffset pos) |
virtual void | rewind (void) |
virtual IOOffset | size (void) const |
Storage (void) | |
virtual IOSize | write (const void *from, IOSize n, IOOffset pos) |
IOSize | write (IOBuffer from, IOOffset pos) |
virtual IOSize | writev (const IOPosBuffer *from, IOSize buffers) |
virtual | ~Storage (void) |
Public Member Functions inherited from IOInput | |
int | read (void) |
IOSize | read (IOBuffer into) |
virtual IOSize | readv (IOBuffer *into, IOSize buffers) |
IOSize | xread (IOBuffer into) |
IOSize | xread (void *into, IOSize n) |
IOSize | xreadv (IOBuffer *into, IOSize buffers) |
virtual | ~IOInput (void) |
Destruct the stream. A no-op. More... | |
Public Member Functions inherited from IOOutput | |
IOSize | write (unsigned char byte) |
IOSize | write (IOBuffer from) |
virtual IOSize | writev (const IOBuffer *from, IOSize buffers) |
IOSize | xwrite (const void *from, IOSize n) |
IOSize | xwrite (IOBuffer from) |
IOSize | xwritev (const IOBuffer *from, IOSize buffers) |
virtual | ~IOOutput (void) |
Destruct the stream. A no-op. More... | |
Private Member Functions | |
void | reopen () |
ssize_t | retryRead (void *into, IOSize n, int maxRetry=10) |
Private Attributes | |
bool | m_close |
IOOffset | m_curpos |
IOFD | m_fd |
int | m_flags |
std::string | m_name |
int | m_perms |
Additional Inherited Members | |
Public Types inherited from Storage | |
enum | Relative { SET, CURRENT, END } |
RFIO Storage object.
Definition at line 9 of file RFIOFile.h.
RFIOFile::RFIOFile | ( | void | ) |
Definition at line 30 of file RFIOFile.cc.
RFIOFile::RFIOFile | ( | IOFD | fd | ) |
Definition at line 38 of file RFIOFile.cc.
RFIOFile::RFIOFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 46 of file RFIOFile.cc.
References open().
RFIOFile::RFIOFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 56 of file RFIOFile.cc.
RFIOFile::~RFIOFile | ( | void | ) |
Definition at line 66 of file RFIOFile.cc.
References m_close, and m_name.
void RFIOFile::abort | ( | void | ) |
Definition at line 245 of file RFIOFile.cc.
References EDM_IOFD_INVALID, m_close, m_fd, rfio_close64(), and serrno.
|
overridevirtual |
Reimplemented from Storage.
Definition at line 201 of file RFIOFile.cc.
References EDM_IOFD_INVALID, m_close, m_fd, m_name, rfio_close64(), rfio_errno, rfio_serror(), serrno, and mps_update::status.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), open(), and reopen().
void RFIOFile::create | ( | const char * | name, |
bool | exclusive = false , |
||
int | perms = 0666 |
||
) |
Definition at line 77 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
void RFIOFile::create | ( | const std::string & | name, |
bool | exclusive = false , |
||
int | perms = 0666 |
||
) |
Definition at line 88 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
void RFIOFile::open | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 105 of file RFIOFile.cc.
References cms::Exception::addContext(), close(), TauDecayModes::dec, EDM_IOFD_INVALID, edm::errors::FileOpenError, flags, m_close, m_curpos, m_fd, m_flags, m_name, m_perms, dataset::name, O_NONBLOCK, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenNonBlock, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenUnbuffered, IOFlags::OpenWrite, rfio_errno, rfio_open64(), RFIO_READOPT, rfio_serror(), rfiosetopt(), serrno, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by create(), open(), reopen(), and RFIOFile().
void RFIOFile::open | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 99 of file RFIOFile.cc.
Implements Storage.
Definition at line 382 of file RFIOFile.cc.
References cms::Exception::addContext(), Storage::CURRENT, EDM_IOFD_INVALID, Storage::END, m_curpos, m_fd, m_name, mps_fire::result, rfio_errno, rfio_lseek64(), rfio_serror(), serrno, and Storage::SET.
Read into into at most n number of bytes.
If this is a blocking stream, the call will block until some data can be read, end of input is reached, or an exception is thrown. For a non-blocking stream the available input is returned. If none is available, an exception is thrown.
In | case of error, a #IOError exception is thrown. This includes the situation where the input stream is in non-blocking mode and no input is currently available (FIXME: make this simpler; clarify which exception). |
Implements IOInput.
Definition at line 326 of file RFIOFile.cc.
References cms::Exception::addContext(), end, edm::errors::FileReadError, LogDebug, m_curpos, m_name, realNanoSecs(), retryRead(), rfio_errno, rfio_serror(), alignCSCRings::s, and serrno.
|
overridevirtual |
Reimplemented from Storage.
Definition at line 355 of file RFIOFile.cc.
References m_flags, IOFlags::OpenUnbuffered, Storage::prefetch(), and Storage::readv().
|
private |
Definition at line 255 of file RFIOFile.cc.
References close(), m_curpos, m_flags, m_name, m_perms, open(), and Storage::position().
Referenced by retryRead().
|
overridevirtual |
Implements Storage.
Definition at line 414 of file RFIOFile.cc.
References m_name.
Referenced by Vispa.Gui.TextDialog.TextDialog::__init__(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::__init__(), Vispa.Main.MainWindow.MainWindow::_loadIni(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
|
private |
Definition at line 269 of file RFIOFile.cc.
References edm::FlushMessageLog(), m_curpos, m_fd, m_name, reopen(), rfio_errno, rfio_read64(), rfio_serror(), alignCSCRings::s, and serrno.
Referenced by read().
Write n bytes of data starting at address from.
In | case of error, an exception is thrown. However if the stream is in non-blocking mode and cannot accept output, it will not throw an exception – the return value will be less than requested. |
Implements IOOutput.
Definition at line 363 of file RFIOFile.cc.
References cms::Exception::addContext(), m_curpos, m_fd, m_name, rfio_errno, rfio_serror(), rfio_write64(), alignCSCRings::s, and serrno.
|
private |
Definition at line 55 of file RFIOFile.h.
Referenced by abort(), close(), open(), and ~RFIOFile().
|
private |
Definition at line 59 of file RFIOFile.h.
Referenced by open(), position(), read(), reopen(), retryRead(), and write().
|
private |
Definition at line 54 of file RFIOFile.h.
Referenced by abort(), close(), open(), position(), retryRead(), and write().
|
private |
Definition at line 57 of file RFIOFile.h.
|
private |
Definition at line 56 of file RFIOFile.h.
Referenced by close(), open(), position(), read(), reopen(), resize(), retryRead(), write(), and ~RFIOFile().
|
private |
Definition at line 58 of file RFIOFile.h.