#include <XrdFile.h>
Public Member Functions | |
virtual void | abort (void) |
void | close (void) override |
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) |
IOOffset | position (IOOffset offset, Relative whence=SET) override |
bool | prefetch (const IOPosBuffer *what, IOSize n) override |
IOSize | read (void *into, IOSize n) override |
IOSize | read (void *into, IOSize n, IOOffset pos) override |
IOSize | readv (IOBuffer *into, IOSize n) override |
IOSize | readv (IOPosBuffer *into, IOSize n) override |
void | resize (IOOffset size) override |
IOSize | write (const void *from, IOSize n) override |
IOSize | write (const void *from, IOSize n, IOOffset pos) override |
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) override | |
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) |
~Storage (void) override | |
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 |
edm::propagate_const< 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 22 of file XrdFile.cc.
XrdFile::XrdFile | ( | IOFD | fd | ) |
XrdFile::XrdFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 31 of file XrdFile.cc.
References open().
XrdFile::XrdFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 43 of file XrdFile.cc.
|
override |
Definition at line 55 of file XrdFile.cc.
References m_close, and m_name.
|
virtual |
Definition at line 216 of file XrdFile.cc.
References m_close, m_offset, m_requestmanager, and m_size.
|
private |
Definition at line 615 of file XrdFile.cc.
References edm::propagate_const< T >::get(), and m_requestmanager.
Referenced by open(), position(), read(), resize(), and write().
|
overridevirtual |
Reimplemented from Storage.
Definition at line 196 of file XrdFile.cc.
References edm::propagate_const< T >::get(), 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 65 of file XrdFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 76 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 600 of file XrdFile.cc.
References cms::Exception::addContext(), edm::propagate_const< T >::get(), m_close, m_name, and m_requestmanager.
Referenced by open(), and write().
|
virtual |
Definition at line 93 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), FrontierConditions_GlobalTag_cff::file, edm::errors::FileOpenError, getActiveFile(), m_close, m_name, m_offset, m_requestmanager, m_size, dataset::name, None, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenWrite, and mps_update::status.
Referenced by create(), open(), and XrdFile().
|
virtual |
Definition at line 87 of file XrdFile.cc.
Implements Storage.
Definition at line 547 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), Storage::CURRENT, Storage::END, edm::propagate_const< T >::get(), m_offset, m_requestmanager, m_size, PFRecoTauDiscriminationByIsolation_cfi::offset, and Storage::SET.
|
overridevirtual |
Reimplemented from Storage.
Definition at line 536 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 226 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, edm::propagate_const< T >::get(), m_name, m_offset, and m_requestmanager.
Reimplemented from Storage.
Definition at line 243 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), edm::errors::FileReadError, m_name, m_requestmanager, min(), eostools::move(), mps_fire::result, and XRD_CL_MAX_READ_SIZE.
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 310 of file XrdFile.cc.
References data, mps_fire::i, gen::n, IOBuffer::size(), and Storage::size().
|
overridevirtual |
Reimplemented from Storage.
Definition at line 328 of file XrdFile.cc.
References cms::Exception::addContext(), edmScanValgrind::buffer, GetRecoTauVFromDQM_MC_cff::cl, KineDebug3::count(), IOPosBuffer::data(), data, end, cppFunctionSkipper::exception, edm::propagate_const< T >::get(), XrdAdaptor::XrootdException::getCode(), training_settings::idx, m_op_count, m_requestmanager, cmsPerfSuiteHarvest::now, IOPosBuffer::offset(), PFRecoTauDiscriminationByIsolation_cfi::offset, IOInput::read(), mps_fire::result, IOPosBuffer::set_data(), IOPosBuffer::set_offset(), IOPosBuffer::set_size(), IOPosBuffer::size(), Storage::size(), command_line::start, edm::errors::StdException, unlikely, cms::Exception::what(), XRD_CL_MAX_CHUNK, and XRD_CL_MAX_SIZE.
|
overridevirtual |
Implements Storage.
Definition at line 590 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 475 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), FrontierConditions_GlobalTag_cff::file, getActiveFile(), m_name, m_offset, m_size, gen::n, and alignCSCRings::s.
Reimplemented from Storage.
Definition at line 506 of file XrdFile.cc.
References addConnection(), cms::Exception::addContext(), FrontierConditions_GlobalTag_cff::file, getActiveFile(), m_name, m_size, gen::n, and alignCSCRings::s.
|
private |
Definition at line 71 of file XrdFile.h.
Referenced by abort(), close(), getActiveFile(), open(), and ~XrdFile().
|
private |
Definition at line 72 of file XrdFile.h.
Referenced by close(), getActiveFile(), open(), read(), resize(), write(), and ~XrdFile().
|
private |
|
private |
|
private |
Definition at line 68 of file XrdFile.h.
Referenced by abort(), addConnection(), close(), getActiveFile(), open(), position(), read(), and readv().