evio::evioBufferChannel Class Reference

Implements evioChannel functionality for I/O to and from user-supplied evio buffer. More...

#include <evioBufferChannel.hxx>

Inheritance diagram for evio::evioBufferChannel:
evio::evioChannel

List of all members.

Public Member Functions

 evioBufferChannel (uint32_t *streamBuf, int bufLen, const string &mode="r", int size=100000) throw (evioException)
 Constructor opens buffer for reading or writing.
 evioBufferChannel (uint32_t *streamBuf, int bufLen, evioDictionary *dict, const string &mode="r", int size=100000) throw (evioException)
 Constructor opens buffer for reading or writing.
virtual ~evioBufferChannel (void)
 Destructor closes buffer, deletes internal buffer and dictionary.
void open (void) throw (evioException)
 Opens channel for reading or writing.
bool read (void) throw (evioException)
 Reads from buffer.
bool read (uint32_t *myEventBuf, int length) throw (evioException)
 Reads from buffer into user-supplied event buffer.
bool readAlloc (uint32_t **buffer, uint32_t *bufLen) throw (evioException)
 Reads from file and allocates buffer as needed.
bool readNoCopy (void) throw (evioException)
 Get const pointer to next event in stream buffer.
bool readRandom (uint32_t bufferNumber) throw (evioException)
 Reads buffer from file given buffer number.
void write (void) throw (evioException)
 Writes to buffer from internal buffer.
void write (const uint32_t *myEventBuf) throw (evioException)
 Writes to buffer from user-supplied buffer.
void write (const evioChannel &channel) throw (evioException)
 Writes to buffer from internal buffer of another evioChannel object.
void write (const evioChannel *channel) throw (evioException)
 Writes from internal buffer of another evioChannel object.
void write (const evioChannelBufferizable &o) throw (evioException)
 Writes from contents of evioChannelBufferizable object.
void write (const evioChannelBufferizable *o) throw (evioException)
 Writes from contents of evioChannelBufferizable object.
void close (void) throw (evioException)
 Closes channel.
int ioctl (const string &request, void *argp) throw (evioException)
 For getting and setting evIoctl parameters.
const uint32_t * getBuffer (void) const throw (evioException)
 Returns pointer to internal channel buffer.
int getBufSize (void) const
 Returns internal channel buffer size.
const uint32_t * getNoCopyBuffer (void) const throw (evioException)
 Returns pointer to no copy buffer.
const uint32_t * getRandomBuffer (void) const throw (evioException)
 Returns pointer to random buffer.
void getRandomAccessTable (const uint32_t ***table, uint32_t *len) const throw (evioException)
 Returns random access table.
const uint32_t * getStreamBuffer (void) const throw (evioException)
 Returns pointer to stream buffer.
int getStreamBufSize (void) const
 Returns internal channel buffer size.
string getMode (void) const
 Returns channel I/O mode.
uint32_t getEVIOBufferLength (void) const throw (evioException)
 Returns length of event record in stream buffer in 4-byte words.
string getBufferXMLDictionary (void) const
 Returns XML dictionary read in from buffer.

Detailed Description

Implements evioChannel functionality for I/O to and from user-supplied evio buffer.


Constructor & Destructor Documentation

evioBufferChannel::evioBufferChannel ( uint32_t *  streamBuf,
int  bufLen,
const string &  m = "r",
int  size = 100000 
) throw (evioException)

Constructor opens buffer for reading or writing.

Parameters:
streamBuf Stream buffer specified by the user
bufLen size of the stream buffer
m I/O mode, "r" or "ra" or "w" or "a"
size Internal event buffer size
evioBufferChannel::evioBufferChannel ( uint32_t *  streamBuf,
int  bufLen,
evioDictionary dict,
const string &  m = "r",
int  size = 100000 
) throw (evioException)

Constructor opens buffer for reading or writing.

Parameters:
streamBuf Stream buffer specified by the user
bufLen size of the stream buffer
dict Dictionary
m I/O mode, "r" or "ra" or "w" or "a"
size Internal event buffer size
evioBufferChannel::~evioBufferChannel ( void   )  [virtual]

Destructor closes buffer, deletes internal buffer and dictionary.

References close(), and evio::evioChannel::dictionary.


Member Function Documentation

void evioBufferChannel::close ( void   )  throw (evioException) [virtual]

Closes channel.

Implements evio::evioChannel.

Referenced by ~evioBufferChannel().

const uint32_t * evioBufferChannel::getBuffer ( void   )  const throw (evioException) [virtual]

Returns pointer to internal channel buffer.

Returns:
Pointer to internal buffer

Implements evio::evioChannel.

string evioBufferChannel::getBufferXMLDictionary ( void   )  const

Returns XML dictionary read in from buffer.

