|
evio
5.3
|
Implements evioChannel functionality for I/O to and from user-supplied evio buffer. More...
#include <evioBufferChannel.hxx>
Public Member Functions | |
| evioBufferChannel (uint32_t *streamBuf, int bufLen, const string &mode="r", int size=100000) | |
| Constructor opens buffer for reading or writing. More... | |
| evioBufferChannel (uint32_t *streamBuf, int bufLen, evioDictionary *dict, const string &mode="r", int size=100000) | |
| Constructor opens buffer for reading or writing. More... | |
| virtual | ~evioBufferChannel () |
| Destructor closes buffer, deletes internal buffer and dictionary. More... | |
| void | open () |
| Opens channel for reading or writing. More... | |
| bool | read () |
| Reads from buffer. More... | |
| bool | read (uint32_t *myEventBuf, int length) |
| Reads from buffer into user-supplied event buffer. More... | |
| bool | readAlloc (uint32_t **buffer, uint32_t *bufLen) |
| Reads from file and allocates buffer as needed. More... | |
| bool | readNoCopy () |
| Get const pointer to next event in stream buffer. More... | |
| bool | readRandom (uint32_t bufferNumber) |
| Reads buffer from file given buffer number. More... | |
| void | write () |
| Writes to buffer from internal buffer. More... | |
| void | write (const uint32_t *myEventBuf) |
| Writes to buffer from user-supplied buffer. More... | |
| void | write (const evioChannel &channel) |
| Writes to buffer from internal buffer of another evioChannel object. More... | |
| void | write (const evioChannel *channel) |
| Writes from internal buffer of another evioChannel object. More... | |
| void | write (const evioChannelBufferizable &o) |
| Writes from contents of evioChannelBufferizable object. More... | |
| void | write (const evioChannelBufferizable *o) |
| Writes from contents of evioChannelBufferizable object. More... | |
| void | close () |
| Closes channel. More... | |
| int | ioctl (const string &request, void *argp) |
| For getting and setting evIoctl parameters. More... | |
| const uint32_t * | getBuffer () const |
| Returns pointer to internal channel buffer. More... | |
| int | getBufSize () const |
| Returns internal channel buffer size. More... | |
| const uint32_t * | getNoCopyBuffer () const |
| Returns pointer to no copy buffer. More... | |
| const uint32_t * | getRandomBuffer () const |
| Returns pointer to random buffer. More... | |
| void | getRandomAccessTable (uint32_t ***const table, uint32_t *len) const |
| Returns random access table. More... | |
| const uint32_t * | getStreamBuffer () const |
| Returns pointer to stream buffer. More... | |
| int | getStreamBufSize () const |
| Returns internal channel buffer size. More... | |
| string | getMode () const |
| Returns channel I/O mode. More... | |
| uint32_t | getEVIOBufferLength () const |
| Returns length of event record in stream buffer in 4-byte words. More... | |
| string | getBufferXMLDictionary () const |
| Returns XML dictionary read in from buffer. More... | |
Public Member Functions inherited from evio::evioChannel | |
| evioChannel () | |
| evioChannel (evioDictionary *dict) | |
| virtual | ~evioChannel () |
| virtual const evioDictionary * | getDictionary () const |
Additional Inherited Members | |
Protected Attributes inherited from evio::evioChannel | |
| evioDictionary * | dictionary |
Implements evioChannel functionality for I/O to and from user-supplied evio buffer.
| evioBufferChannel::evioBufferChannel | ( | uint32_t * | streamBuf, |
| int | bufLen, | ||
| const string & | m = "r", |
||
| int | size = 100000 |
||
| ) |
Constructor opens buffer for reading or writing.
| streamBuf | Stream buffer specified by the user |
| bufLen | size of the stream buffer |
| m | I/O mode, "r", "ra", "w", or "a" |
| size | Internal event buffer size |
| evioBufferChannel::evioBufferChannel | ( | uint32_t * | streamBuf, |
| int | bufLen, | ||
| evioDictionary * | dict, | ||
| const string & | m = "r", |
||
| int | size = 100000 |
||
| ) |
Constructor opens buffer for reading or writing.
| streamBuf | Stream buffer specified by the user |
| bufLen | size of the stream buffer |
| dict | Dictionary |
| m | I/O mode, "r", "ra", "w", or "a" |
| size | Internal event buffer size |
|
virtual |
Destructor closes buffer, deletes internal buffer and dictionary.
References close(), and evio::evioChannel::dictionary.
|
virtual |
|
virtual |
Returns pointer to internal channel buffer.
Implements evio::evioChannel.
| string evioBufferChannel::getBufferXMLDictionary | ( | ) | const |
Returns XML dictionary read in from buffer.
|
virtual |
Returns internal channel buffer size.
Implements evio::evioChannel.
| uint32_t evioBufferChannel::getEVIOBufferLength | ( | ) | const |
Returns length of event record in stream buffer in 4-byte words.
| string evioBufferChannel::getMode | ( | ) | const |
Returns channel I/O mode.
|
virtual |
|
virtual |
Returns random access table.
| table | Pointer to table |
| len | Length of table |
Reimplemented from evio::evioChannel.
|
virtual |
Returns pointer to random buffer.
Reimplemented from evio::evioChannel.
| const uint32_t * evioBufferChannel::getStreamBuffer | ( | ) | const |
Returns pointer to stream buffer.
| int evioBufferChannel::getStreamBufSize | ( | ) | const |
Returns internal channel buffer size.
|
virtual |
For getting and setting evIoctl parameters.
| request | String containing evIoctl parameters |
| argp | Additional evIoctl parameter |
Implements evio::evioChannel.
|
virtual |
Opens channel for reading or writing.
For read, user-supplied dictionary overrides one found in buffer.
Implements evio::evioChannel.
References evio::evioChannel::dictionary, and evio::evioDictionary::getDictionaryXML().
|
virtual |
Reads from buffer.
Implements evio::evioChannel.
|
virtual |
Reads from buffer into user-supplied event buffer.
| myBuf | User-supplied buffer. @parem length Length of buffer in 4-byte words. |
Implements evio::evioChannel.
|
virtual |
Reads from file and allocates buffer as needed.
| buffer | Pointer to pointer to allocated buffer. |
| len | Length of allocated buffer in 4-byte words. |
Note: user MUST free the allocated buffer!
Implements evio::evioChannel.
|
virtual |
Get const pointer to next event in stream buffer.
Implements evio::evioChannel.
|
virtual |
Reads buffer from file given buffer number.
| bufferNumber | Buffer to return |
Reimplemented from evio::evioChannel.
|
virtual |
|
virtual |
Writes to buffer from internal buffer of another evioChannel object.
| channel | Channel object |
Implements evio::evioChannel.
References evio::evioChannel::getBuffer().
|
virtual |
Writes from internal buffer of another evioChannel object.
| channel | Pointer to channel object |
Implements evio::evioChannel.
References write().
|
virtual |
Writes from contents of evioChannelBufferizable object.
| o | evioChannelBufferizable object that can serialze to buffer |
Implements evio::evioChannel.
References evio::evioChannelBufferizable::toEVIOBuffer(), and write().
|
virtual |
Writes from contents of evioChannelBufferizable object.
| o | Pointer to evioChannelBufferizable object that can serialize to buffer |
Implements evio::evioChannel.
References write().
|
virtual |
Writes to buffer from user-supplied buffer.
| myBuf | Buffer containing event |
Implements evio::evioChannel.