evio
6.0
|
This structure contains information about file opened for either reading or writing. More...
#include <evio.h>
Data Fields | |
FILE * | file |
pointer to file. More... | |
int | handle |
handle used to access this structure. More... | |
int | rw |
are we reading, writing, piping? More... | |
int | magic |
magic number. More... | |
int | bigEndian |
if big endian = 1 else 0 More... | |
int | byte_swapped |
bytes need swapping = 1 else 0 More... | |
int | version |
evio FORMAT version number. More... | |
int | append |
open buffer or file for writing in append mode = 1, else 0. More... | |
uint32_t | eventCount |
current number of events in (or written to) file/buffer NOT including dictionary(ies). More... | |
uint32_t * | buf |
For files, sockets, and reading buffers = pointer to buffer of block-being-read / blocks-being-written. More... | |
uint32_t * | pBuf |
For reading ver 1-3 files, this points to the beginning of actual buffer in memory. More... | |
uint32_t * | next |
pointer to next word in buffer to be read/written. More... | |
uint32_t | left |
of valid 32 bit unread/unwritten words in buffer.More... | |
uint32_t | blksiz |
size of block in 32 bit words - v3 or size of actual data in block (including header) - v4. More... | |
uint32_t | blknum |
block number of block being read/written. More... | |
int | blkNumDiff |
When reading, the difference between blknum read in and the expected (sequential) value. More... | |
uint32_t | blkSizeTarget |
target size of block in 32 bit words (including block header). More... | |
uint32_t | blkEvCount |
number of events written to block so far (including dictionary). More... | |
uint32_t | bufSize |
When reading, size of block buffer (buf) in 32 bit words. More... | |
uint32_t | bufRealSize |
When writing file/sock/pipe, total size of buffer being written to. More... | |
uint32_t | blkEvMax |
max number of events per block. More... | |
int | isLastBlock |
1 if buf contains last block of file/sock/buf, else 0. More... | |
uint32_t | blocksToParse |
reading file verions 1-3, # of blocks yet to be parsed. More... | |
char * | baseFileName |
base name of file to be written to. More... | |
char * | fileName |
actual name of file to be written to. More... | |
char * | runType |
run type used in auto naming of split files. More... | |
int | specifierCount |
number of C printing int format specifiers in file name (0, 1, 2). More... | |
int | splitting |
0 if not splitting file, else 1. More... | |
int | lastEmptyBlockHeaderExists |
1 if internal buffer has the last empty block header written, else 0. More... | |
uint32_t * | currentHeader |
When writing to file/socket/pipe, this points to current block header of block being written. More... | |
uint32_t | bytesToBuf |
bytes written to internal buffer including dict.More... | |
uint32_t | eventsToBuf |
events written to internal buffer including dictionary.More... | |
uint32_t | eventsToFile |
of events written to file including dictionary.More... | |
uint64_t | bytesToFile |
bytes flushed to the current file (including endingempty block & dictionary), not the total in all split files. More... | |
uint32_t | streamId |
stream id # used in auto naming of files. More... | |
uint32_t | runNumber |
run # used in auto naming of split files. More... | |
uint32_t | splitNumber |
number of next split file (used in auto naming). More... | |
uint64_t | split |
of bytes at which to split file when writing(defaults to EV_SPLIT_SIZE, 1GB). More... | |
uint64_t | fileSize |
size of file being read from, in bytes. More... | |
uint64_t | filePosition |
how far into the file have we read, in bytes. More... | |
char * | rwBuf |
pointer to buffer if reading/writing from/to buffer. More... | |
uint32_t | rwBufSize |
size of rwBuf buffer in bytes. More... | |
uint32_t | rwBytesOut |
number of bytes written to rwBuf with evWrite. More... | |
uint32_t | rwBytesIn |
number of bytes read from rwBuf so far (i.e. More... | |
int | rwFirstWrite |
1 if this evWrite is the first for this rwBuf, else 0. More... | |
int | sockFd |
socket file descriptor if reading/writing from/to socket. More... | |
int | randomAccess |
if true, use random access file/buffer reading. More... | |
size_t | mmapFileSize |
size of mapped file in bytes. More... | |
uint32_t * | mmapFile |
pointer to memory mapped file. More... | |
uint32_t ** | pTable |
array of pointers to events in memory mapped file or buffer. More... | |
int | hasAppendDictionary |
int | wroteDictionary |
dictionary already written out to a single (split fragment) file? More... | |
uint32_t | dictLength |
length of dictionary bank in bytes (including entire header). More... | |
uint32_t * | dictBuf |
buffer containing dictionary bank. More... | |
char * | dictionary |
xml format dictionary to either read or write. More... | |
uint32_t | firstEventLength |
length of first event bank in bytes (including entire header). More... | |
uint32_t * | firstEventBuf |
buffer containing firstEvent bank. More... | |
uint32_t | commonBlkCount |
Number of events written into common block. More... | |
int | lockingOn |
if = 1 (default), turn on the use of a mutex for thread safety. More... | |
uint32_t | fileIndexArrayLen |
file header's index array len in bytes. More... | |
uint32_t | fileUserHeaderLen |
file header's user header len in bytes. More... | |
uint32_t | curRecordIndexArrayLen |
current record header's index array len in bytes. More... | |
uint32_t | curRecordUserHeaderLen |
current record header's user header len in bytes. More... | |
uint64_t | trailerPosition |
trailer's position from start of file in bytes (0 if unknown). More... | |
uint64_t | firstRecordPosition |
first record's position from start of file in bytes (0 if unknown). More... | |
uint32_t * | eventLengths |
For current record, an array containing the event lengths. More... | |
uint32_t | eventLengthsLen |
Size of eventLengths array in words, convenience variable when reading. More... | |
uint32_t * | dataBuf |
For writing, pointer to buffer of events (data) to be written. More... | |
uint32_t * | dataNext |
pointer to next word in dataBuf to be written. More... | |
uint32_t | dataLeft |
of valid 32 bit unwritten words in dataBuf.More... | |
uint32_t | bytesToDataBuf |
data bytes written to dataBuf.More... | |
This structure contains information about file opened for either reading or writing.
int evfilestruct::append |
open buffer or file for writing in append mode = 1, else 0.
If append = 2, then an event was already been appended.
Referenced by evIoctl().
char* evfilestruct::baseFileName |
base name of file to be written to.
Referenced by evGenerateFileName(), and evOpenFake().
int evfilestruct::bigEndian |
if big endian = 1 else 0
uint32_t evfilestruct::blkEvCount |
number of events written to block so far (including dictionary).
Referenced by evIoctl().
uint32_t evfilestruct::blknum |
int evfilestruct::blkNumDiff |
When reading, the difference between blknum read in and the expected (sequential) value.
Used in debug message.
uint32_t evfilestruct::blksiz |
size of block in 32 bit words - v3 or size of actual data in block (including header) - v4.
uint32_t evfilestruct::blkSizeTarget |
target size of block in 32 bit words (including block header).
Referenced by evIoctl().
uint32_t evfilestruct::blocksToParse |
reading file verions 1-3, # of blocks yet to be parsed.
uint32_t* evfilestruct::buf |
For files, sockets, and reading buffers = pointer to buffer of block-being-read / blocks-being-written.
When writing to file/socket/pipe, this buffer may contain multiple blocks. When writing to buffer, this points to block header in block currently being written to (no separate block buffer exists). For reading ver 1-3 files, this points to block being parsed (multiple block are read in at once) and pBuf points to the beginning of actual buffer in memory.
Referenced by evIoctl().
uint32_t evfilestruct::bufRealSize |
When writing file/sock/pipe, total size of buffer being written to.
Amount of memory actually allocated in 32 bit words (not all may be used).
Referenced by evIoctl().
uint32_t evfilestruct::bufSize |
int evfilestruct::byte_swapped |
bytes need swapping = 1 else 0
Referenced by evRead(), evReadNoCopy(), and evReadRandom().
uint32_t evfilestruct::bytesToBuf |
Referenced by evClose().
uint32_t evfilestruct::bytesToDataBuf |
uint64_t evfilestruct::bytesToFile |
uint32_t evfilestruct::commonBlkCount |
Number of events written into common block.
This can be 2 at the most, dictionary + first event.
uint32_t evfilestruct::curRecordIndexArrayLen |
current record header's index array len in bytes.
uint32_t evfilestruct::curRecordUserHeaderLen |
current record header's user header len in bytes.
uint32_t* evfilestruct::currentHeader |
When writing to file/socket/pipe, this points to current block header of block being written.
Referenced by evIoctl().
uint32_t* evfilestruct::dataBuf |
For writing, pointer to buffer of events (data) to be written.
Due to evio version 6 having an array of event lengths after the record header and before the record data, we must store the data separately in order to facilitate writing the record with fewest number of data copies. Stores data for a single record. For convenience, it'll be same size as "buf".
Referenced by evIoctl().
uint32_t evfilestruct::dataLeft |
Referenced by evIoctl().
uint32_t* evfilestruct::dataNext |
pointer to next word in dataBuf to be written.
Referenced by evIoctl().
uint32_t* evfilestruct::dictBuf |
buffer containing dictionary bank.
char* evfilestruct::dictionary |
xml format dictionary to either read or write.
Referenced by evGetDictionary().
uint32_t evfilestruct::dictLength |
length of dictionary bank in bytes (including entire header).
uint32_t evfilestruct::eventCount |
current number of events in (or written to) file/buffer NOT including dictionary(ies).
If the file being written to is split, this value refers to all split files taken together.
Referenced by evGetRandomAccessTable(), and evReadRandom().
uint32_t* evfilestruct::eventLengths |
For current record, an array containing the event lengths.
blkEvCount tracks how many events and therefore entries in this array.
Referenced by evIoctl().
uint32_t evfilestruct::eventLengthsLen |
Size of eventLengths array in words, convenience variable when reading.
uint32_t evfilestruct::eventsToBuf |
Referenced by evClose().
uint32_t evfilestruct::eventsToFile |
If the file is being split, this value refers to the file currently being written to.
FILE* evfilestruct::file |
pointer to file.
Referenced by evClose().
uint32_t evfilestruct::fileIndexArrayLen |
file header's index array len in bytes.
char* evfilestruct::fileName |
actual name of file to be written to.
Referenced by evGetFileName().
uint64_t evfilestruct::filePosition |
how far into the file have we read, in bytes.
uint64_t evfilestruct::fileSize |
size of file being read from, in bytes.
uint32_t evfilestruct::fileUserHeaderLen |
file header's user header len in bytes.
uint32_t* evfilestruct::firstEventBuf |
buffer containing firstEvent bank.
uint32_t evfilestruct::firstEventLength |
length of first event bank in bytes (including entire header).
uint64_t evfilestruct::firstRecordPosition |
first record's position from start of file in bytes (0 if unknown).
int evfilestruct::handle |
handle used to access this structure.
int evfilestruct::hasAppendDictionary |
int evfilestruct::isLastBlock |
1 if buf contains last block of file/sock/buf, else 0.
int evfilestruct::lastEmptyBlockHeaderExists |
uint32_t evfilestruct::left |
Referenced by evIoctl(), evRead(), and evReadNoCopy().
int evfilestruct::lockingOn |
if = 1 (default), turn on the use of a mutex for thread safety.
Referenced by evClose().
int evfilestruct::magic |
magic number.
size_t evfilestruct::mmapFileSize |
size of mapped file in bytes.
Referenced by evClose().
uint32_t* evfilestruct::next |
pointer to next word in buffer to be read/written.
Referenced by evIoctl(), evRead(), and evReadNoCopy().
uint32_t* evfilestruct::pBuf |
For reading ver 1-3 files, this points to the beginning of actual buffer in memory.
uint32_t** evfilestruct::pTable |
array of pointers to events in memory mapped file or buffer.
Referenced by evGetRandomAccessTable(), and evReadRandom().
int evfilestruct::randomAccess |
if true, use random access file/buffer reading.
Referenced by evClose(), evGetRandomAccessTable(), evRead(), evReadNoCopy(), and evReadRandom().
char* evfilestruct::runType |
run type used in auto naming of split files.
Referenced by evIoctl().
int evfilestruct::rw |
are we reading, writing, piping?
Referenced by evClose(), evFlush(), evGenerateFileName(), evGetFileName(), evIoctl(), evOpenFake(), evRead(), evReadNoCopy(), and evReadRandom().
char* evfilestruct::rwBuf |
pointer to buffer if reading/writing from/to buffer.
uint32_t evfilestruct::rwBufSize |
size of rwBuf buffer in bytes.
uint32_t evfilestruct::rwBytesIn |
number of bytes read from rwBuf so far (i.e.
uint32_t evfilestruct::rwBytesOut |
number of bytes written to rwBuf with evWrite.
Referenced by evGetBufferLength().
int evfilestruct::rwFirstWrite |
1 if this evWrite is the first for this rwBuf, else 0.
Needed for calculating accurate value for rwBytesOut.
int evfilestruct::sockFd |
socket file descriptor if reading/writing from/to socket.
int evfilestruct::specifierCount |
number of C printing int format specifiers in file name (0, 1, 2).
uint64_t evfilestruct::split |
Referenced by evIoctl().
uint32_t evfilestruct::splitNumber |
number of next split file (used in auto naming).
int evfilestruct::splitting |
0 if not splitting file, else 1.
uint64_t evfilestruct::trailerPosition |
trailer's position from start of file in bytes (0 if unknown).
int evfilestruct::version |
evio FORMAT version number.
Referenced by evIoctl(), evRead(), evReadNoCopy(), and evReadRandom().
int evfilestruct::wroteDictionary |
dictionary already written out to a single (split fragment) file?