evfilestruct Struct Reference

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

#include <evio.h>

Data Fields

FILE * file
 pointer to file.
int handle
 handle used to access this structure.
int rw
 are we reading, writing, piping?
int magic
 magic number.
int byte_swapped
 bytes do NOT need swapping = 0 else 1
int version
 evio version number.
int append
 open buffer or file for writing in append mode = 1, else 0.
uint32_t eventCount
 current number of events in (or written to) file/buffer NOT including dictionary(ies).
uint32_tbuf
 For files, sockets, and reading buffers = pointer to buffer of block-being-read / blocks-being-written.
uint32_tnext
 pointer to next word in block to be read/written.
uint32_t left
 # of valid 32 bit unread/unwritten words in block.
uint32_t blksiz
 size of block in 32 bit words - v3 or size of actual data in block (including header) - v4.
uint32_t blknum
 block number of block being read/written (block s start at 1).
int blkNumDiff
 When reading, the difference between blknum read in and the expected (sequential) value.
uint32_t blkSizeTarget
 target size of block in 32 bit words (including block header).
uint32_t blkEvCount
 number of events written to block so far.
uint32_t bufSize
 When reading, size of block buffer (buf) in 32 bit words.
uint32_t bufRealSize
 When writing file/sock/pipe, total size of buffer being written to.
uint32_t blkEvMax
 max number of events per block.
int isLastBlock
 1 if buf contains last block of file/sock/buf, else 0.
char * baseFileName
 base name of file to be written to.
char * fileName
 actual name of file to be written to.
char * runType
 run type used in auto naming of split files.
int specifierCount
 number of C printing int format specifiers in file name (0, 1, 2).
int splitting
 0 if not splitting file, else 1.
uint32_tcurrentHeader
 When writing to file/socket/pipe, this points to current block header of block being written.
uint32_t bytesToBuf
 # bytes written to internal buffer including ending empty block & dict.
uint32_t eventsToBuf
 # events written to internal buffer including dictionary.
uint32_t eventsToFile
 # of events written to file including dictionary.
uint64_t bytesToFile
 # bytes flushed to the current file (including ending empty block & dictionary), not the total in all split files.
uint32_t runNumber
 run # used in auto naming of split files.
uint32_t splitNumber
 number of next split file (used in auto naming).
uint64_t split
 # of bytes at which to split file when writing (defaults to EV_SPLIT_SIZE, 1GB).
uint64_t fileSize
 size of file being written to, in bytes.
char * rwBuf
 pointer to buffer if reading/writing from/to buffer.
uint32_t rwBufSize
 size of rwBuf buffer in bytes.
uint32_t rwBytesOut
 number of bytes written to rwBuf with evWrite.
uint32_t rwBytesIn
 number of bytes read from rwBuf so far (i.e.
int rwFirstWrite
 1 if this evWrite is the first for this rwBuf, else 0.
int sockFd
 socket file descriptor if reading/writing from/to socket.
int randomAccess
 if true, use random access file/buffer reading.
size_t mmapFileSize
 size of mapped file in bytes.
uint32_tmmapFile
 pointer to memory mapped file.
uint32_t ** pTable
 array of pointers to events in memory mapped file or buffer.
int wroteDictionary
 dictionary already written out to a single (split fragment) file?
uint32_t dictLength
 length of dictionary bank in bytes.
uint32_tdictBuf
 buffer containing dictionary bank.
char * dictionary
 xml format dictionary to either read or write.
pthread_mutex_t lock
 lock for multithreaded reads & writes.

Detailed Description

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


Field Documentation

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

base name of file to be written to.

Referenced by evClose(), evGenerateFileName(), and evOpenFake().

number of events written to block so far.

Referenced by evIoctl().

max number of events per block.

Referenced by evIoctl().

block number of block being read/written (block s start at 1).

Referenced by evIoctl(), and evWriteDictionary().

When reading, the difference between blknum read in and the expected (sequential) value.

Used in debug message.

size of block in 32 bit words - v3 or size of actual data in block (including header) - v4.

target size of block in 32 bit words (including block header).

Referenced by evIoctl().

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

Referenced by evClose(), and evIoctl().

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

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

bytes do NOT need swapping = 0 else 1

Referenced by evRead(), evReadNoCopy(), and evReadRandom().

# bytes written to internal buffer including ending empty block & dict.

# bytes flushed to the current file (including ending empty block & dictionary), not the total in all split files.

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

Referenced by evIoctl().

buffer containing dictionary bank.

Referenced by evClose(), and evWriteDictionary().

xml format dictionary to either read or write.

Referenced by evClose(), evGetDictionary(), and evWriteDictionary().

length of dictionary bank in bytes.

Referenced by evWriteDictionary().

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

# events written to internal buffer including dictionary.

# of events written to file including dictionary.

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

pointer to file.

Referenced by evClose().

actual name of file to be written to.

Referenced by evClose().

size of file being written to, in bytes.

handle used to access this structure.

1 if buf contains last block of file/sock/buf, else 0.

# of valid 32 bit unread/unwritten words in block.

Referenced by evIoctl(), evRead(), and evReadNoCopy().

pthread_mutex_t evfilestruct::lock

lock for multithreaded reads & writes.

magic number.

pointer to memory mapped file.

Referenced by evClose().

size of mapped file in bytes.

Referenced by evClose().

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

Referenced by evIoctl(), evRead(), and evReadNoCopy().

array of pointers to events in memory mapped file or buffer.

Referenced by evClose(), evGetRandomAccessTable(), and evReadRandom().

if true, use random access file/buffer reading.

Referenced by evClose(), evGetRandomAccessTable(), evRead(), evReadNoCopy(), and evReadRandom().

run # used in auto naming of split files.

Referenced by evIoctl().

run type used in auto naming of split files.

Referenced by evClose(), and evIoctl().

pointer to buffer if reading/writing from/to buffer.

size of rwBuf buffer in bytes.

number of bytes read from rwBuf so far (i.e.

# bytes in buffer already used).

number of bytes written to rwBuf with evWrite.

Referenced by evGetBufferLength().

1 if this evWrite is the first for this rwBuf, else 0.

Needed for calculating accurate value for rwBytesOut.

socket file descriptor if reading/writing from/to socket.

Referenced by evClose().

number of C printing int format specifiers in file name (0, 1, 2).

# of bytes at which to split file when writing (defaults to EV_SPLIT_SIZE, 1GB).

Referenced by evIoctl().

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

0 if not splitting file, else 1.

evio version number.

Referenced by evReadNoCopy(), and evReadRandom().

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

Referenced by evWriteDictionary().


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

Generated on 4 Feb 2014 for evio by  doxygen 1.6.1