#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 &) |
std::shared_ptr< XrdCl::File > | getActiveFile () |
Private Attributes | |
bool | m_close |
std::string | m_name |
IOOffset | m_offset |
std::atomic< unsigned int > | m_op_count |
std::shared_ptr < XrdAdaptor::RequestManager > | m_requestmanager |
IOOffset | m_size |
Additional Inherited Members | |
Public Types inherited from Storage | |
enum | Relative { SET, CURRENT, END } |
XrdFile::XrdFile | ( | void | ) |
Definition at line 20 of file XrdFile.cc.
XrdFile::XrdFile | ( | IOFD | fd | ) |
XrdFile::XrdFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 29 of file XrdFile.cc.
References open().
XrdFile::XrdFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 41 of file XrdFile.cc.
XrdFile::~XrdFile | ( | void | ) |
Definition at line 53 of file XrdFile.cc.
References m_close, and m_name.
|
virtual |
Definition at line 214 of file XrdFile.cc.
References m_close, m_offset, m_requestmanager, and m_size.
|
private |
Definition at line 564 of file XrdFile.cc.
References m_requestmanager.
Referenced by open(), position(), read(), resize(), and write().
|
virtual |
Reimplemented from Storage.
Definition at line 194 of file XrdFile.cc.
References m_close, m_name, m_offset, m_requestmanager, and m_size.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), and Vispa.Gui.FindDialog.FindDialog::keyPressEvent().
|
virtual |
Definition at line 63 of file XrdFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 74 of file XrdFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
private |
Returns a file handle from one of the active sources. Verifies the file is open and throws an exception as necessary.
Definition at line 549 of file XrdFile.cc.
References cms::Exception::addContext(), m_close, m_name, and m_requestmanager.
Referenced by open(), and write().
|
virtual |
Definition at line 91 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), assert(), mergeVDriftHistosByStation::file, edm::errors::FileOpenError, getActiveFile(), m_close, m_name, m_offset, m_requestmanager, m_size, mergeVDriftHistosByStation::name, FSQ::None, NULL, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenWrite, contentValuesCheck::ss, and ntuplemaker::status.
Referenced by create(), open(), and XrdFile().
|
virtual |
Definition at line 85 of file XrdFile.cc.
Implements Storage.
Definition at line 496 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), assert(), Storage::CURRENT, Storage::END, m_offset, m_requestmanager, m_size, hltrates_dqm_sourceclient-live_cfg::offset, and Storage::SET.
|
virtual |
Reimplemented from Storage.
Definition at line 485 of file XrdFile.cc.
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 224 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, m_name, m_offset, and m_requestmanager.
Reimplemented from Storage.
Definition at line 241 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, m_name, and m_requestmanager.
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 259 of file XrdFile.cc.
References data, i, gen::n, IOBuffer::size(), and Storage::size().
|
virtual |
Reimplemented from Storage.
Definition at line 277 of file XrdFile.cc.
References cms::Exception::addContext(), assert(), GetRecoTauVFromDQM_MC_cff::cl, prof2calltree::count, IOPosBuffer::data(), data, end, cppFunctionSkipper::exception, XrdAdaptor::XrootdException::getCode(), customizeTrackingMonitorSeedNumber::idx, m_op_count, m_requestmanager, fileCollector::now, IOPosBuffer::offset(), hltrates_dqm_sourceclient-live_cfg::offset, IOInput::read(), query::result, IOPosBuffer::set_data(), IOPosBuffer::set_offset(), IOPosBuffer::set_size(), IOPosBuffer::size(), Storage::size(), dqm_diff::start, edm::errors::StdException, unlikely, cms::Exception::what(), XRD_CL_MAX_CHUNK, and XRD_CL_MAX_SIZE.
|
virtual |
Implements Storage.
Definition at line 539 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 424 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), assert(), mergeVDriftHistosByStation::file, getActiveFile(), m_name, m_offset, m_size, gen::n, and alignCSCRings::s.
Reimplemented from Storage.
Definition at line 455 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), assert(), mergeVDriftHistosByStation::file, getActiveFile(), m_name, m_size, gen::n, and alignCSCRings::s.
|
private |
Definition at line 70 of file XrdFile.h.
Referenced by abort(), close(), getActiveFile(), open(), and ~XrdFile().
|
private |
Definition at line 71 of file XrdFile.h.
Referenced by close(), getActiveFile(), open(), read(), resize(), write(), and ~XrdFile().
|
private |
|
private |
|
private |
Definition at line 67 of file XrdFile.h.
Referenced by abort(), addConnection(), close(), getActiveFile(), open(), position(), read(), and readv().