Returns:
XML dictionary read in from buffer
int evioBufferChannel::getBufSize ( void   )  const [virtual]

Returns internal channel buffer size.

Returns:
Internal buffer size in 4-byte words

Implements evio::evioChannel.

uint32_t evioBufferChannel::getEVIOBufferLength ( void   )  const throw (evioException)

Returns length of event record in stream buffer in 4-byte words.

Returns:
Length of event record in stream buffer 4-byte words
string evioBufferChannel::getMode ( void   )  const

Returns channel I/O mode.

Returns:
String containing I/O mode
const uint32_t * evioBufferChannel::getNoCopyBuffer ( void   )  const throw (evioException) [virtual]

Returns pointer to no copy buffer.

Returns:
Pointer to no copy buffer

Implements evio::evioChannel.

void evioBufferChannel::getRandomAccessTable ( const uint32_t ***  table,
uint32_t *  len 
) const throw (evioException) [virtual]

Returns random access table.

Parameters:
table Pointer to table
len Length of table

Reimplemented from evio::evioChannel.

const uint32_t * evioBufferChannel::getRandomBuffer ( void   )  const throw (evioException) [virtual]

Returns pointer to random buffer.

Returns:
Pointer to random buffer

Reimplemented from evio::evioChannel.

const uint32_t * evioBufferChannel::getStreamBuffer ( void   )  const throw (evioException)

Returns pointer to stream buffer.

Returns:
Pointer to stream buffer
int evioBufferChannel::getStreamBufSize ( void   )  const

Returns internal channel buffer size.

Returns:
Internal buffer size in 4-byte words
int evioBufferChannel::ioctl ( const string &  request,
void *  argp 
) throw (evioException) [virtual]

For getting and setting evIoctl parameters.

Parameters:
request String containing evIoctl parameters
argp Additional evIoctl parameter

Implements evio::evioChannel.

void evioBufferChannel::open ( void   )  throw (evioException) [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().

bool evioBufferChannel::read ( uint32_t *  myBuf,
int  length 
) throw (evioException) [virtual]

Reads from buffer into user-supplied event buffer.

Parameters:
myBuf User-supplied buffer. length Length of buffer in 4-byte words.
Returns:
true if successful, false on EOF or other evRead error condition

Implements evio::evioChannel.

bool evioBufferChannel::read ( void   )  throw (evioException) [virtual]

Reads from buffer.

Returns:
true if successful, false on EOF or other evRead error condition

Implements evio::evioChannel.

bool evioBufferChannel::readAlloc ( uint32_t **  buffer,
uint32_t *  bufLen 
) throw (evioException) [virtual]

Reads from file and allocates buffer as needed.

Parameters:
buffer Pointer to pointer to allocated buffer.
len Length of allocated buffer in 4-byte words.
Returns:
true if successful, false on EOF, throws exception for other error.

Note: user MUST free the allocated buffer!

Implements evio::evioChannel.

bool evioBufferChannel::readNoCopy ( void   )  throw (evioException) [virtual]

Get const pointer to next event in stream buffer.

Returns:
true if successful, false on EOF, throws exception for other error.

Implements evio::evioChannel.

bool evioBufferChannel::readRandom ( uint32_t  bufferNumber  )  throw (evioException) [virtual]

Reads buffer from file given buffer number.

Parameters:
bufferNumber Buffer to return
Returns:
true if successful, false on EOF, throws exception for other error.

Reimplemented from evio::evioChannel.

void evioBufferChannel::write ( const evioChannelBufferizable o  )  throw (evioException) [virtual]

Writes from contents of evioChannelBufferizable object.

Parameters:
o Pointer to evioChannelBufferizable object that can serialize to buffer

Implements evio::evioChannel.

References write().

void evioBufferChannel::write ( const evioChannelBufferizable o  )  throw (evioException) [virtual]

Writes from contents of evioChannelBufferizable object.

Parameters:
o evioChannelBufferizable object that can serialze to buffer

Implements evio::evioChannel.

References write().

void evioBufferChannel::write ( const evioChannel channel  )  throw (evioException)

Writes from internal buffer of another evioChannel object.

Parameters:
channel Pointer to channel object

References write().

void evioBufferChannel::write ( const evioChannel channel  )  throw (evioException)

Writes to buffer from internal buffer of another evioChannel object.

Parameters:
channel Channel object
void evioBufferChannel::write ( const uint32_t *  myBuf  )  throw (evioException) [virtual]

Writes to buffer from user-supplied buffer.

Parameters:
myBuf Buffer containing event

Implements evio::evioChannel.

void evioBufferChannel::write ( void   )  throw (evioException) [virtual]

Writes to buffer from internal buffer.

Implements evio::evioChannel.

Referenced by write().


The documentation for this class was generated from the following files:

Generated on 4 Feb 2014 for evio by  doxygen 1.6.1