#include <DCacheFile.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) |
DCacheFile (void) | |
DCacheFile (IOFD fd) | |
DCacheFile (const char *name, int flags=IOFlags::OpenRead, int perms=0666) | |
DCacheFile (const std::string &name, int flags=IOFlags::OpenRead, 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 |
IOSize | read (void *into, IOSize n) override |
IOSize | readv (IOBuffer *into, IOSize buffers) override |
IOSize | readv (IOPosBuffer *into, IOSize buffers) override |
void | resize (IOOffset size) override |
IOSize | write (const void *from, IOSize n) override |
~DCacheFile (void) override | |
Public Member Functions inherited from Storage | |
virtual bool | eof (void) const |
virtual void | flush (void) |
virtual IOOffset | position (void) const |
virtual bool | prefetch (const IOPosBuffer *what, IOSize n) |
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) |
~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 Attributes | |
bool | m_close |
IOFD | m_fd |
std::string | m_name |
Additional Inherited Members | |
Public Types inherited from Storage | |
enum | Relative { SET, CURRENT, END } |
Definition at line 8 of file DCacheFile.h.
DCacheFile::DCacheFile | ( | void | ) |
Definition at line 11 of file DCacheFile.cc.
DCacheFile::DCacheFile | ( | IOFD | fd | ) |
Definition at line 13 of file DCacheFile.cc.
DCacheFile::DCacheFile | ( | const char * | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 15 of file DCacheFile.cc.
References open().
DCacheFile::DCacheFile | ( | const std::string & | name, |
int | flags = IOFlags::OpenRead , |
||
int | perms = 0666 |
||
) |
Definition at line 20 of file DCacheFile.cc.
References HLT_2018_cff::flags, and open().
|
override |
Definition at line 25 of file DCacheFile.cc.
References m_close, and m_name.
|
virtual |
|
overridevirtual |
Reimplemented from Storage.
Definition at line 122 of file DCacheFile.cc.
References EDM_IOFD_INVALID, m_close, m_fd, and m_name.
Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), and open().
|
virtual |
Definition at line 32 of file DCacheFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 38 of file DCacheFile.cc.
References open(), IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenTruncate, and IOFlags::OpenWrite.
|
virtual |
Definition at line 48 of file DCacheFile.cc.
References cms::Exception::addContext(), close(), TauDecayModes::dec, EDM_IOFD_INVALID, edm::errors::FileOpenError, m_close, m_fd, m_name, Skims_PA_cff::name, O_NONBLOCK, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenNonBlock, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenUnbuffered, and IOFlags::OpenWrite.
Referenced by create(), DCacheFile(), and open().
|
virtual |
Definition at line 44 of file DCacheFile.cc.
References HLT_2018_cff::flags, and open().
Implements Storage.
Definition at line 279 of file DCacheFile.cc.
References cms::Exception::addContext(), Storage::CURRENT, EDM_IOFD_INVALID, Storage::END, m_fd, m_name, mps_fire::result, and Storage::SET.
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 165 of file DCacheFile.cc.
References cms::Exception::addContext(), BUGLINE, fileCollector::done, edm::errors::FileReadError, m_fd, m_name, 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 212 of file DCacheFile.cc.
References cms::Exception::addContext(), data, edm::errors::FileReadError, mps_fire::i, m_fd, m_name, dqmiodumpmetadata::n, and IOBuffer::size().
|
overridevirtual |
Reimplemented from Storage.
Definition at line 243 of file DCacheFile.cc.
References cms::Exception::addContext(), data, edm::errors::FileReadError, mps_fire::i, m_fd, m_name, dqmiodumpmetadata::n, IOPosBuffer::offset(), IOPosBuffer::size(), and dqmMemoryStats::total.
|
overridevirtual |
Implements Storage.
Definition at line 313 of file DCacheFile.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().
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 190 of file DCacheFile.cc.
References cms::Exception::addContext(), BUGLINE, fileCollector::done, edm::errors::FileWriteError, m_fd, m_name, and alignCSCRings::s.
|
private |
Definition at line 38 of file DCacheFile.h.
Referenced by abort(), close(), open(), and ~DCacheFile().
|
private |
Definition at line 37 of file DCacheFile.h.
Referenced by abort(), close(), open(), position(), read(), readv(), and write().
|
private |
Definition at line 39 of file DCacheFile.h.
Referenced by close(), open(), position(), read(), readv(), resize(), write(), and ~DCacheFile().