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 |
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 |
uint32_t | eventsToBuf |
uint32_t | eventsToFile |
uint64_t | bytesToFile |
uint32_t | streamCount |
total # of streams in DAQ used in auto naming of 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 |
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, true if first header says there is a 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... | |
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 |
uint32_t | bytesToDataBuf |
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 evFileStructInit().
char* evfilestruct::baseFileName |
base name of file to be written to.
Referenced by evFileStructInit(), and evGenerateFileNameOld().
int evfilestruct::bigEndian |
if big endian = 1 else 0
Referenced by evFileStructInit().
uint32_t evfilestruct::blkEvCount |
number of events written to block so far (including dictionary).
Referenced by evFileStructInit().
uint32_t evfilestruct::blkEvMax |
max number of events per block.
Referenced by evFileStructInit().
uint32_t evfilestruct::blknum |
block number of block being read/written.
Next to be used, starting at 1.
Referenced by evFileStructInit().
int evfilestruct::blkNumDiff |
When reading, the difference between blknum read in and the expected (sequential) value.
Used in debug message.
Referenced by evFileStructInit().
uint32_t evfilestruct::blksiz |
size of block in 32 bit words - v3 or size of actual data in block (including header) - v4.
Referenced by evFileStructInit().
uint32_t evfilestruct::blkSizeTarget |
target size of block in 32 bit words (including block header).
Referenced by evFileStructInit().
uint32_t evfilestruct::blocksToParse |
reading file verions 1-3, # of blocks yet to be parsed.
Referenced by evFileStructInit().
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 evFileStructInit().
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 evFileStructInit().
uint32_t evfilestruct::bufSize |
When reading, size of block buffer (buf) in 32 bit words.
When writing file/sock/pipe, size of buffer being written to that is actually being used (must be <= bufRealSize).
Referenced by evFileStructInit().
int evfilestruct::byte_swapped |
bytes need swapping = 1 else 0
Referenced by evFileStructInit().
uint32_t evfilestruct::bytesToBuf |
Referenced by evFileStructInit().
uint32_t evfilestruct::bytesToDataBuf |
Referenced by evFileStructInit().
uint64_t evfilestruct::bytesToFile |
empty block & dictionary), not the total in all split files.
Referenced by evFileStructInit().
uint32_t evfilestruct::commonBlkCount |
Number of events written into common block.
This can be 2 at the most, dictionary + first event.
Referenced by evFileStructInit().
uint32_t evfilestruct::curRecordIndexArrayLen |
current record header's index array len in bytes.
Referenced by evFileStructInit().
uint32_t evfilestruct::curRecordUserHeaderLen |
current record header's user header len in bytes.
Referenced by evFileStructInit().
uint32_t* evfilestruct::currentHeader |
When writing to file/socket/pipe, this points to current block header of block being written.
Referenced by evFileStructInit().
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 evFileStructInit().
uint32_t evfilestruct::dataLeft |
Referenced by evFileStructInit().
uint32_t* evfilestruct::dataNext |
pointer to next word in dataBuf to be written.
Referenced by evFileStructInit().
uint32_t* evfilestruct::dictBuf |
buffer containing dictionary bank.
Referenced by evFileStructInit().
char* evfilestruct::dictionary |
xml format dictionary to either read or write.
Referenced by evFileStructInit().
uint32_t evfilestruct::dictLength |
length of dictionary bank in bytes (including entire header).
Referenced by evFileStructInit().
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 evFileStructInit().
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 evFileStructInit().
uint32_t evfilestruct::eventLengthsLen |
Size of eventLengths array in words, convenience variable when reading.
Referenced by evFileStructInit().
uint32_t evfilestruct::eventsToBuf |
Referenced by evFileStructInit().
uint32_t evfilestruct::eventsToFile |
If the file is being split, this value refers to the file currently being written to.
Referenced by evFileStructInit().
FILE* evfilestruct::file |
pointer to file.
Referenced by evFileStructInit().
uint32_t evfilestruct::fileIndexArrayLen |
file header's index array len in bytes.
Referenced by evFileStructInit().
char* evfilestruct::fileName |
actual name of file to be written to.
Referenced by evFileStructInit().
uint64_t evfilestruct::filePosition |
how far into the file have we read, in bytes.
Referenced by evFileStructInit().
uint64_t evfilestruct::fileSize |
size of file being read from, in bytes.
Referenced by evFileStructInit().
uint32_t evfilestruct::fileUserHeaderLen |
file header's user header len in bytes.
Referenced by evFileStructInit().
uint32_t* evfilestruct::firstEventBuf |
buffer containing firstEvent bank.
Referenced by evFileStructInit().
uint32_t evfilestruct::firstEventLength |
length of first event bank in bytes (including entire header).
Referenced by evFileStructInit().
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.
Referenced by evFileStructInit().
int evfilestruct::hasAppendDictionary |
if appending, true if first header says there is a dictionary.
Referenced by evFileStructInit().
int evfilestruct::isLastBlock |
1 if buf contains last block of file/sock/buf, else 0.
Referenced by evFileStructInit().
int evfilestruct::lastEmptyBlockHeaderExists |
1 if internal buffer has the last empty block header written, else 0.
Referenced by evFileStructInit().
uint32_t evfilestruct::left |
Referenced by evFileStructInit().
int evfilestruct::lockingOn |
if = 1 (default), turn on the use of a mutex for thread safety.
Referenced by evFileStructInit().
int evfilestruct::magic |
magic number.
Referenced by evFileStructInit().
uint32_t* evfilestruct::mmapFile |
pointer to memory mapped file.
Referenced by evFileStructInit().
size_t evfilestruct::mmapFileSize |
size of mapped file in bytes.
Referenced by evFileStructInit().
uint32_t* evfilestruct::next |
pointer to next word in buffer to be read/written.
Referenced by evFileStructInit().
uint32_t* evfilestruct::pBuf |
For reading ver 1-3 files, this points to the beginning of actual buffer in memory.
Referenced by evFileStructInit().
uint32_t** evfilestruct::pTable |
array of pointers to events in memory mapped file or buffer.
Referenced by evFileStructInit().
int evfilestruct::randomAccess |
if true, use random access file/buffer reading.
Referenced by evFileStructInit().
uint32_t evfilestruct::runNumber |
run # used in auto naming of split files.
Referenced by evFileStructInit().
char* evfilestruct::runType |
run type used in auto naming of split files.
Referenced by evFileStructInit().
int evfilestruct::rw |
are we reading, writing, piping?
Referenced by evFileStructInit(), and evGenerateFileNameOld().
char* evfilestruct::rwBuf |
pointer to buffer if reading/writing from/to buffer.
Referenced by evFileStructInit().
uint32_t evfilestruct::rwBufSize |
size of rwBuf buffer in bytes.
Referenced by evFileStructInit().
uint32_t evfilestruct::rwBytesIn |
number of bytes read from rwBuf so far (i.e.
# bytes in buffer already used).
Referenced by evFileStructInit().
uint32_t evfilestruct::rwBytesOut |
number of bytes written to rwBuf with evWrite.
Referenced by evFileStructInit().
int evfilestruct::rwFirstWrite |
1 if this evWrite is the first for this rwBuf, else 0.
Needed for calculating accurate value for rwBytesOut.
Referenced by evFileStructInit().
int evfilestruct::sockFd |
socket file descriptor if reading/writing from/to socket.
Referenced by evFileStructInit().
int evfilestruct::specifierCount |
number of C printing int format specifiers in file name (0, 1, 2).
Referenced by evFileStructInit().
uint64_t evfilestruct::split |
(defaults to EV_SPLIT_SIZE, 1GB).
Referenced by evFileStructInit().
uint32_t evfilestruct::splitNumber |
number of next split file (used in auto naming).
Referenced by evFileStructInit().
int evfilestruct::splitting |
0 if not splitting file, else 1.
Referenced by evFileStructInit().
uint32_t evfilestruct::streamCount |
total # of streams in DAQ used in auto naming of files.
Referenced by evFileStructInit().
uint32_t evfilestruct::streamId |
stream id # used in auto naming of files.
Referenced by evFileStructInit().
uint64_t evfilestruct::trailerPosition |
trailer's position from start of file in bytes (0 if unknown).
Referenced by evFileStructInit().
int evfilestruct::version |
evio FORMAT version number.
Referenced by evFileStructInit().
int evfilestruct::wroteDictionary |
dictionary already written out to a single (split fragment) file?
Referenced by evFileStructInit().