#include <XrdFile.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 | read (void *into, IOSize n, IOOffset pos) |
virtual IOSize | readv (IOBuffer *into, IOSize n) |
virtual IOSize | readv (IOPosBuffer *into, IOSize n) |
virtual void | resize (IOOffset size) |
virtual IOSize | write (const void *from, IOSize n) |
virtual IOSize | write (const void *from, IOSize n, IOOffset pos) |
XrdFile (void) | |
XrdFile (IOFD fd) | |
XrdFile (const char *name, int flags=IOFlags::OpenRead, int perms=0666) | |
XrdFile (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666) | |
~XrdFile (void) | |
Public Member Functions inherited from Storage | |
virtual bool | eof (void) const |
virtual void | flush (void) |
virtual IOOffset | position (void) const |
IOSize | read (IOBuffer into, IOOffset pos) |
virtual void | rewind (void) |
virtual IOOffset | size (void) const |
Storage (void) | |
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) |
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 | addConnection (cms::Exception &) |
IOSize | readv_send (char **result_buffer, readahead_list &read_chunk_list, IOSize n, IOSize total_len) |
IOSize | readv_unpack (char **result_buffer, std::vector< char > &res_buf, IOSize datalen, readahead_list &read_chunk_list, IOSize n) |
Private Attributes | |
XrdClient * | m_client |
bool | m_close |
std::string | m_name |
IOOffset | m_offset |
pthread_mutex_t | m_readv_mutex |
XrdClientStatInfo | m_stat |
Additional Inherited Members | |
Public Types inherited from Storage | |
enum | Relative { SET, CURRENT, END } |
XrdFile::XrdFile | ( | void | ) |
XrdFile::XrdFile | ( | IOFD | fd | ) |
XrdFile::XrdFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 21 of file XrdFile.cc.
References m_readv_mutex, m_stat, and open().
XrdFile::XrdFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 35 of file XrdFile.cc.
References flags, m_readv_mutex, m_stat, and open().
XrdFile::~XrdFile | ( | void | ) |
Definition at line 49 of file XrdFile.cc.
References m_close, m_name, and m_readv_mutex.
|
virtual |
|
private |
Definition at line 403 of file XrdFile.cc.
References cms::Exception::addAdditionalInfo(), results_mgr::conn, and m_client.
Referenced by open(), position(), read(), readv(), readv_unpack(), resize(), and write().
|
virtual |
Reimplemented from Storage.
Definition at line 185 of file XrdFile.cc.
References m_client, m_close, m_name, m_offset, and m_stat.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), and open().
|
virtual |
Definition at line 60 of file XrdFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 71 of file XrdFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 88 of file XrdFile.cc.
References abort(), addConnection(), cms::Exception::addContext(), close(), results_mgr::conn, edm::errors::FileOpenError, edm::storage::StatisticsSenderService::getJobID(), query::host, m_client, m_close, m_name, m_offset, m_stat, mergeVDriftHistosByStation::name, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenWrite, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by create(), open(), and XrdFile().
|
virtual |
Definition at line 82 of file XrdFile.cc.
Implements Storage.
Definition at line 353 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), Storage::CURRENT, Storage::END, m_client, m_offset, m_stat, evf::evtn::offset(), and Storage::SET.
|
virtual |
Reimplemented from Storage.
Definition at line 328 of file XrdFile.cc.
References i, m_client, n, NULL, IOPosBuffer::offset(), evf::evtn::offset(), PREFETCH_PROBE_LENGTH, alignCSCRings::r, IOPosBuffer::size(), Storage::size(), pileupDistInMC::total, and unlikely.
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 222 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, m_client, m_name, m_offset, and alignCSCRings::s.
Reimplemented from Storage.
Definition at line 248 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, m_client, m_name, m_offset, and alignCSCRings::s.
Read from the input stream into multiple scattered buffers. There are buffers to fill in an array starting at into; the memory those buffers occupy does not need to be contiguous. The buffers are filled in the order given, eac buffer is filled fully before the subsequent buffers.
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.
The base class implementation uses read(void *, IOSize) method, but derived classes may implement a more efficient alternative.
In | case of error, a #IOError exception is thrown. However if some data has already been read, the error is swallowed and the method returns the data read so far. It is assumed that persistent errors will occur anyway on the next read and sporadic errors like stream becoming unvailable can be ignored. Use xread() if a different policy is desirable. |
Reimplemented from IOInput.
Definition at line 41 of file XrdReadv.cc.
References data, i, n, IOBuffer::size(), and Storage::size().
|
virtual |
Reimplemented from Storage.
Definition at line 60 of file XrdReadv.cc.
References addConnection(), cms::Exception::addContext(), IOPosBuffer::data(), data, edm::errors::FileReadError, patZpeak::handle, i, m_client, m_name, n, IOPosBuffer::offset(), evf::evtn::offset(), IOInput::read(), readv_send(), IOPosBuffer::size(), Storage::size(), and unlikely.
|
private |
Definition at line 136 of file XrdReadv.cc.
References FALSE, m_client, m_readv_mutex, readv_unpack(), evf::utils::sid, and summarizeEdmComparisonLogfiles::success.
Referenced by readv().
|
private |
Definition at line 181 of file XrdReadv.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, i, m_name, n, evf::evtn::offset(), and unlikely.
Referenced by readv_send().
|
virtual |
Implements Storage.
Definition at line 393 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), and 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().
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 273 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), m_client, m_name, m_offset, m_stat, and alignCSCRings::s.
Reimplemented from Storage.
Definition at line 301 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), m_client, m_name, m_stat, and alignCSCRings::s.
|
private |
Definition at line 61 of file XrdFile.h.
Referenced by abort(), addConnection(), close(), open(), position(), prefetch(), read(), readv(), readv_send(), and write().
|
private |
|
private |
Definition at line 65 of file XrdFile.h.
Referenced by close(), open(), read(), readv(), readv_unpack(), resize(), write(), and ~XrdFile().
|
private |
|
private |
Definition at line 68 of file XrdFile.h.
Referenced by readv_send(), XrdFile(), and ~XrdFile().