evio
6.0
|
These routines handle opening the ev lib for writing to a file, buffer, or socket. More...
Functions | |
int | evWrite (int handle, const uint32_t *buffer) |
This routine writes an evio event to an internal buffer containing evio data. More... | |
int | evFlush (int handle) |
This function flushes any remaining internally buffered data to file/socket. More... | |
int | evStringsToBuf (uint32_t *buffer, int bufLen, char **strings, int stringCount, int *dataLen) |
This routine writes an array of strings, in evio format, into the given buffer. More... | |
These routines handle opening the ev lib for writing to a file, buffer, or socket.
int evFlush | ( | int | handle | ) |
This function flushes any remaining internally buffered data to file/socket.
Calling evClose automatically does this so it isn't necessary to call before closing. This method should only be used when writing events at such a low rate that it takes an inordinate amount of time for internally buffered data to be written to the file.
Calling this can kill performance if writing to a hard disk!
handle | evio handle |
References EV_WRITEFILE, EV_WRITEPIPE, EV_WRITESOCK, evfilestruct::lastEmptyBlockHeaderExists, evfilestruct::rw, S_EVFILE_BADHANDLE, and S_SUCCESS.
int evStringsToBuf | ( | uint32_t * | buffer, |
int | bufLen, | ||
char ** | strings, | ||
int | stringCount, | ||
int * | dataLen | ||
) |
This routine writes an array of strings, in evio format, into the given buffer.
This does NOT include any bank, segment, or tagsegment header. The length of the written data in bytes is returned in the "dataLen" arg. The written data is endian independent.
buffer | buffer in which to place the evio format string data |
bufLen | length of available room in which to write data in buffer in bytes |
strings | array of strings to write as data |
stringCount | number of strings in string array |
dataLen | pointer to int which gets filled the length of the written data in bytes |
References S_EVFILE_BADARG, S_EVFILE_TRUNC, and S_SUCCESS.
int evWrite | ( | int | handle, |
const uint32_t * | buffer | ||
) |
This routine writes an evio event to an internal buffer containing evio data.
If that internal buffer is full, it is flushed to the final destination file/socket/buffer/pipe opened with routines evOpen, evOpenBuffer, or evOpenSocket. It writes data in evio version 4 format and returns a status.
handle | evio handle |
buffer | pointer to buffer containing event to write |
Referenced by evwrite_(), and main().