#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 29 of file RFIOFile.cc.
RFIOFile::RFIOFile | ( | IOFD | fd | ) |
Definition at line 37 of file RFIOFile.cc.
RFIOFile::RFIOFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 45 of file RFIOFile.cc.
References open().
RFIOFile::RFIOFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 55 of file RFIOFile.cc.
RFIOFile::~RFIOFile | ( | void | ) |
Definition at line 65 of file RFIOFile.cc.
References m_close, and m_name.
|
virtual |
Definition at line 234 of file RFIOFile.cc.
References EDM_IOFD_INVALID, m_close, m_fd, rfio_close64(), and serrno.
|
virtual |
Reimplemented from Storage.
Definition at line 190 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 python.Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), python.Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), open(), and reopen().
|
virtual |
Definition at line 76 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 87 of file RFIOFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 104 of file RFIOFile.cc.
References close(), EDM_IOFD_INVALID, edm::hlt::Exception, flags, m_close, m_curpos, m_fd, m_flags, m_name, m_perms, AlCaRecoCosmics_cfg::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 98 of file RFIOFile.cc.
Implements Storage.
Definition at line 366 of file RFIOFile.cc.
References Storage::CURRENT, EDM_IOFD_INVALID, Storage::END, edm::hlt::Exception, 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 400 of file RFIOFile.cc.
References edm::hlt::Exception, 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 315 of file RFIOFile.cc.
References end, edm::hlt::Exception, LogDebug, m_curpos, m_name, realNanoSecs(), retryRead(), rfio_errno, rfio_serror(), asciidump::s, and serrno.
|
virtual |
Reimplemented from Storage.
Definition at line 342 of file RFIOFile.cc.
References m_flags, IOFlags::OpenUnbuffered, prefetch(), and Storage::readv().
|
private |
Definition at line 244 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 393 of file RFIOFile.cc.
References edm::hlt::Exception, and m_name.
Referenced by python.Vispa.Gui.TextDialog.TextDialog::__init__(), python.Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::__init__(), python.Vispa.Main.MainWindow.MainWindow::_loadIni(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
|
private |
Definition at line 258 of file RFIOFile.cc.
References edm::FlushMessageLog(), m_curpos, m_fd, m_name, reopen(), rfio_errno, rfio_read64(), rfio_serror(), asciidump::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 350 of file RFIOFile.cc.
References edm::hlt::Exception, m_curpos, m_fd, m_name, rfio_errno, rfio_serror(), rfio_write64(), asciidump::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.