evio
6.0
|
This holds an evio block header, also known as a physical record header. More...
#include <BlockHeaderV4.h>
Public Member Functions | |||||
BlockHeaderV4 ()=default | |||||
Constructor initializes all fields to default values. More... | |||||
BlockHeaderV4 (uint32_t sz, uint32_t num) | |||||
Creates a BlockHeader for evio version 4 format. More... | |||||
BlockHeaderV4 (std::shared_ptr< BlockHeaderV4 > &blkHeader) | |||||
This copy constructor creates an evio version 4 BlockHeader from another object of this class. More... | |||||
void | copy (std::shared_ptr< BlockHeaderV4 > &blkHeader) | ||||
This method copies another header's contents. More... | |||||
uint32_t | getSize () override | ||||
Get the size of the block (record) in 32 bit words.
| |||||
void | setSize (uint32_t sz) | ||||
Set the size of the block (physical record). More... | |||||
uint32_t | getEventCount () const | ||||
Get the number of events completely contained in the block. More... | |||||
void | setEventCount (uint32_t count) | ||||
Set the number of events completely contained in the block. More... | |||||
uint32_t | getNumber () override | ||||
Get the block number for this block (record).In a file, this is usually sequential, starting at 1.
| |||||
void | setNumber (uint32_t num) | ||||
Set the block number for this block (physical record). More... | |||||
uint32_t | getHeaderLength () const | ||||
Get the block header length in ints. More... | |||||
uint32_t | getHeaderWords () override | ||||
Get the block (record) header length, in 32 bit words.
| |||||
void | setHeaderLength (uint32_t len) | ||||
Set the block header length, in ints. More... | |||||
uint32_t | getVersion () override | ||||
Get the evio version of the block (record) header.
| |||||
void | setVersion (uint32_t ver) | ||||
Sets the evio version. More... | |||||
bool | hasFirstEvent () override | ||||
Does this block/record contain the "first event" (first event to be written to each file split)?
| |||||
bool | hasDictionary () override | ||||
Does this block contain an evio dictionary?
| |||||
bool | isLastBlock () override | ||||
Is this the last block in the file or being sent over the network?
| |||||
bool | isCompressed () override | ||||
Is this the data in this block compressed?
| |||||
Compressor::CompressionType | getCompressionType () override | ||||
Get the type of data compression used.
| |||||
bool | hasFirstEvent () const | ||||
Does this block contain the "first event" (first event to be written to each file split)? More... | |||||
uint32_t | getEventType () override | ||||
Get the type of events in block/record (see values of DataType.This is not supported by versions 1-3 which returns 0.
| |||||
std::bitset< 24 > | getBitInfo () | ||||
Gets a copy of all stored bit information. More... | |||||
bool | getBitInfo (uint32_t bitIndex) | ||||
Gets the value of a particular bit in the bitInfo field. More... | |||||
void | setBit (uint32_t bitIndex, bool value) | ||||
Sets a particular bit in the bitInfo field. More... | |||||
uint32_t | getSixthWord () | ||||
Calculates the sixth word of this header which has the version number in the lowest 8 bits and the bit info in the highest 24 bits. More... | |||||
void | parseToBitInfo (uint32_t word) | ||||
Parses the argument into the bit info fields. More... | |||||
uint32_t | getSourceId () override | ||||
Get the source ID number if in CODA online context and data is coming from ROC.
| |||||
uint32_t | getReserved1 () const | ||||
Get the first reserved word. More... | |||||
void | setReserved1 (uint32_t r1) | ||||
Sets the value of reserved1. More... | |||||
uint32_t | getReserved2 () const | ||||
Get the 2nd reserved word. More... | |||||
void | setReserved2 (uint32_t r2) | ||||
Sets the value of reserved2. More... | |||||
uint32_t | getMagicNumber () override | ||||
Get the magic number the block (record) header which should be 0xc0da0100.
| |||||
void | setMagicNumber (uint32_t magicNum) | ||||
Sets the value of magicNumber. More... | |||||
ByteOrder & | getByteOrder () override | ||||
Get the byte order of the data being read.
| |||||
void | setByteOrder (ByteOrder &order) | ||||
Sets the byte order of data being read. More... | |||||
std::string | toString () override | ||||
Get the string representation of the block (record) header.
| |||||
size_t | getBufferEndingPosition () override | ||||
Get the position in the buffer (bytes) of this block's last data word.
| |||||
size_t | getBufferStartingPosition () override | ||||
Get the starting position in the buffer (bytes) from which this header was read–if that happened. This is not part of the block header proper. It is a position in a memory buffer of the start of the block (record). It is kept for convenience. It is up to the reader to set it.
| |||||
void | setBufferStartingPosition (size_t pos) override | ||||
Set the starting position in the buffer (bytes) from which this header was read–if that happened. This is not part of the block header proper. It is a position in a memory buffer of the start of the block (record). It is kept for convenience. It is up to the reader to set it.
| |||||
size_t | nextBufferStartingPosition () override | ||||
Determines where the start of the next block (record) header in some buffer is located (bytes).This assumes the start position has been maintained by the object performing the buffer read.
| |||||
size_t | firstEventStartingPosition () override | ||||
Determines where the start of the first event in this block (record) is located (bytes).This assumes the start position has been maintained by the object performing the buffer read.
| |||||
size_t | bytesRemaining (size_t position) override | ||||
Gives the bytes remaining in this block (record) given a buffer position.The position is an absolute position in a byte buffer. This assumes that the absolute position in bufferStartingPosition is being maintained properly by the reader.
| |||||
size_t | write (ByteBuffer &byteBuffer) override | ||||
Write myself out into a byte buffer.This write is relative–i.e., it uses the current position of the buffer.
| |||||
Static Public Member Functions | |
static bool | hasDictionary (uint32_t i) |
Does this integer indicate that there is an evio dictionary (assuming it's the header's sixth word)? More... | |
static bool | isLastBlock (uint32_t i) |
Does this integer indicate that this is the last block (assuming it's the header's sixth word)? More... | |
static uint32_t | setLastBlockBit (uint32_t i) |
Set the bit in the given arg which indicates this is the last block. More... | |
static uint32_t | clearLastBlockBit (uint32_t i) |
Clear the bit in the given arg to indicate it is NOT the last block. More... | |
static bool | hasFirstEvent (uint32_t i) |
Does this integer indicate that block has the first event (assuming it's the header's sixth word)? Only makes sense if the integer arg comes from the first block header of a file or buffer. More... | |
static uint32_t | setFirstEventBit (uint32_t i) |
Set the bit in the given arg which indicates this block has a first event. More... | |
static uint32_t | clearFirstEventBit (uint32_t i) |
Clear the bit in the given arg to indicate this block does NOT have a first event. More... | |
static void | setFirstEvent (std::bitset< 24 > &bSet) |
Encode the "is first event" into the bit info word which will be in evio block header. More... | |
static void | unsetFirstEvent (std::bitset< 24 > &bSet) |
Encode the "is NOT first event" into the bit info word which will be in evio block header. More... | |
static void | setEventType (std::bitset< 24 > &bSet, uint32_t type) |
Sets the right bits in bit set (2-5 when starting at 0) to hold 4 bits of the given type value. More... | |
static uint32_t | generateSixthWord (std::bitset< 24 > const &set) |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits. More... | |
static uint32_t | generateSixthWord (std::bitset< 24 > const &bSet, bool hasDictionary, bool isEnd) |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits. More... | |
static uint32_t | generateSixthWord (uint32_t version, bool hasDictionary, bool isEnd, uint32_t eventType) |
Calculates the sixth word of this header which has the version number in the lowest 8 bits. More... | |
static uint32_t | generateSixthWord (std::bitset< 24 > bSet, uint32_t version, bool hasDictionary, bool isEnd, uint32_t eventType) |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits. More... | |
Public Attributes | |
uint32_t | size = 0 |
The block (physical record) size in 32 bit ints. More... | |
uint32_t | number = 1 |
The block number. More... | |
uint32_t | headerLength = 8 |
The block header length. More... | |
uint32_t | eventCount = 0 |
Since blocks only contain whole events in this version, this stores the number of events contained in a block. More... | |
uint32_t | version = 4 |
The evio version, always 4. More... | |
uint32_t | reserved1 = 0 |
Value of first reserved word. More... | |
uint32_t | reserved2 = 0 |
Value of second reserved word. More... | |
std::bitset< 24 > | bitInfo |
Bit information. More... | |
uint32_t | magicNumber = MAGIC_NUMBER |
This is the magic word, 0xc0da0100, used to check endianness. More... | |
ByteOrder | byteOrder {ByteOrder::ENDIAN_LOCAL} |
This is the byte order of the data being read. More... | |
int64_t | bufferStartingPosition = 0L |
This is not part of the block header proper. More... | |
Static Public Attributes | |
static const uint32_t | HEADER_SIZE = 8 |
The minimum and expected block header size in 32 bit ints. More... | |
static const uint32_t | EV_DICTIONARY_MASK = 0x100 |
Dictionary presence is 9th bit in version/info word. More... | |
static const uint32_t | EV_LASTBLOCK_MASK = 0x200 |
"Last block" is 10th bit in version/info word More... | |
static const uint32_t | EV_EVENTTYPE_MASK = 0x3C00 |
"Event type" is 11-14th bits` in version/info word More... | |
static const uint32_t | EV_FIRSTEVENT_MASK = 0x4000 |
"First event" is 15th bit in version/info word More... | |
static const uint32_t | EV_BLOCKSIZE = 0 |
Position of word for size of block in 32-bit words. More... | |
static const uint32_t | EV_BLOCKNUM = 1 |
Position of word for block number, starting at 1. More... | |
static const uint32_t | EV_HEADERSIZE = 2 |
Position of word for size of header in 32-bit words (=8). More... | |
static const uint32_t | EV_COUNT = 3 |
Position of word for number of events in block. More... | |
static const uint32_t | EV_RESERVED1 = 4 |
Position of word for reserved. More... | |
static const uint32_t | EV_VERSION = 5 |
Position of word for version of file format. More... | |
static const uint32_t | EV_RESERVED2 = 6 |
Position of word for reserved. More... | |
static const uint32_t | EV_MAGIC = 7 |
Position of word for magic number for endianness tracking. More... | |
static const uint32_t | MAGIC_NUMBER = 0xc0da0100 |
The magic number, should be the value of magicNumber . More... | |
static const uint32_t | MAGIC_OFFSET = 28 |
Byte offset from beginning of header to the magic number. More... | |
static const uint32_t | BIT_INFO_OFFSET = 20 |
Byte offset from beginning of header to bit info word. More... | |
static const uint32_t | VERSION_MASK = 0xff |
Mask to get version number from bitinfo word in header. More... | |
This holds an evio block header, also known as a physical record header.
Unfortunately, in versions 1, 2 & 3, evio files impose an anachronistic block structure. The complication that arises is that logical records (events) will sometimes cross physical record boundaries. This block structure is changed in version 4 so that blocks only contain integral numbers of events. The information stored in this block header has also changed.
################################
Evio block header, version 4:
################################
MSB(31) LSB(0)
<--- 32 bits ------------------------>
_______________________________________
| Block Length |
|_____________________________________|
| Block Number |
|_____________________________________|
| Header Length = 8 |
|_____________________________________|
| Event Count |
|_____________________________________|
| reserved 1 |
|_____________________________________|
| Bit info & Version |
|_____________________________________|
| reserved 2 |
|_____________________________________|
| Magic Int |
|_____________________________________|
Block Length = number of ints in block (including this one).
Block Number = id number (starting at 1)
Header Length = number of ints in this header (8)
Event Count = number of events in this block (always an integral #).
NOTE: this value should not be used to parse the following
events since the first block may have a dictionary whose
presence is not included in this count.
Reserved 1 = If bits 11-14 in bit info are RocRaw (1), then (in the first block)
this contains the CODA id of the source
Bit info & Version = Lowest 8 bits are the version number (4).
Upper 24 bits contain bit info.
If a dictionary is included as the first event, bit #9 is set (=1)
If a last block, bit #10 is set (=1)
Reserved 2 = unused
Magic Int = magic number (0xc0da0100) used to check endianness
Bit info has the following bits defined (bit numbers start with 1):
Bit 9 = true if dictionary is included (relevant for first block only)
Bit 10 = true if this block is the last block in file or network transmission
Bits 11-14 = type of events following (ROC Raw = 0, Physics = 1, PartialPhysics = 2,
DisentangledPhysics = 3, User = 4, Control = 5, Other = 15).
Bit 15 = true if next (non-dictionary) event in this block is a "first event" to
be placed at the beginning of each written file and its splits.
Bits 11-15 are useful ONLY for the CODA online use of evio.
That's because only a single CODA event type is placed into
a single (ET, cMsg) buffer, and each user or control event has its own
buffer as well. That buffer then is parsed by an EvioReader or
EvioCompactReader object. Thus all events will be of a single CODA type.
|
default |
Constructor initializes all fields to default values.
|
inline |
Creates a BlockHeader for evio version 4 format.
Only the block size
and block number
are provided. The other words, which can be modified by setters, are initialized to these values:
headerLength
is initialized to 8version
is initialized to 4bitInfo
is initialized to all bits offmagicNumber
is initialized to MAGIC_NUMBER.
sz | the size of the block in ints. |
num | the block number–usually sequential. |
|
inlineexplicit |
This copy constructor creates an evio version 4 BlockHeader from another object of this class.
blkHeader | block header object to copy |
References copy().
|
inlineoverridevirtual |
Gives the bytes remaining in this block (record) given a buffer position.The position is an absolute position in a byte buffer. This assumes that the absolute position in bufferStartingPosition
is being maintained properly by the reader.
position | the absolute current position in a byte buffer. |
EvioException | if position out of bounds |
Implements evio::IBlockHeader.
References bufferStartingPosition, and nextBufferStartingPosition().
|
inlinestatic |
Clear the bit in the given arg to indicate this block does NOT have a first event.
i | integer in which to clear the first event bit |
References EV_FIRSTEVENT_MASK.
|
inlinestatic |
Clear the bit in the given arg to indicate it is NOT the last block.
i | integer in which to clear the last-block bit |
References EV_LASTBLOCK_MASK.
|
inline |
This method copies another header's contents.
blkHeader | block header object to copy |
References bitInfo, bufferStartingPosition, byteOrder, eventCount, headerLength, magicNumber, number, reserved1, reserved2, size, and version.
Referenced by BlockHeaderV4().
|
inlineoverridevirtual |
Determines where the start of the first event in this block (record) is located (bytes).This assumes the start position has been maintained by the object performing the buffer read.
Implements evio::IBlockHeader.
References bufferStartingPosition, and headerLength.
|
inlinestatic |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits.
set | Bitset containing all bits to be set |
|
inlinestatic |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits.
The arg isDictionary is set in the 9th bit and isEnd is set in the 10th bit.
bSet | Bitset containing all bits to be set |
hasDictionary | does this block include an evio xml dictionary as the first event? |
isEnd | is this the last block of a file or a buffer? |
|
inlinestatic |
Calculates the sixth word of this header which has the version number in the lowest 8 bits.
The arg hasDictionary is set in the 9th bit and isEnd is set in the 10th bit. Four bits of an int (event type) are set in bits 11-14.
version | evio version number |
hasDictionary | does this block include an evio xml dictionary as the first event? |
isEnd | is this the last block of a file or a buffer? |
eventType | 4 bit type of events header is containing |
References version.
|
inlinestatic |
Calculates the sixth word of this header which has the version number (4) in the lowest 8 bits and the set in the upper 24 bits.
The arg isDictionary is set in the 9th bit and isEnd is set in the 10th bit. Four bits of an int (event type) are set in bits 11-14.
bSet | Bitset containing all bits to be set |
version | evio version number |
hasDictionary | does this block include an evio xml dictionary as the first event? |
isEnd | is this the last block of a file or a buffer? |
eventType | 4 bit type of events header is containing |
References version.
|
inline |
Gets a copy of all stored bit information.
References bitInfo.
|
inline |
Gets the value of a particular bit in the bitInfo field.
bitIndex | index of bit to get |
References bitInfo.
|
inlineoverridevirtual |
Get the position in the buffer (bytes) of this block's last data word.
Implements evio::IBlockHeader.
References bufferStartingPosition, and size.
Referenced by nextBufferStartingPosition().
|
inlineoverridevirtual |
Get the starting position in the buffer (bytes) from which this header was read–if that happened.
This is not part of the block header proper. It is a position in a memory buffer of the start of the block (record). It is kept for convenience. It is up to the reader to set it.
Implements evio::IBlockHeader.
References bufferStartingPosition.
Referenced by toString().
|
inlineoverridevirtual |
Get the byte order of the data being read.
Implements evio::IBlockHeader.
References byteOrder.
|
inlineoverridevirtual |
Get the type of data compression used.
Implements evio::IBlockHeader.
References evio::Compressor::UNCOMPRESSED.
|
inline |
Get the number of events completely contained in the block.
NOTE: There are no partial events, only complete events stored in one block.
References eventCount.
|
inlineoverridevirtual |
Get the type of events in block/record (see values of DataType.This is not supported by versions 1-3 which returns 0.
Implements evio::IBlockHeader.
References bitInfo.
|
inline |
Get the block header length in ints.
This should be 8.
References headerLength.
|
inlineoverridevirtual |
Get the block (record) header length, in 32 bit words.
Implements evio::IBlockHeader.
References headerLength.
|
inlineoverridevirtual |
Get the magic number the block (record) header which should be 0xc0da0100.
Implements evio::IBlockHeader.
References magicNumber.
|
inlineoverridevirtual |
Get the block number for this block (record).In a file, this is usually sequential, starting at 1.
Implements evio::IBlockHeader.
References number.
|
inline |
|
inline |
|
inline |
Calculates the sixth word of this header which has the version number in the lowest 8 bits and the bit info in the highest 24 bits.
References bitInfo, and version.
Referenced by toString(), and write().
|
inlineoverridevirtual |
Get the size of the block (record) in 32 bit words.
Implements evio::IBlockHeader.
References size.
|
inlineoverridevirtual |
Get the source ID number if in CODA online context and data is coming from ROC.
Implements evio::IBlockHeader.
References reserved1.
|
inlineoverridevirtual |
Get the evio version of the block (record) header.
Implements evio::IBlockHeader.
References version.
|
inlinestatic |
Does this integer indicate that there is an evio dictionary (assuming it's the header's sixth word)?
i | integer to examine. |
true
if this int indicates an evio dictionary, else false
References EV_DICTIONARY_MASK.
|
inlineoverridevirtual |
Does this block contain an evio dictionary?
true
if this block contains an evio dictionary, else false
. Always returns false for versions 1-3 (not implemented).Implements evio::IBlockHeader.
References bitInfo.
Referenced by toString().
|
inlineoverridevirtual |
Does this block/record contain the "first event" (first event to be written to each file split)?
true
if this record has the first event, else false
. Evio versions 1-3 always return false.Implements evio::IBlockHeader.
References bitInfo.
|
inline |
Does this block contain the "first event" (first event to be written to each file split)?
true
if this contains the first event, else false
References bitInfo.
|
inlinestatic |
Does this integer indicate that block has the first event (assuming it's the header's sixth word)? Only makes sense if the integer arg comes from the first block header of a file or buffer.
i | integer to examine. |
true
if this int indicates the block has a first event, else false
References EV_FIRSTEVENT_MASK.
|
inlineoverridevirtual |
Is this the data in this block compressed?
true
if the data in this block is compressed, else false
.Implements evio::IBlockHeader.
|
inlineoverridevirtual |
Is this the last block in the file or being sent over the network?
true
if this is the last block in the file or being sent over the network, else false
. Always returns false for versions 1-3 (not implemented).Implements evio::IBlockHeader.
References bitInfo.
Referenced by toString().
|
inlinestatic |
Does this integer indicate that this is the last block (assuming it's the header's sixth word)?
i | integer to examine. |
true
if this int indicates the last block, else false
References EV_LASTBLOCK_MASK.
|
inlineoverridevirtual |
Determines where the start of the next block (record) header in some buffer is located (bytes).This assumes the start position has been maintained by the object performing the buffer read.
Implements evio::IBlockHeader.
References getBufferEndingPosition().
Referenced by bytesRemaining(), and toString().
|
inline |
Parses the argument into the bit info fields.
This ignores the version in the lowest 8 bits.
word | integer to parse into bit info fields |
References bitInfo.
|
inline |
Sets a particular bit in the bitInfo field.
bitIndex | index of bit to change |
value | value to set bit to |
References bitInfo.
|
inlineoverridevirtual |
Set the starting position in the buffer (bytes) from which this header was read–if that happened.
This is not part of the block header proper. It is a position in a memory buffer of the start of the block (record). It is kept for convenience. It is up to the reader to set it.
pos | starting position in buffer from which this header was read–if that happened. |
Implements evio::IBlockHeader.
References bufferStartingPosition.
|
inline |
Sets the byte order of data being read.
order | the new value for data's byte order. |
References byteOrder.
|
inline |
Set the number of events completely contained in the block.
NOTE: There are no partial events, only complete events stored in one block.
count | the new number of events in the block. |
EvioException | if count < 0 |
References eventCount.
|
inlinestatic |
Sets the right bits in bit set (2-5 when starting at 0) to hold 4 bits of the given type value.
Useful when generating a bitset for use with EventWriter constructor.
bSet | Bitset containing all bits to be set |
type | event type as int |
|
inlinestatic |
Encode the "is first event" into the bit info word which will be in evio block header.
bSet | bit set which will become part of the bit info word |
|
inlinestatic |
Set the bit in the given arg which indicates this block has a first event.
i | integer in which to set the last-block bit |
References EV_FIRSTEVENT_MASK.
|
inline |
Set the block header length, in ints.
Although technically speaking this value is variable, it should be 8. However, since this is usually read as part of reading the physical record header, it is a good check to have a setter rather than just fix its value at 8.
len | the new block header length. This should be 8. |
References HEADER_SIZE, and headerLength.
|
inlinestatic |
Set the bit in the given arg which indicates this is the last block.
i | integer in which to set the last-block bit |
References EV_LASTBLOCK_MASK.
|
inline |
Sets the value of magicNumber.
This should match the constant MAGIC_NUMBER. If it doesn't, some obvious possibilities:
1) The evio data (perhaps from a file) is screwed up.
2) The reading algorithm is screwed up.
3) The endianness is not being handled properly.
magicNum | the new value for magic number. |
EvioException | if magic number not the correct value. |
References evio::IBlockHeader::MAGIC_NUMBER, and magicNumber.
|
inline |
Set the block number for this block (physical record).
In a file, this is usually sequential, starting at 1. This is not checked.
num | the number of the block (physical record). |
References number.
|
inline |
|
inline |
|
inline |
Set the size of the block (physical record).
Some trivial checking is done.
sz | the new value for the size, in ints. |
EvioException | if size < 8 |
References size.
|
inline |
Sets the evio version.
Should be 4 but no check is performed here.
ver | the evio version of evio. |
References version.
|
inlineoverridevirtual |
Get the string representation of the block (record) header.
Implements evio::IBlockHeader.
References bitInfo, eventCount, getBufferStartingPosition(), getSixthWord(), hasDictionary(), headerLength, isLastBlock(), magicNumber, nextBufferStartingPosition(), number, reserved1, size, and version.
|
inlinestatic |
Encode the "is NOT first event" into the bit info word which will be in evio block header.
bSet | bit set which will become part of the bit info word |
|
inlineoverridevirtual |
Write myself out into a byte buffer.This write is relative–i.e., it uses the current position of the buffer.
byteBuffer | the byteBuffer to write to. |
overflow_error | if insufficient room to write header into buffer. |
Implements evio::IBlockHeader.
References eventCount, getSixthWord(), headerLength, magicNumber, number, evio::ByteBuffer::putInt(), evio::ByteBuffer::remaining(), and size.
|
staticinherited |
Byte offset from beginning of header to bit info word.
Referenced by evio::Util::findEvioVersion().
std::bitset<24> evio::BlockHeaderV4::bitInfo |
Bit information.
Bit one: is the first event a dictionary?
Referenced by copy(), getBitInfo(), getEventType(), getSixthWord(), hasDictionary(), hasFirstEvent(), isLastBlock(), parseToBitInfo(), setBit(), and toString().
int64_t evio::BlockHeaderV4::bufferStartingPosition = 0L |
This is not part of the block header proper.
It is a position in a memory buffer of the start of the block (physical record). It is kept for convenience.
Referenced by bytesRemaining(), copy(), firstEventStartingPosition(), getBufferEndingPosition(), getBufferStartingPosition(), and setBufferStartingPosition().
ByteOrder evio::BlockHeaderV4::byteOrder {ByteOrder::ENDIAN_LOCAL} |
This is the byte order of the data being read.
Referenced by copy(), getByteOrder(), and setByteOrder().
|
static |
Position of word for block number, starting at 1.
|
static |
Position of word for size of block in 32-bit words.
|
static |
Position of word for number of events in block.
|
static |
Dictionary presence is 9th bit in version/info word.
Referenced by hasDictionary().
|
static |
"Event type" is 11-14th bits` in version/info word
|
static |
"First event" is 15th bit in version/info word
Referenced by clearFirstEventBit(), hasFirstEvent(), and setFirstEventBit().
|
static |
Position of word for size of header in 32-bit words (=8).
|
static |
"Last block" is 10th bit in version/info word
Referenced by clearLastBlockBit(), isLastBlock(), and setLastBlockBit().
|
static |
Position of word for magic number for endianness tracking.
|
static |
Position of word for reserved.
|
static |
Position of word for reserved.
|
static |
Position of word for version of file format.
uint32_t evio::BlockHeaderV4::eventCount = 0 |
Since blocks only contain whole events in this version, this stores the number of events contained in a block.
Referenced by copy(), getEventCount(), setEventCount(), toString(), and write().
|
static |
The minimum and expected block header size in 32 bit ints.
Referenced by evio::EvioReaderV4::parseFirstHeader(), evio::EvioReaderV4::processNextBlock(), and setHeaderLength().
uint32_t evio::BlockHeaderV4::headerLength = 8 |
The block header length.
Should be 8 in all cases, so getting this correct constitutes a check.
Referenced by copy(), firstEventStartingPosition(), getHeaderLength(), getHeaderWords(), setHeaderLength(), toString(), and write().
|
staticinherited |
The magic number, should be the value of magicNumber
.
Referenced by evio::Util::findEvioVersion(), evio::EvioReaderV4::parseFirstHeader(), evio::BlockHeaderV2::setMagicNumber(), and setMagicNumber().
|
staticinherited |
Byte offset from beginning of header to the magic number.
Referenced by evio::Util::findEvioVersion().
uint32_t evio::BlockHeaderV4::magicNumber = MAGIC_NUMBER |
This is the magic word, 0xc0da0100, used to check endianness.
Referenced by copy(), getMagicNumber(), setMagicNumber(), toString(), and write().
uint32_t evio::BlockHeaderV4::number = 1 |
The block number.
In a file, this is usually sequential.
Referenced by BlockHeaderV4(), copy(), getNumber(), setNumber(), toString(), and write().
uint32_t evio::BlockHeaderV4::reserved1 = 0 |
Value of first reserved word.
Referenced by copy(), getReserved1(), getSourceId(), setReserved1(), and toString().
uint32_t evio::BlockHeaderV4::reserved2 = 0 |
Value of second reserved word.
Referenced by copy(), getReserved2(), and setReserved2().
uint32_t evio::BlockHeaderV4::size = 0 |
The block (physical record) size in 32 bit ints.
Referenced by BlockHeaderV4(), copy(), getBufferEndingPosition(), getSize(), setSize(), toString(), and write().
uint32_t evio::BlockHeaderV4::version = 4 |
The evio version, always 4.
Referenced by copy(), generateSixthWord(), getSixthWord(), getVersion(), setVersion(), and toString().
|
staticinherited |
Mask to get version number from bitinfo word in header.
Referenced by evio::Util::findEvioVersion().