evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::FileHeader Class Reference

#include <FileHeader.h>

Public Member Functions

 FileHeader ()
 Default, no-arg constructor. More...
 
 FileHeader (const FileHeader &header)
 Copy constructor. More...
 
 FileHeader (bool isEvio)
 Constructor which sets the type of header this is and file id. More...
 
 ~FileHeader ()=default
 
void copy (const FileHeader &head)
 Copy the contents of the arg into this object. More...
 
void reset ()
 Reset most internal variables (not file id & header type). More...
 
const ByteOrdergetByteOrder () const
 Get the byte order of the file this header was read from. More...
 
const HeaderTypegetHeaderType () const
 Get the type of header this is. More...
 
uint32_t getFileNumber () const
 Get the file number or split number. More...
 
uint32_t getFileId () const
 Get the file id. More...
 
uint32_t getVersion () const
 Get the Evio format version number. More...
 
uint32_t getEntries () const
 Get the number of events or entries in index. More...
 
uint32_t getLength () const
 Get the total length of header + index + user header (including padding) in bytes. More...
 
uint32_t getIndexLength () const
 Get the length of the index array in bytes. More...
 
uint32_t getHeaderLength () const
 Get the length of this header data in bytes. More...
 
uint32_t getUserHeaderLength () const
 Get the length of the user-defined header in bytes. More...
 
uint32_t getUserHeaderLengthWords () const
 Get the length of the user-defined header in words. More...
 
uint32_t getUserHeaderLengthPadding () const
 Get the user header's padding - the number of bytes required to bring uncompressed user header to 4-byte boundary. More...
 
uint32_t getUserIntFirst () const
 Get the first user integer value. More...
 
uint32_t getUserIntSecond () const
 Get the second user integer value. More...
 
uint64_t getUserRegister () const
 Get the user register value. More...
 
size_t getPosition () const
 Get the position of this record in a file. More...
 
size_t getTrailerPosition () const
 Get the trailer's (trailing header's) file position in bytes. More...
 
uint32_t getBitInfoWord () const
 Get the bit info word. More...
 
void setBitInfoWord (uint32_t word)
 Set the bit info word and related values. More...
 
uint32_t setBitInfo (bool haveFirst, bool haveDictionary, bool haveTrailerWithIndex)
 Set the bit info word for a file header. More...
 
uint32_t hasFirstEvent (bool hasFirst)
 Set the bit which says file has a first event. More...
 
bool hasFirstEvent () const
 Does this header have a first event in the file header? More...
 
uint32_t hasDictionary (bool hasDictionary)
 Set the bit in the file header which says there is a dictionary. More...
 
bool hasDictionary () const
 Does this header have a dictionary in the file header? More...
 
uint32_t hasTrailerWithIndex (bool hasTrailerWithIndex)
 Set the bit in the file header which says there is a trailer with a record length index. More...
 
bool hasTrailerWithIndex () const
 Does this file have a trailer with a record length index? More...
 
bool hasUserHeader () const
 Is this header followed by a user header? More...
 
bool hasIndex () const
 Does this file have a valid index of record lengths immediately following header? There should be at least one integer for valid index. More...
 
FileHeadersetFileNumber (uint32_t num)
 Set the file number which is the split number starting at 1. More...
 
FileHeadersetUserRegister (uint64_t val)
 Set the first user register. More...
 
FileHeadersetUserIntFirst (uint32_t val)
 Set the first user integer. More...
 
FileHeadersetUserIntSecond (uint32_t val)
 Set the second user integer. More...
 
FileHeadersetHeaderType (HeaderType &type)
 Set this header's type. More...
 
FileHeadersetPosition (size_t pos)
 Set the position of this record in a file. More...
 
FileHeadersetIndexLength (uint32_t length)
 Set the length of the index array in bytes. More...
 
FileHeadersetEntries (uint32_t n)
 Set the number of record entries. More...
 
FileHeadersetUserHeaderLength (uint32_t length)
 Set the user-defined header's length in bytes & words and the padding. More...
 
FileHeadersetHeaderLength (uint32_t length)
 Set the this header's length in bytes & words. More...
 
