evio
5.2
|
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 | byte_swapped |
bytes do NOT need swapping = 0 else 1 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 block to be read/written. More... | |
uint32_t | left |
of valid 32 bit unread/unwritten words in block.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 |
if appending, does existing file/buffer have dictionary? More... | |
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... | |
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(), and evWriteDictionary().
char* evfilestruct::baseFileName |
base name of file to be written to.
Referenced by evClose(), evGenerateFileName(), and evOpenFake().
uint32_t evfilestruct::blkEvCount |
number of events written to block so far (including dictionary).
Referenced by evIoctl().
uint32_t evfilestruct::blknum |
block number of block being read/written.
Next to be used, starting at 1.
Referenced by evClose(), evIoctl(), and evWriteDictionary().
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.
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 do NOT need swapping = 0 else 1
Referenced by evRead(), evReadNoCopy(), and evReadRandom().
uint32_t evfilestruct::bytesToBuf |
Referenced by evClose().
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.
Referenced by evWriteFirstEvent().
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::dictBuf |
buffer containing dictionary bank.
Referenced by evClose(), and evWriteDictionary().
char* evfilestruct::dictionary |
xml format dictionary to either read or write.
Referenced by evClose(), evGetDictionary(), evWriteDictionary(), and evWriteFirstEvent().
uint32_t evfilestruct::dictLength |
length of dictionary bank in bytes (including entire header).
Referenced by evWriteDictionary().
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(), evReadRandom(), and evWriteDictionary().
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().
char* evfilestruct::fileName |
actual name of file to be written to.
Referenced by evClose(), and 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::firstEventBuf |
buffer containing firstEvent bank.
Referenced by evWriteFirstEvent().
uint32_t evfilestruct::firstEventLength |
length of first event bank in bytes (including entire header).
Referenced by evWriteFirstEvent().
int evfilestruct::handle |
handle used to access this structure.
int evfilestruct::hasAppendDictionary |
if appending, does existing file/buffer have dictionary?
int evfilestruct::isLastBlock |
1 if buf contains last block of file/sock/buf, else 0.
int evfilestruct::lastEmptyBlockHeaderExists |
1 if internal buffer has the last empty block header written, else 0.
Referenced by evFlush().
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 block 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.
Referenced by evClose().
uint32_t** evfilestruct::pTable |
array of pointers to events in memory mapped file or buffer.
Referenced by evClose(), 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 |
int evfilestruct::rw |
are we reading, writing, piping?
Referenced by evClose(), evFlush(), evGenerateFileName(), evGetFileName(), evIoctl(), evOpenFake(), evRead(), evReadNoCopy(), evReadRandom(), evWriteDictionary(), and evWriteFirstEvent().
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.
int evfilestruct::version |
evio FORMAT version number.
Referenced by evRead(), evReadNoCopy(), and evReadRandom().
int evfilestruct::wroteDictionary |
dictionary already written out to a single (split fragment) file?
Referenced by evWriteDictionary().