#include <RFIOFile.h>
Public Member Functions | |
virtual void | abort (void) |
virtual void | close (void) |
virtual void | create (const char *name, bool exclusive=false, int perms=0666) |
virtual void | create (const std::string &name, bool exclusive=false, int perms=0666) |
virtual void | open (const char *name, int flags=IOFlags::OpenRead, int perms=0666) |
virtual void | open (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666) |
virtual IOOffset | position (IOOffset offset, Relative whence=SET) |
virtual bool | prefetch (const IOPosBuffer *what, IOSize n) |
virtual IOSize | read (void *into, IOSize n) |
virtual IOSize | readv (IOPosBuffer *into, IOSize buffers) |
virtual void | resize (IOOffset size) |
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) |
~RFIOFile (void) | |
Public Member Functions inherited from Storage | |
virtual bool | eof (void) const |
virtual void | flush (void) |
virtual IOOffset | position (void) const |
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.
|
virtual |
Definition at line 245 of file RFIOFile.cc.
References EDM_IOFD_INVALID, m_close, m_fd, rfio_close64(), and serrno.
|
virtual |
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, stor::utils::sleep(), and ntuplemaker::status.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), open(), and reopen().
|
virtual |
Definition at line 77 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 88 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 105 of file RFIOFile.cc.
References cms::Exception::addContext(), close(), EDM_IOFD_INVALID, edm::errors::FileOpenError, flags, m_close, m_curpos, m_fd, m_flags, m_name, m_perms, mergeVDriftHistosByStation::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(), and serrno.
Referenced by create(), open(), reopen(), and RFIOFile().
|
virtual |
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, query::result, rfio_errno, rfio_lseek64(), rfio_serror(), serrno, and Storage::SET.
|
virtual |
Reimplemented from Storage.
Definition at line 422 of file RFIOFile.cc.
References i, o2o::iov, m_curpos, m_fd, m_name, n, IOPosBuffer::offset(), query::result, rfio_errno, rfio_preseek64(), RFIO_READOPT, rfio_serror(), rfioreadopt(), serrno, IOPosBuffer::size(), and stor::utils::sleep().
Referenced by readv().
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, serrno, and errorMatrix2Lands_multiChannel::start.
|
virtual |
Reimplemented from Storage.
Definition at line 355 of file RFIOFile.cc.
References m_flags, IOFlags::OpenUnbuffered, prefetch(), and Storage::readv().
|
private |
Definition at line 255 of file RFIOFile.cc.
References close(), m_curpos, m_flags, m_name, m_perms, open(), Storage::position(), and stor::utils::sleep().
Referenced by retryRead().
|
virtual |
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, serrno, and stor::utils::sleep().
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 51 of file RFIOFile.h.
Referenced by abort(), close(), open(), and ~RFIOFile().
|
private |
Definition at line 55 of file RFIOFile.h.
Referenced by open(), position(), prefetch(), read(), reopen(), retryRead(), and write().
|
private |
Definition at line 50 of file RFIOFile.h.
Referenced by abort(), close(), open(), position(), prefetch(), retryRead(), and write().
|
private |
Definition at line 53 of file RFIOFile.h.
|
private |
Definition at line 52 of file RFIOFile.h.
Referenced by close(), open(), position(), prefetch(), read(), reopen(), resize(), retryRead(), write(), and ~RFIOFile().
|
private |
Definition at line 54 of file RFIOFile.h.