FileHeadersetLength (uint32_t length)
 Set the total length in bytes, header + index + user header. More...
 
void writeHeader (ByteBuffer &buf, size_t off)
 Writes the file (not record!) header into the given byte buffer. More...
 
void writeHeader (std::shared_ptr< ByteBuffer > &buf, size_t off=0)
 Writes the file (not record!) header into the given byte buffer. More...
 
void readHeader (ByteBuffer &buffer, size_t offset=0)
 Reads the file header information from a byte buffer and validates it by checking the magic word (8th word). More...
 
void readHeader (std::shared_ptr< ByteBuffer > &buffer, size_t offset=0)
 Reads the file header information from a byte buffer and validates it by checking the magic word (8th word). More...
 
std::string toString () const
 Returns a string representation of the record. More...
 

Static Public Member Functions

static uint32_t generateBitInfoWord (uint32_t version, bool hasDictionary, bool hasFirst, bool trailerWithIndex, uint32_t headerType=1)
 Calculates the bit info (6th) word of this header which has the version number in the lowest 8 bits (0-7). More...
 
static bool hasFirstEvent (uint32_t bitInfo)
 Does this bitInfo arg indicate the existence of a first event in the file header? Static. More...
 
static bool hasDictionary (uint32_t bitInfo)
 Does this bitInfo arg indicate the existence of a dictionary in the file header? More...
 
static bool hasTrailerWithIndex (uint32_t bitInfo)
 Does this bitInfo arg indicate the existence of a trailer with a record length index? More...
 

Static Public Attributes

static const uint32_t HIPO_FILE_UNIQUE_WORD = 0x4F504948
 First word in every HIPO file for identification purposes. More...
 
static const uint32_t EVIO_FILE_UNIQUE_WORD = 0x4556494F
 First word in every Evio file for identification purposes. More...
 
static const uint32_t HEADER_SIZE_WORDS = 14
 Number of 32-bit words in a normal sized header. More...
 
static const uint32_t HEADER_SIZE_BYTES = 56
 Number of bytes in a normal sized header. More...
 
static const uint32_t HEADER_MAGIC = 0xc0da0100
 Magic number used to track endianness. More...
 
static const uint32_t FILE_ID_OFFSET = 0
 Byte offset from beginning of header to the file id. More...
 
static const uint32_t FILE_NUMBER_OFFSET = 4
 Byte offset from beginning of header to the file number. More...
 
static const uint32_t HEADER_LENGTH_OFFSET = 8
 Byte offset from beginning of header to the header length. More...
 
static const uint32_t RECORD_COUNT_OFFSET = 12
 Byte offset from beginning of header to the record count. More...
 
static const uint32_t INDEX_ARRAY_OFFSET = 16
 Byte offset from beginning of header to the index array length. More...
 
static const uint32_t BIT_INFO_OFFSET = 20
 Byte offset from beginning of header to bit info word. More...
 
static const uint32_t USER_LENGTH_OFFSET = 24
 Byte offset from beginning of header to the user header length. More...
 
static const uint32_t MAGIC_OFFSET = 28
 Byte offset from beginning of header to the record length. More...
 
static const uint32_t REGISTER1_OFFSET = 32
 Byte offset from beginning of header to the user register #1. More...
 
static const uint32_t TRAILER_POSITION_OFFSET = 40
 Byte offset from beginning of header to write trailer position. More...
 
static const uint32_t INT1_OFFSET = 48
 Byte offset from beginning of header to the user integer #1. More...
 
static const uint32_t INT2_OFFSET = 52
 Byte offset from beginning of header to the user integer #2. More...
 
static const uint32_t DICTIONARY_BIT = 0x100
 8th bit set in bitInfo word in record/file header means contains dictionary. More...
 
static const uint32_t FIRST_EVENT_BIT = 0x200
 9th bit set in bitInfo word in file header means every split file has same first event. More...
 
static const uint32_t TRAILER_WITH_INDEX_BIT = 0x400
 10th bit set in bitInfo word in file header means file trailer with index array exists. More...
 

Detailed Description

FILE HEADER STRUCTURE ( 56 bytes, 14 integers (32 bit) )
   +----------------------------------+
 1 |              ID                  | // HIPO: 0x43455248, Evio: 0x4556494F
   +----------------------------------+
 2 +          File Number             | // split file #
   +----------------------------------+
 3 +         Header Length            | // 14 (words)
   +----------------------------------+
 4 +      Record (Index) Count        |
   +----------------------------------+
 5 +      Index Array Length          | // bytes
   +-----------------------+----------+
 6 +       Bit Info        | Version  | // version (8 bits)
   +-----------------------+----------+
 7 +      User Header Length          | // bytes
   +----------------------------------+
 8 +          Magic Number            | // 0xc0da0100
   +----------------------------------+
 9 +          User Register           |
   +--                              --+
10 +                                  |
   +----------------------------------+
11 +         Trailer Position         | // File offset to trailer head (64 bits).
   +--                              --+ // 0 = no offset available or no trailer exists.
12 +                                  |
   +----------------------------------+
13 +          User Integer 1          |
   +----------------------------------+
14 +          User Integer 2          |
   +----------------------------------+
-------------------
  Bit Info Word
-------------------
    0-7  = version
    8    = true if dictionary is included (relevant for first record only)
    9    = true if this file has "first" event (in every split file)
   10    = File trailer with index array of record lengths exists
   11-19 = reserved
   20-21 = pad 1
   22-23 = pad 2
   24-25 = pad 3 (always 0)
   26-27 = reserved
   28-31 = general header type: 1 = Evio file
                                2 = Evio extended file
                                5 = HIPO file
                                6 = HIPO extended file
Version
6.0
Since
6.0 10/16/19
Author
timmer

Constructor & Destructor Documentation

evio::FileHeader::FileHeader ( )

Default, no-arg constructor.

evio::FileHeader::FileHeader ( const FileHeader header)

Copy constructor.

Parameters
headerfile header to copy.

References copy().

evio::FileHeader::FileHeader ( bool  isEvio)
explicit

Constructor which sets the type of header this is and file id.

Parameters
isEvioif true, file has EVIO file id and header type, else is HIPO.

References evio::HeaderType::EVIO_FILE, EVIO_FILE_UNIQUE_WORD, evio::HeaderType::HIPO_FILE, and HIPO_FILE_UNIQUE_WORD.

evio::FileHeader::~FileHeader ( )
default

Member Function Documentation

void evio::FileHeader::copy ( const FileHeader head)

Copy the contents of the arg into this object.

Parameters
headobject to copy

Referenced by FileHeader().

uint32_t evio::FileHeader::generateBitInfoWord ( uint32_t  version,
bool  hasDictionary,
bool  hasFirst,
bool  trailerWithIndex,
uint32_t  headerType = 1 
)
static

Calculates the bit info (6th) word of this header which has the version number in the lowest 8 bits (0-7).

The arg hasDictionary is set in the 8th bit, hasFirst is set in the 9th bit, and trailerWithIndex is set in the 10th bit. Four bits of this header type are set in bits 28-31 (defaults to 1 which is an evio file header).

Parameters
versionevio version number
hasDictionarydoes this file include an evio xml dictionary?
hasFirstdoes this file include a first event in every file split?
trailerWithIndexdoes this file have a trailer with an event index?
headerType4 bit type of this header (defaults to 1 which is an evio file header).
Returns
generated bit-info (6th) word of a file header.

Referenced by evio::CompactEventBuilder::toFile().

uint32_t evio::FileHeader::getBitInfoWord ( ) const

Get the bit info word.

Returns
bit info word.

Referenced by writeHeader().

const ByteOrder & evio::FileHeader::getByteOrder ( ) const

Get the byte order of the file this header was read from.

Defaults to little endian.

Returns
byte order of the file this header was read from.

Referenced by evio::EventWriter::examineFileHeader(), evio::Reader::extractDictionaryFromFile(), evio::Reader::forceScanFile(), evio::Reader::readUserHeader(), and evio::Reader::scanFile().

uint32_t evio::FileHeader::getEntries ( ) const

Get the number of events or entries in index.

Returns
number of events or entries in index.
uint32_t evio::FileHeader::getFileId ( ) const

Get the file id.

Returns
file id.
uint32_t evio::FileHeader::getFileNumber ( ) const

Get the file number or split number.

Returns
file number.
uint32_t evio::FileHeader::getHeaderLength ( ) const

Get the length of this header data in bytes.

Returns
length of this header data in bytes.

Referenced by evio::Reader::extractDictionaryFromFile(), evio::Reader::forceScanFile(), evio::Reader::readUserHeader(), and evio::Reader::scanFile().

const HeaderType & evio::FileHeader::getHeaderType ( ) const

Get the type of header this is.

Returns
type of header this is.
uint32_t evio::FileHeader::getIndexLength ( ) const

Get the length of the index array in bytes.

Returns
length of the index array in bytes.

Referenced by evio::EventWriter::examineFileHeader(), evio::Reader::extractDictionaryFromFile(), evio::Reader::forceScanFile(), evio::Reader::readUserHeader(), and evio::Reader::scanFile().

uint32_t evio::FileHeader::getLength ( ) const

Get the total length of header + index + user header (including padding) in bytes.

Never compressed.

Returns
total length of header + index + user header (including padding) in bytes.

Referenced by evio::Writer::createHeader(), evio::WriterMT::createHeader(), evio::Writer::open(), evio::WriterMT::open(), and evio::Reader::scanFile().

size_t evio::FileHeader::getPosition ( ) const

Get the position of this record in a file.

Returns
position of this record in a file.
size_t evio::FileHeader::getTrailerPosition ( ) const

Get the trailer's (trailing header's) file position in bytes.

Returns
trailer's (trailing header's) file position in bytes.

Referenced by evio::Reader::scanFile().

uint32_t evio::FileHeader::getUserHeaderLength ( ) const

Get the length of the user-defined header in bytes.

Returns
length of the user-defined header in bytes.

Referenced by evio::EventWriter::examineFileHeader(), evio::Reader::extractDictionaryFromFile(), evio::Reader::forceScanFile(), and evio::Reader::readUserHeader().

uint32_t evio::FileHeader::getUserHeaderLengthPadding ( ) const

Get the user header's padding - the number of bytes required to bring uncompressed user header to 4-byte boundary.

Returns
user header's padding

Referenced by evio::EventWriter::examineFileHeader(), and evio::Reader::forceScanFile().

uint32_t evio::FileHeader::getUserHeaderLengthWords ( ) const

Get the length of the user-defined header in words.

Returns
length of the user-defined header in words.
uint32_t evio::FileHeader::getUserIntFirst ( ) const

Get the first user integer value.

Returns
first user integer value.
uint32_t evio::FileHeader::getUserIntSecond ( ) const

Get the second user integer value.

Returns
second user integer value.
uint64_t evio::FileHeader::getUserRegister ( ) const

Get the user register value.

Returns
user register value.
uint32_t evio::FileHeader::getVersion ( ) const

Get the Evio format version number.

Returns
Evio format version number.

Referenced by evio::Reader::forceScanFile(), and evio::Reader::scanFile().

uint32_t evio::FileHeader::hasDictionary ( bool  hasDictionary)

Set the bit in the file header which says there is a dictionary.

Parameters
hasDictionarytrue if file has a dictionary.
Returns
new bitInfo word.

References DICTIONARY_BIT.

Referenced by evio::Writer::createRecord(), evio::EventWriter::examineFileHeader(), evio::Reader::extractDictionaryFromFile(), and evio::Reader::hasDictionary().

bool evio::FileHeader::hasDictionary ( ) const

Does this header have a dictionary in the file header?

Returns
true if header has a dictionary in the file header, else false.

References DICTIONARY_BIT.

Referenced by toString().

bool evio::FileHeader::hasDictionary ( uint32_t  bitInfo)
static

Does this bitInfo arg indicate the existence of a dictionary in the file header?

Parameters
bitInfobitInfo word.
Returns
true if header has a dictionary in the file header, else false.

References DICTIONARY_BIT.

uint32_t evio::FileHeader::hasFirstEvent ( bool  hasFirst)

Set the bit which says file has a first event.

Parameters
hasFirsttrue if file has a first event.
Returns
new bitInfo word.

References FIRST_EVENT_BIT.

Referenced by evio::Writer::createRecord(), evio::Reader::extractDictionaryFromFile(), and evio::Reader::hasFirstEvent().

bool evio::FileHeader::hasFirstEvent ( ) const

Does this header have a first event in the file header?

Returns
true if header has a first event in the file header, else false.

References FIRST_EVENT_BIT.

Referenced by toString().

bool evio::FileHeader::hasFirstEvent ( uint32_t  bitInfo)
static

Does this bitInfo arg indicate the existence of a first event in the file header? Static.

Parameters
bitInfobitInfo word.
Returns
true if header has a first event in the file header, else false.

References FIRST_EVENT_BIT.

bool evio::FileHeader::hasIndex ( ) const

Does this file have a valid index of record lengths immediately following header? There should be at least one integer for valid index.

Must have integral number of entries.

Returns
true if file has a valid index, else false.

Referenced by evio::Reader::scanFile().

uint32_t evio::FileHeader::hasTrailerWithIndex ( bool  hasTrailerWithIndex)

Set the bit in the file header which says there is a trailer with a record length index.

Parameters
hasTrailerWithIndextrue if file has a trailer with a record length index.
Returns
new bitInfo word.

References TRAILER_WITH_INDEX_BIT.

Referenced by evio::Writer::close(), evio::EventWriter::examineFileHeader(), and evio::Reader::scanFile().

bool evio::FileHeader::hasTrailerWithIndex ( ) const

Does this file have a trailer with a record length index?

Returns
true if file has a trailer with a record length index, else false.

References TRAILER_WITH_INDEX_BIT.

Referenced by toString().

bool evio::FileHeader::hasTrailerWithIndex ( uint32_t  bitInfo)
static

Does this bitInfo arg indicate the existence of a trailer with a record length index?

Parameters
bitInfobitInfo word.
Returns
true if file has a trailer with a record length index, else false.

References TRAILER_WITH_INDEX_BIT.

bool evio::FileHeader::hasUserHeader ( ) const

Is this header followed by a user header?

Returns
true if header followed by a user header, else false.
void evio::FileHeader::readHeader ( ByteBuffer buffer,
size_t  offset = 0 
)

Reads the file header information from a byte buffer and validates it by checking the magic word (8th word).

This magic word also determines the byte order. The given buffer's position does NOT change.

Parameters
bufferbuffer to read from.
offsetposition of first word to be read.
Exceptions
EvioExceptionif remaining buffer space (limit - off) is too small, data is not in proper format, or version earlier than 6.

References BIT_INFO_OFFSET, evio::ByteOrder::ENDIAN_BIG, evio::ByteOrder::ENDIAN_LITTLE, FILE_ID_OFFSET, FILE_NUMBER_OFFSET, evio::ByteBuffer::getInt(), evio::ByteBuffer::getLong(), HEADER_LENGTH_OFFSET, HEADER_MAGIC, HEADER_SIZE_BYTES, INDEX_ARRAY_OFFSET, INT1_OFFSET, INT2_OFFSET, evio::ByteBuffer::limit(), MAGIC_OFFSET, evio::ByteBuffer::order(), evio::ByteBuffer::printBytes(), RECORD_COUNT_OFFSET, REGISTER1_OFFSET, setHeaderLength(), setIndexLength(), setUserHeaderLength(), SWAP_32, TRAILER_POSITION_OFFSET, and USER_LENGTH_OFFSET.

Referenced by evio::EventWriter::examineFileHeader(), evio::Reader::forceScanFile(), readHeader(), and evio::Reader::scanFile().

void evio::FileHeader::readHeader ( std::shared_ptr< ByteBuffer > &  buffer,
size_t  offset = 0 
)

Reads the file header information from a byte buffer and validates it by checking the magic word (8th word).

This magic word also determines the byte order. The given buffer's position does NOT change.

Parameters
bufferbuffer to read from.
offsetposition of first word to be read.
Exceptions
EvioExceptionif remaining buffer space (limit - off) is too small, data is not in proper format, or version earlier than 6.

References readHeader().

void evio::FileHeader::reset ( )

Reset most internal variables (not file id & header type).

References HEADER_MAGIC, HEADER_SIZE_BYTES, and HEADER_SIZE_WORDS.

Referenced by evio::Writer::createHeader(), evio::WriterMT::createHeader(), evio::Writer::reset(), and evio::WriterMT::reset().

uint32_t evio::FileHeader::setBitInfo ( bool  haveFirst,
bool  haveDictionary,
bool  haveTrailerWithIndex 
)

Set the bit info word for a file header.

Retains current header type, user header length padding, and version.

Parameters
haveFirsttrue if file has first event.
haveDictionarytrue if file has dictionary in user header.
haveTrailerWithIndextrue if file has trailer with record length index.
Returns
new bit info word.

References DICTIONARY_BIT, FIRST_EVENT_BIT, evio::HeaderType::getValue(), and TRAILER_WITH_INDEX_BIT.

Referenced by evio::Writer::createHeader(), and evio::WriterMT::createHeader().

void evio::FileHeader::setBitInfoWord ( uint32_t  word)

Set the bit info word and related values.

Parameters
wordbit info word.
FileHeader & evio::FileHeader::setEntries ( uint32_t  n)

Set the number of record entries.

No compression for other values.

Parameters
nnumber of record entries.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setFileNumber ( uint32_t  num)

Set the file number which is the split number starting at 1.

Parameters
numfile number starting at 1.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setHeaderLength ( uint32_t  length)

Set the this header's length in bytes & words.

Minimum length of 56 (14 words) is enforced. If length is not a multiple of 4, you're on your own! Sets the total length too.

Parameters
lengththis header's length in bytes.
Returns
a reference to this object.

References setLength().

Referenced by readHeader().

FileHeader & evio::FileHeader::setHeaderType ( HeaderType type)

Set this header's type.

Normally done in constructor. Limited access.

Parameters
typetype of header.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setIndexLength ( uint32_t  length)

Set the length of the index array in bytes.

Length is forced to be a multiple of 4! Sets the total length too.

Parameters
lengthlength of index array in bytes.
Returns
a reference to this object.

References setLength().

Referenced by readHeader().

FileHeader & evio::FileHeader::setLength ( uint32_t  length)

Set the total length in bytes, header + index + user header.

This includes padding and is on a 4-byte boundary. Never compressed.

Parameters
lengthtotal length in bytes, header + index + user header.
Returns
a reference to this object.

Referenced by setHeaderLength(), setIndexLength(), and setUserHeaderLength().

FileHeader & evio::FileHeader::setPosition ( size_t  pos)

Set the position of this record in a file.

Parameters
posposition of this record in a file.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setUserHeaderLength ( uint32_t  length)

Set the user-defined header's length in bytes & words and the padding.

Sets the total length too.

Parameters
lengthuser-defined header's length in bytes.
Returns
a reference to this object.

References evio::Util::getPadding(), evio::Util::getWords(), and setLength().

Referenced by evio::Writer::createHeader(), evio::WriterMT::createHeader(), and readHeader().

FileHeader & evio::FileHeader::setUserIntFirst ( uint32_t  val)

Set the first user integer.

Parameters
valfirst user integer.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setUserIntSecond ( uint32_t  val)

Set the second user integer.

Parameters
valsecond user integer.
Returns
a reference to this object.
FileHeader & evio::FileHeader::setUserRegister ( uint64_t  val)

Set the first user register.

Parameters
valfirst user register.
Returns
a reference to this object.
std::string evio::FileHeader::toString ( ) const

Returns a string representation of the record.

Returns
a string representation of the record.

References EVIO_FILE_UNIQUE_WORD, hasDictionary(), hasFirstEvent(), and hasTrailerWithIndex().

void evio::FileHeader::writeHeader ( ByteBuffer buf,
size_t  off 
)

Writes the file (not record!) header into the given byte buffer.

Parameters
bufbyte buffer to write file header into.
offposition in buffer to begin writing.
Exceptions
EvioExceptionif remaining buffer space (limit - off) is too small.

References getBitInfoWord(), HEADER_SIZE_BYTES, evio::ByteBuffer::limit(), evio::ByteBuffer::putInt(), and evio::ByteBuffer::putLong().

