Hall A ROOT/C++ Analyzer (podd)
evfilestruct Struct Reference

This structure contains information about file opened for either reading or writing.

Public Attributes

FILE * file
int handle
int rw
int magic
int byte_swapped
int version
int append
uint32_t eventCount
uint32_t * buf
uint32_t * pBuf
uint32_t * next
uint32_t left
uint32_t blksiz
uint32_t blknum
int blkNumDiff
uint32_t blkSizeTarget
uint32_t blkEvCount
uint32_t bufSize
uint32_t bufRealSize
uint32_t blkEvMax
int isLastBlock
uint32_t blocksToParse
char * baseFileName
char * fileName
char * runType
int specifierCount
int splitting
int lastEmptyBlockHeaderExists
uint32_t * currentHeader
uint32_t bytesToBuf
uint32_t eventsToBuf
uint32_t eventsToFile
uint64_t bytesToFile
uint32_t streamId
uint32_t runNumber
uint32_t splitNumber
uint64_t split
uint64_t fileSize
uint64_t filePosition
char * rwBuf
uint32_t rwBufSize
uint32_t rwBytesOut
uint32_t rwBytesIn
int rwFirstWrite
int sockFd
int randomAccess
size_t mmapFileSize
uint32_t * mmapFile
uint32_t ** pTable
int hasAppendDictionary
int wroteDictionary
uint32_t dictLength
uint32_t * dictBuf
char * dictionary
uint32_t firstEventLength
uint32_t * firstEventBuf
uint32_t commonBlkCount
int lockingOn

#include <evio.h>

Member Data Documentation

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.

char* evfilestruct::baseFileName

base name of file to be written to.

uint32_t evfilestruct::blkEvCount

number of events written to block so far (including dictionary).

uint32_t evfilestruct::blkEvMax

max number of events per block.

uint32_t evfilestruct::blknum

block number of block being read/written. Next to be used, starting at 1.

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).

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).

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).

int evfilestruct::byte_swapped

bytes do NOT need swapping = 0 else 1

uint32_t evfilestruct::bytesToBuf

bytes written to internal buffer including dict.

uint64_t evfilestruct::bytesToFile

bytes flushed to the current file (including ending

empty block & dictionary), not the total in all split files.

uint32_t evfilestruct::commonBlkCount

Number of events written into common block. This can be 2 at the most, dictionary + first event.

uint32_t* evfilestruct::currentHeader

When writing to file/socket/pipe, this points to current block header of block being written.

uint32_t* evfilestruct::dictBuf

buffer containing dictionary bank.

char* evfilestruct::dictionary

xml format dictionary to either read or write.

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.

uint32_t evfilestruct::eventsToBuf

events written to internal buffer including dictionary.

uint32_t evfilestruct::eventsToFile

of events written to file including dictionary.

If the file is being split, this value refers to the file currently being written to.

FILE* evfilestruct::file

pointer to file.

char* evfilestruct::fileName

actual name of file to be written to.

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.

uint32_t evfilestruct::firstEventLength

length of first event bank in bytes (including entire header).

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.

uint32_t evfilestruct::left

of valid 32 bit unread/unwritten words in block.

int evfilestruct::lockingOn

if = 1 (default), turn on the use of a mutex for thread safety.

int evfilestruct::magic

magic number.

uint32_t* evfilestruct::mmapFile

pointer to memory mapped file.

size_t evfilestruct::mmapFileSize

size of mapped file in bytes.

uint32_t* evfilestruct::next

pointer to next word in block to be read/written.

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.

int evfilestruct::randomAccess

if true, use random access file/buffer reading.

uint32_t evfilestruct::runNumber

run # used in auto naming of split files.

char* evfilestruct::runType

run type used in auto naming of split files.

int evfilestruct::rw

are we reading, writing, piping?

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. # bytes in buffer already used).

uint32_t evfilestruct::rwBytesOut

number of bytes written to rwBuf with evWrite.

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

of bytes at which to split file when writing

(defaults to EV_SPLIT_SIZE, 1GB).

uint32_t evfilestruct::splitNumber

number of next split file (used in auto naming).

int evfilestruct::splitting

0 if not splitting file, else 1.

uint32_t evfilestruct::streamId

stream id # used in auto naming of files.

int evfilestruct::version

evio FORMAT version number.

int evfilestruct::wroteDictionary

dictionary already written out to a single (split fragment) file?

The documentation for this struct was generated from the following file: