evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RecordHeader.h
Go to the documentation of this file.
1 //
2 // Copyright 2020, Jefferson Science Associates, LLC.
3 // Subject to the terms in the LICENSE file found in the top-level directory.
4 //
5 // EPSCI Group
6 // Thomas Jefferson National Accelerator Facility
7 // 12000, Jefferson Ave, Newport News, VA 23606
8 // (757)-269-7100
9 //
10 
11 
12 #ifndef EVIO_6_0_RECORDHEADER_H
13 #define EVIO_6_0_RECORDHEADER_H
14 
15 
16 #include <cstdint>
17 #include <string>
18 #include <bitset>
19 #include <iostream>
20 #include <iomanip>
21 #include <sstream>
22 #include <vector>
23 #include <memory>
24 
25 
26 #include "HeaderType.h"
27 #include "ByteOrder.h"
28 #include "ByteBuffer.h"
29 #include "IBlockHeader.h"
30 #include "EvioException.h"
31 #include "Compressor.h"
32 #include "Util.h"
33 
34 
35 namespace evio {
36 
37 
182  class RecordHeader : public IBlockHeader {
183 
184  private:
185 
187  static uint32_t padValue[4];
188 
189  public:
190 
192  static const uint32_t HEADER_SIZE_WORDS = 14;
194  static const uint32_t HEADER_SIZE_BYTES = 56;
196  static const uint32_t HEADER_MAGIC = 0xc0da0100;
197 
198  // Byte offset to header words
199 
201  static const uint32_t RECORD_LENGTH_OFFSET = 0;
203  static const uint32_t RECORD_NUMBER_OFFSET = 4;
205  static const uint32_t HEADER_LENGTH_OFFSET = 8;
207  static const uint32_t EVENT_COUNT_OFFSET = 12;
209  static const uint32_t INDEX_ARRAY_OFFSET = 16;
211  static const uint32_t BIT_INFO_OFFSET = 20;
213  static const uint32_t USER_LENGTH_OFFSET = 24;
215  static const uint32_t MAGIC_OFFSET = 28;
217  static const uint32_t UNCOMPRESSED_LENGTH_OFFSET = 32;
219  static const uint32_t COMPRESSION_TYPE_OFFSET = 36;
221  static const uint32_t REGISTER1_OFFSET = 40;
223  static const uint32_t REGISTER2_OFFSET = 48;
224 
225  // Bits in bit info word
226 
228  static const uint32_t DICTIONARY_BIT = 0x100;
230  static const uint32_t LAST_RECORD_BIT = 0x200;
231 
233  static const uint32_t DATA_ROC_RAW_BITS = 0x000;
235  static const uint32_t DATA_PHYSICS_BITS = 0x800;
237  static const uint32_t DATA_PARTIAL_BITS = 0x1000;
239  static const uint32_t DATA_DISENTANGLED_BITS = 0x1800;
241  static const uint32_t DATA_USER_BITS = 0x2000;
243  static const uint32_t DATA_CONTROL_BITS = 0x2800;
245  static const uint32_t DATA_OTHER_BITS = 0x7800;
246 
247  // Bit masks
248 
250  static const uint32_t VERSION_MASK = 0xff;
252  static const uint32_t LAST_RECORD_MASK = 0x400;
253 
254  private:
255 
257  static const uint32_t COMP_PADDING_MASK = 0x03000000;
259  static const uint32_t DATA_PADDING_MASK = 0x00C00000;
261  static const uint32_t USER_PADDING_MASK = 0x00300000;
263  static const uint32_t HEADER_TYPE_MASK = 0xF0000000;
264 
265  //-------------------
266 
268  uint64_t recordUserRegisterFirst = 0ULL;
270  uint64_t recordUserRegisterSecond = 0ULL;
272  size_t position = 0ULL;
274  uint32_t recordLength = 0;
276  uint32_t recordLengthWords = 0;
278  uint32_t recordNumber = 1;
279 
280 
282  uint32_t entries = 0;
284  uint32_t bitInfo = 0;
290  uint32_t eventType = 0;
292  uint32_t headerLength = HEADER_SIZE_BYTES;
294  uint32_t headerLengthWords = HEADER_SIZE_WORDS;
296  uint32_t userHeaderLength = 0;
298  uint32_t userHeaderLengthWords = 0;
300  uint32_t indexLength = 0;
302  uint32_t dataLength = 0;
304  uint32_t dataLengthWords = 0;
306  uint32_t compressedDataLength = 0;
308  uint32_t compressedDataLengthWords = 0;
311  uint32_t headerVersion = 6;
313  uint32_t headerMagicWord = HEADER_MAGIC;
314 
318  uint32_t userHeaderLengthPadding = 0;
322  uint32_t dataLengthPadding = 0;
326  uint32_t compressedDataLengthPadding = 0;
327 
329  HeaderType headerType {HeaderType::EVIO_RECORD};
330 
333 
337 
338 
339  public:
340 
341  RecordHeader();
342  RecordHeader(const RecordHeader & head);
343  explicit RecordHeader(const HeaderType & type);
344  RecordHeader(size_t pos, uint32_t len, uint32_t ent);
345  ~RecordHeader() = default;
346 
347  RecordHeader & operator=(const RecordHeader& head);
348 
349  private:
350 
351  void bitInfoInit();
352  void decodeBitInfoWord(uint32_t word);
353 
354  public:
355 
356  void copy(std::shared_ptr<RecordHeader> const & head);
357  void reset();
358 
359  static uint32_t getWords(uint32_t length);
360  static uint32_t getPadding(uint32_t length);
361 
362  // Getters
363 
364  const HeaderType & getHeaderType() const;
365  // getByteOrder part of IBlockHeader below ...
366 
367  uint32_t getUncompressedRecordLength() const;
368  uint32_t getCompressedRecordLength() const;
369  uint32_t getLength() const;
370  uint32_t getLengthWords() const;
371  uint32_t getEntries() const;
372  uint32_t getUserHeaderLength() const;
373  uint32_t getUserHeaderLengthWords() const;
374  // getVersion() part of IBlockHeader below ...
375  uint32_t getDataLength() const;
376  uint32_t getDataLengthWords() const;
377  uint32_t getIndexLength() const;
378  uint32_t getCompressedDataLength() const;
379  uint32_t getCompressedDataLengthPadding() const;
380  uint32_t getCompressedDataLengthWords() const;
381  uint32_t getHeaderLength() const;
382  // getHeaderWords part of IBlockHeader below ...
383  uint32_t getRecordNumber() const;
384  uint64_t getUserRegisterFirst() const;
385  uint64_t getUserRegisterSecond() const;
386  size_t getPosition() const;
388 
389  // Bit info methods
390 
391  uint32_t setBitInfo(bool isLastRecord, bool haveDictionary);
392  uint32_t getBitInfoWord() const;
393  void setBitInfoWord(uint32_t word);
394  void setBitInfoWord(std::bitset<24> const & set);
395 
396  static uint32_t generateSixthWord(std::bitset<24> const & set);
397  static uint32_t generateSixthWord(uint32_t version, bool hasDictionary,
398  bool isEnd, uint32_t eventType);
399  static uint32_t generateSixthWord(std::bitset<24> const & set, uint32_t version,
400  bool hasDictionary, bool isEnd, uint32_t eventType,
401  uint32_t headerType = 0);
402 
403  // Boolean setters/getters
404 
405  uint32_t hasDictionary(bool hasFirst);
406  // hasDictionary() part of IBlockHeader below ...
407  static bool hasDictionary(int bitInfo);
408 
409  uint32_t isLastRecord(bool isLast);
410  bool isLastRecord() const;
411  static bool isLastRecord(uint32_t bitInfo);
412 
413  bool isCompressed() override;
414 
415  bool isEvioTrailer() const;
416  bool isEvioRecord() const;
417  bool isHipoTrailer() const;
418  bool isHipoRecord() const;
419 
420  static bool isEvioTrailer(uint32_t bitInfo);
421  static bool isEvioRecord(uint32_t bitInfo);
422  static bool isHipoTrailer(uint32_t bitInfo);
423  static bool isHipoRecord(uint32_t bitInfo);
424 
425  // Setters
426 
427  static uint32_t clearLastRecordBit(uint32_t i);
428  uint32_t setBitInfoEventType (uint32_t type);
429 
430  RecordHeader & setHeaderType(HeaderType const & type);
431  RecordHeader & setPosition(size_t pos);
432  RecordHeader & setRecordNumber(uint32_t num);
433  RecordHeader & setLength(uint32_t length);
434  RecordHeader & setDataLength(uint32_t length);
435  RecordHeader & setCompressedDataLength(uint32_t length);
436  RecordHeader & setIndexLength(uint32_t length);
438  RecordHeader & setEntries(uint32_t n);
439  RecordHeader & setUserHeaderLength(uint32_t length);
440  RecordHeader & setHeaderLength(uint32_t length);
441  RecordHeader & setUserRegisterFirst(uint64_t reg);
442  RecordHeader & setUserRegisterSecond(uint64_t reg);
443 
444 
445  void writeHeader(ByteBuffer & buf, size_t off = 0);
446  void writeHeader(std::shared_ptr<ByteBuffer> & buffer, size_t off = 0);
447  void writeHeader(uint8_t *array, const ByteOrder & order);
448 
449 
450  static void writeTrailer(uint8_t* array, size_t arrayLen,
451  uint32_t recordNum, const ByteOrder & order,
452  const std::shared_ptr<std::vector<uint32_t>> & recordLengths = nullptr);
453 
454  static void writeTrailer(std::vector<uint8_t> & array, size_t off,
455  uint32_t recordNum, const ByteOrder & order,
456  const std::shared_ptr<std::vector<uint32_t>> & recordLengths = nullptr);
457 
458  static void writeTrailer(ByteBuffer & buf, size_t off, uint32_t recordNum,
459  const std::shared_ptr<std::vector<uint32_t>> & recordLengths = nullptr);
460 
461  static void writeTrailer(std::shared_ptr<ByteBuffer> & buf, size_t off, uint32_t recordNum,
462  const std::shared_ptr<std::vector<uint32_t>> & recordLengths = nullptr);
463 
464 
465  static bool isCompressed(ByteBuffer & buffer, size_t offset);
466  static bool isCompressed(std::shared_ptr<ByteBuffer> & buffer, size_t offset);
467 
468 
469  void readHeader(ByteBuffer & buffer, size_t offset = 0);
470  void readHeader(std::shared_ptr<ByteBuffer> & buffer, size_t offset = 0);
471  void readHeader(uint8_t *src, ByteOrder order);
472 
473  std::string eventTypeToString() const;
474 
475  // Methods for implementing IBlockHeader
476 
477  uint32_t getSize() override;
478  uint32_t getNumber() override;
479  uint32_t getHeaderWords() override;
480  uint32_t getSourceId() override;
481  bool hasFirstEvent() override;
482  uint32_t getEventType() override;
483  uint32_t getVersion() override;
484  uint32_t getMagicNumber() override;
485  ByteOrder & getByteOrder() override;
486 
487  bool hasDictionary() override;
488  bool isLastBlock() override;
489  std::string toString() override;
490  size_t write(ByteBuffer & byteBuffer) override;
491 
492  // Methods are not used in this class but must be part of IBlockHeader interface
493 
494  size_t getBufferEndingPosition() override;
495  size_t getBufferStartingPosition() override;
496  void setBufferStartingPosition(size_t bufferStartingPosition) override;
497  size_t nextBufferStartingPosition() override;
498  size_t firstEventStartingPosition() override;
499  size_t bytesRemaining(size_t pos) override;
500 
501  //-/////////////////////////////////////////////
502 
503  int main(int argc, char **argv);
504 
505  };
506 
507 }
508 
509 
510 #endif //EVIO_6_0_RECORDHEADER_H
uint32_t getMagicNumber() override
Get the magic number the record)header which should be 0xc0da0100.
Definition: RecordHeader.cpp:1548
~RecordHeader()=default
static void writeTrailer(uint8_t *array, size_t arrayLen, uint32_t recordNum, const ByteOrder &order, const std::shared_ptr< std::vector< uint32_t >> &recordLengths=nullptr)
uint64_t getUserRegisterSecond() const
Get the second user-defined 64-bit register.
Definition: RecordHeader.cpp:397
static const uint32_t LAST_RECORD_MASK
&quot;Last record&quot; is 11th bit in bitInfo word.
Definition: RecordHeader.h:252
uint32_t getSize() override
Get the size of the record)in 32 bit words.
Definition: RecordHeader.cpp:1533
uint32_t getSourceId() override
Get the source ID number if in CODA online context and data is coming from ROC.
Definition: RecordHeader.cpp:1563
uint32_t getRecordNumber() const
Get the record number.
Definition: RecordHeader.cpp:383
static const uint32_t MAGIC_OFFSET
Byte offset from beginning of header to the magic number.
Definition: RecordHeader.h:215
size_t bytesRemaining(size_t pos) override
Gives the bytes remaining in this record given a buffer position.
Definition: RecordHeader.cpp:1669
static const uint32_t DATA_ROC_RAW_BITS
11-14th bits in bitInfo word in header for CODA data type, ROC raw = 0.
Definition: RecordHeader.h:233
bool hasDictionary() override
Does this record have a dictionary in the user header?
Definition: RecordHeader.cpp:609
static uint32_t getWords(uint32_t length)
Returns length padded to 4-byte boundary for given length in bytes.
Definition: RecordHeader.cpp:218
bool isLastBlock() override
Is this the last record in the file or being sent over the network?
Definition: RecordHeader.cpp:1556
RecordHeader & setLength(uint32_t length)
Set the record length in bytes &amp; words.
Definition: RecordHeader.cpp:833
uint32_t getNumber() override
Get the block number for this record) In a file, this is usually sequential.
Definition: RecordHeader.cpp:1541
void setBitInfoWord(uint32_t word)
Set the bit info word and related values.
Definition: RecordHeader.cpp:451
std::string eventTypeToString() const
Return a meaningful string associated with event type.
Definition: RecordHeader.cpp:1577
void writeHeader(ByteBuffer &buf, size_t off=0)
Writes this header into the given byte buffer.
Definition: RecordHeader.cpp:979
Make a common interface for different versions of the BlockHeader arising from different evio version...
Definition: IBlockHeader.h:37
static uint32_t generateSixthWord(std::bitset< 24 > const &set)
Calculates the sixth word of this header which has the version number (6) in the lowest 8 bits and th...
Definition: RecordHeader.cpp:476
uint32_t setBitInfoEventType(uint32_t type)
Set the bit info of a record header for a specified CODA event type.
Definition: RecordHeader.cpp:749
static const uint32_t VERSION_MASK
Mask to get version number from 6th int in header.
Definition: RecordHeader.h:250
uint32_t setBitInfo(bool isLastRecord, bool haveDictionary)
Set the bit info word for a record header.
Definition: RecordHeader.cpp:423
CompressionType
Enum of supported data compression types.
Definition: Compressor.h:65
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
static const uint32_t DATA_CONTROL_BITS
11-14th bits in bitInfo word in record header for CODA data type, control = 5.
Definition: RecordHeader.h:243
static const HeaderType EVIO_RECORD
Header for a general evio record.
Definition: HeaderType.h:36
static const uint32_t DICTIONARY_BIT
8th bit set in bitInfo word in header means contains dictionary.
Definition: RecordHeader.h:228
bool isEvioRecord() const
Is this header an evio record?
Definition: RecordHeader.cpp:687
static const uint32_t DATA_PARTIAL_BITS
11-14th bits in bitInfo word in header for CODA data type, partial physics = 2.
Definition: RecordHeader.h:237
RecordHeader & setDataLength(uint32_t length)
Set the uncompressed data length in bytes &amp; words and the padding.
Definition: RecordHeader.cpp:847
uint32_t getHeaderLength() const
Get the length of this header in bytes (NOT including user header or index).
Definition: RecordHeader.cpp:369
size_t firstEventStartingPosition() override
Determines where the start of the first event in this record is located (bytes).
Definition: RecordHeader.cpp:1657
size_t nextBufferStartingPosition() override
Determines where the start of the next record header in some buffer is located (bytes).
Definition: RecordHeader.cpp:1645
RecordHeader & setRecordNumber(uint32_t num)
Set the record number.
Definition: RecordHeader.cpp:824
uint32_t getEventType() override
Get the type of events in record (see values of DataType.
Definition: RecordHeader.cpp:1570
size_t getBufferStartingPosition() override
Get the starting position in the buffer (bytes) from which this header was read–if that happened...
Definition: RecordHeader.cpp:1625
Definition: Compressor.h:66
uint32_t getCompressedDataLengthWords() const
Get the length of the compressed data in words (padded).
Definition: RecordHeader.cpp:362
RecordHeader & setPosition(size_t pos)
Set the position of this record in a file.
Definition: RecordHeader.cpp:816
RecordHeader & setEntries(uint32_t n)
Set the number of events or index entries.
Definition: RecordHeader.cpp:913
uint32_t getDataLengthWords() const
Get the length of the uncompressed data in words (padded).
Definition: RecordHeader.cpp:334
static const uint32_t RECORD_LENGTH_OFFSET
Byte offset from beginning of header to the record length.
Definition: RecordHeader.h:201
static const uint32_t DATA_USER_BITS
11-14th bits in bitInfo word in header for CODA data type, user = 4.
Definition: RecordHeader.h:241
static const uint32_t HEADER_MAGIC
Magic number used to track endianness.
Definition: RecordHeader.h:196
uint32_t getUserHeaderLengthWords() const
Get the length of the user-defined header in words.
Definition: RecordHeader.cpp:313
static const uint32_t DATA_PHYSICS_BITS
11-14th bits in bitInfo word in header for CODA data type, physics = 1.
Definition: RecordHeader.h:235
RecordHeader & setCompressedDataLength(uint32_t length)
Set the compressed data length in bytes &amp; words and the padding.
Definition: RecordHeader.cpp:865
uint32_t getIndexLength() const
Get the length of the index array in bytes.
Definition: RecordHeader.cpp:341
bool hasFirstEvent() override
Does this header have a first event in the user header?
Definition: RecordHeader.cpp:583
uint32_t getVersion() override
Get the Evio format version number.
Definition: RecordHeader.cpp:320
size_t getPosition() const
Get the position of this record in a file.
Definition: RecordHeader.cpp:271
RecordHeader & setUserHeaderLength(uint32_t length)
Set the user-defined header&#39;s length in bytes &amp; words and the padding.
Definition: RecordHeader.cpp:921
uint32_t getCompressedRecordLength() const
Get the padded length in bytes of the entire compressed record.
Definition: RecordHeader.cpp:251
RecordHeader & operator=(const RecordHeader &head)
Definition: RecordHeader.cpp:100
const HeaderType & getHeaderType() const
Get the type of header this is.
Definition: RecordHeader.cpp:404
uint32_t getUncompressedRecordLength() const
Get the padded length in bytes of the entire uncompressed record.
Definition: RecordHeader.cpp:240
void copy(std::shared_ptr< RecordHeader > const &head)
Copy method.
Definition: RecordHeader.cpp:142
RecordHeader & setIndexLength(uint32_t length)
Set the length of the index array in bytes.
Definition: RecordHeader.cpp:884
void reset()
Reset generated data.
Definition: RecordHeader.cpp:179
RecordHeader()
Default, no-arg constructor.
Definition: RecordHeader.cpp:25
static uint32_t clearLastRecordBit(uint32_t i)
Clear the bit in the given arg to indicate it is NOT the last record.
Definition: RecordHeader.cpp:659
std::string toString() override
Returns a string representation of this record.
Definition: RecordHeader.cpp:1486
uint32_t getCompressedDataLengthPadding() const
Get the padding of the compressed data in bytes.
Definition: RecordHeader.cpp:355
int main(int argc, char **argv)
Run this class as an executable which tests the writing and reading of a record.
Definition: RecordHeader.cpp:1683
static const uint32_t DATA_DISENTANGLED_BITS
11-14th bits in bitInfo word in header for CODA data type, disentangled = 3.
Definition: RecordHeader.h:239
static uint32_t getPadding(uint32_t length)
Returns number of bytes needed to pad to 4-byte boundary for the given length.
Definition: RecordHeader.cpp:230
uint32_t getLengthWords() const
Get the total length of this record in 32 bit words.
Definition: RecordHeader.cpp:285
static const uint32_t HEADER_SIZE_WORDS
Number of 32-bit words in a normal sized header.
Definition: RecordHeader.h:192
static const uint32_t DATA_OTHER_BITS
11-14th bits in bitInfo word in record header for CODA data type, other = 15.
Definition: RecordHeader.h:245
RecordHeader & setUserRegisterFirst(uint64_t reg)
Set the first, 64-bit, user-defined register.
Definition: RecordHeader.cpp:952
static const uint32_t BIT_INFO_OFFSET
Byte offset from beginning of header to bit info word.
Definition: RecordHeader.h:211
uint32_t getDataLength() const
Get the length of the uncompressed data in bytes.
Definition: RecordHeader.cpp:327
static const uint32_t USER_LENGTH_OFFSET
Byte offset from beginning of header to the user header length.
Definition: RecordHeader.h:213
Definition: RecordHeader.h:182
size_t write(ByteBuffer &byteBuffer) override
Write myself out into a byte buffer.
Definition: RecordHeader.cpp:1605
Compressor::CompressionType getCompressionType() override
Get the type of compression used.
Definition: RecordHeader.cpp:299
bool isHipoTrailer() const
Is this header a hipo trailer?
Definition: RecordHeader.cpp:680
static const uint32_t RECORD_NUMBER_OFFSET
Byte offset from beginning of header to the record number.
Definition: RecordHeader.h:203
static const uint32_t HEADER_LENGTH_OFFSET
Byte offset from beginning of header to the header length.
Definition: RecordHeader.h:205
ByteOrder & getByteOrder() override
Get the byte order of the file/buffer this header was read from.
Definition: RecordHeader.cpp:264
void readHeader(ByteBuffer &buffer, size_t offset=0)
Reads the header information from a byte buffer and validates it by checking the magic word (8th word...
Definition: RecordHeader.cpp:1310
static const uint32_t REGISTER2_OFFSET
Byte offset from beginning of header to the user register #2.
Definition: RecordHeader.h:223
uint32_t getLength() const
Get the total length of this record in bytes.
Definition: RecordHeader.cpp:278
bool isEvioTrailer() const
Is this header an evio trailer?
Definition: RecordHeader.cpp:673
static const uint32_t UNCOMPRESSED_LENGTH_OFFSET
Byte offset from beginning of header to the uncompressed data length.
Definition: RecordHeader.h:217
bool isCompressed() override
Does this header indicate compressed data?
Definition: RecordHeader.cpp:666
RecordHeader & setHeaderLength(uint32_t length)
Set the this header&#39;s length in bytes &amp; words.
Definition: RecordHeader.cpp:940
static const uint32_t REGISTER1_OFFSET
Byte offset from beginning of header to the user register #1.
Definition: RecordHeader.h:221
bool isLastRecord() const
Is this the header of the last record?
Definition: RecordHeader.cpp:643
uint64_t getUserRegisterFirst() const
Get the first user-defined 64-bit register.
Definition: RecordHeader.cpp:390
RecordHeader & setCompressionType(Compressor::CompressionType type)
Set the compression type.
Definition: RecordHeader.cpp:896
static const uint32_t COMPRESSION_TYPE_OFFSET
Byte offset from beginning of header to the compression type &amp; compressed data length word...
Definition: RecordHeader.h:219
bool isHipoRecord() const
Is this header a hipo record?
Definition: RecordHeader.cpp:694
uint32_t getHeaderWords() override
Get the length of this header in words.
Definition: RecordHeader.cpp:376
static const uint32_t LAST_RECORD_BIT
9th bit set in bitInfo word in header means is last in stream or file.
Definition: RecordHeader.h:230
static const uint32_t HEADER_SIZE_BYTES
Number of bytes in a normal sized header.
Definition: RecordHeader.h:194
RecordHeader & setUserRegisterSecond(uint64_t reg)
Set the second, 64-bit, user-defined register.
Definition: RecordHeader.cpp:963
void setBufferStartingPosition(size_t bufferStartingPosition) override
Set the starting position in the buffer (bytes) from which this header was read–if that happened...
Definition: RecordHeader.cpp:1636
uint32_t getBitInfoWord() const
Get the bit info word.
Definition: RecordHeader.cpp:443
uint32_t getCompressedDataLength() const
Get the length of the compressed data in bytes.
Definition: RecordHeader.cpp:348
uint32_t getEntries() const
Get the number of events or entries in index.
Definition: RecordHeader.cpp:292
RecordHeader & setHeaderType(HeaderType const &type)
Set this header&#39;s type.
Definition: RecordHeader.cpp:796
size_t getBufferEndingPosition() override
Get the position in the buffer (bytes) of this record&#39;s last data word.
Definition: RecordHeader.cpp:1615
static const ByteOrder ENDIAN_LOCAL
Local host&#39;s byte order.
Definition: ByteOrder.h:61
static const uint32_t INDEX_ARRAY_OFFSET
Byte offset from beginning of header to the index array length.
Definition: RecordHeader.h:209
uint32_t getUserHeaderLength() const
Get the length of the user-defined header in bytes.
Definition: RecordHeader.cpp:306
Numerical values associated with types of a file or record header.
Definition: HeaderType.h:32
static const uint32_t EVENT_COUNT_OFFSET
Byte offset from beginning of header to the event index count.
Definition: RecordHeader.h:207