Referenced by evio::Writer::createHeader(), evio::WriterMT::createHeader(), and writeHeader().

void evio::FileHeader::writeHeader ( std::shared_ptr< ByteBuffer > &  buf,
size_t  off = 0 
)

Writes the file (not record!) header into the given byte buffer.

Parameters
bufbyte buffer to write file header into.
offposition in buffer to begin writing.
Exceptions
EvioExceptionif remaining buffer space (limit - off) is too small.

References writeHeader().

Member Data Documentation

const uint32_t evio::FileHeader::BIT_INFO_OFFSET = 20
static

Byte offset from beginning of header to bit info word.

Referenced by readHeader().

const uint32_t evio::FileHeader::DICTIONARY_BIT = 0x100
static

8th bit set in bitInfo word in record/file header means contains dictionary.

Referenced by hasDictionary(), and setBitInfo().

const uint32_t evio::FileHeader::EVIO_FILE_UNIQUE_WORD = 0x4556494F
static

First word in every Evio file for identification purposes.

Referenced by FileHeader(), evio::CompactEventBuilder::toFile(), and toString().

const uint32_t evio::FileHeader::FILE_ID_OFFSET = 0
static

Byte offset from beginning of header to the file id.

Referenced by readHeader().

const uint32_t evio::FileHeader::FILE_NUMBER_OFFSET = 4
static

Byte offset from beginning of header to the file number.

Referenced by readHeader().

const uint32_t evio::FileHeader::FIRST_EVENT_BIT = 0x200
static

9th bit set in bitInfo word in file header means every split file has same first event.

Referenced by hasFirstEvent(), and setBitInfo().

const uint32_t evio::FileHeader::HEADER_LENGTH_OFFSET = 8
static

Byte offset from beginning of header to the header length.

Referenced by readHeader().

const uint32_t evio::FileHeader::HEADER_MAGIC = 0xc0da0100
static

Magic number used to track endianness.

Referenced by readHeader(), reset(), and evio::CompactEventBuilder::toFile().

const uint32_t evio::FileHeader::HEADER_SIZE_BYTES = 56
static
const uint32_t evio::FileHeader::HEADER_SIZE_WORDS = 14
static

Number of 32-bit words in a normal sized header.

Referenced by reset(), and evio::CompactEventBuilder::toFile().

const uint32_t evio::FileHeader::HIPO_FILE_UNIQUE_WORD = 0x4F504948
static

First word in every HIPO file for identification purposes.

Referenced by FileHeader().

const uint32_t evio::FileHeader::INDEX_ARRAY_OFFSET = 16
static

Byte offset from beginning of header to the index array length.

Referenced by readHeader().

const uint32_t evio::FileHeader::INT1_OFFSET = 48
static

Byte offset from beginning of header to the user integer #1.

Referenced by readHeader().

const uint32_t evio::FileHeader::INT2_OFFSET = 52
static

Byte offset from beginning of header to the user integer #2.

Referenced by readHeader().

const uint32_t evio::FileHeader::MAGIC_OFFSET = 28
static

Byte offset from beginning of header to the record length.

Referenced by readHeader().

const uint32_t evio::FileHeader::RECORD_COUNT_OFFSET = 12
static

Byte offset from beginning of header to the record count.

Referenced by evio::Writer::close(), evio::WriterMT::close(), evio::EventWriter::close(), and readHeader().

const uint32_t evio::FileHeader::REGISTER1_OFFSET = 32
static

Byte offset from beginning of header to the user register #1.

Referenced by readHeader().

const uint32_t evio::FileHeader::TRAILER_POSITION_OFFSET = 40
static

Byte offset from beginning of header to write trailer position.

Referenced by evio::Writer::close(), and readHeader().

const uint32_t evio::FileHeader::TRAILER_WITH_INDEX_BIT = 0x400
static

10th bit set in bitInfo word in file header means file trailer with index array exists.

Referenced by hasTrailerWithIndex(), and setBitInfo().

const uint32_t evio::FileHeader::USER_LENGTH_OFFSET = 24
static

Byte offset from beginning of header to the user header length.

Referenced by readHeader().


The documentation for this class was generated from the following files: