evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BlockHeaderV4.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 #ifndef EVIO_6_0_BLOCKHEADERV4_H
12 #define EVIO_6_0_BLOCKHEADERV4_H
13 
14 
15 #include <bitset>
16 #include <sstream>
17 
18 
19 #include "IBlockHeader.h"
20 #include "ByteOrder.h"
21 #include "ByteBuffer.h"
22 #include "EvioException.h"
23 
24 
25 namespace evio {
26 
27 
104  class BlockHeaderV4 : public IBlockHeader {
105 
106  public:
107 
109  static const uint32_t HEADER_SIZE = 8;
110 
112  static const uint32_t EV_DICTIONARY_MASK = 0x100;
113 
115  static const uint32_t EV_LASTBLOCK_MASK = 0x200;
116 
118  static const uint32_t EV_EVENTTYPE_MASK = 0x3C00;
119 
121  static const uint32_t EV_FIRSTEVENT_MASK = 0x4000;
122 
124  static const uint32_t EV_BLOCKSIZE = 0;
126  static const uint32_t EV_BLOCKNUM = 1;
128  static const uint32_t EV_HEADERSIZE = 2;
130  static const uint32_t EV_COUNT = 3;
132  static const uint32_t EV_RESERVED1 = 4;
134  static const uint32_t EV_VERSION = 5;
136  static const uint32_t EV_RESERVED2 = 6;
138  static const uint32_t EV_MAGIC = 7;
139 
141 
143  uint32_t size = 0;
144 
146  uint32_t number = 1;
147 
149  uint32_t headerLength = 8;
150 
155  uint32_t eventCount = 0;
156 
158  uint32_t version = 4;
159 
161  uint32_t reserved1 = 0;
162 
164  uint32_t reserved2 = 0;
165 
167  std::bitset<24> bitInfo;
168 
171 
174 
180 
181 
182  public:
183 
185  BlockHeaderV4() = default;
186 
187 
201  BlockHeaderV4(uint32_t sz, uint32_t num) {
202  size = sz;
203  number = num;
204  }
205 
206 
212  explicit BlockHeaderV4(std::shared_ptr<BlockHeaderV4> & blkHeader) {
213  copy(blkHeader);
214  }
215 
216 
221  void copy(std::shared_ptr<BlockHeaderV4> & blkHeader) {
222  size = blkHeader->size;
223  number = blkHeader->number;
224  headerLength = blkHeader->headerLength;
225  version = blkHeader->version;
226  eventCount = blkHeader->eventCount;
227  reserved1 = blkHeader->reserved1;
228  reserved2 = blkHeader->reserved2;
229  byteOrder = blkHeader->byteOrder;
230  magicNumber = blkHeader->magicNumber;
231  bitInfo = blkHeader->bitInfo;
232  bufferStartingPosition = blkHeader->bufferStartingPosition;
233  }
234 
235 
237  uint32_t getSize() override {return size;}
238 
239 
245  void setSize(uint32_t sz) {
246  if (sz < 8) {
247  throw EvioException("Bad value for size in block (physical record) header: " + std::to_string(sz));
248  }
249  size = sz;
250  }
251 
252 
259  uint32_t getEventCount() const {return eventCount;}
260 
261 
269  void setEventCount(uint32_t count) {
270  if (count < 0) {
271  throw EvioException("Bad value for event count in block (physical record) header: " +
272  std::to_string(count));
273  }
274  eventCount = count;
275  }
276 
277 
279  uint32_t getNumber() override {return number;}
280 
281 
288  void setNumber(uint32_t num) {number = num;}
289 
290 
295  uint32_t getHeaderLength() const {return headerLength;}
296 
297 
299  uint32_t getHeaderWords() override {return headerLength;}
300 
301 
309  void setHeaderLength(uint32_t len) {
310  if (len != HEADER_SIZE) {
311  std::cout << "Warning: Block Header Length = " << headerLength << std::endl;
312  }
313  headerLength = len;
314  }
315 
316 
318  uint32_t getVersion() override {return version;}
319 
320 
325  void setVersion(uint32_t ver) {version = ver;}
326 
327 
329  bool hasFirstEvent() override {return bitInfo[6];}
330 
331 
338  static bool hasDictionary(uint32_t i) {return ((i & EV_DICTIONARY_MASK) > 0);}
339 
340 
342  bool hasDictionary() override {return bitInfo[0];}
343 
344 
346  bool isLastBlock() override {return bitInfo[1];}
347 
348 
350  bool isCompressed() override {return false;}
351 
352 
355 
356 
362  bool hasFirstEvent() const {return bitInfo[6];}
363 
364 
371  static bool isLastBlock(uint32_t i) {return ((i & EV_LASTBLOCK_MASK) > 0);}
372 
373 
379  static uint32_t setLastBlockBit(uint32_t i) {return (i |= EV_LASTBLOCK_MASK);}
380 
381 
387  static uint32_t clearLastBlockBit(uint32_t i) {return (i &= ~EV_LASTBLOCK_MASK);}
388 
389 
399  static bool hasFirstEvent(uint32_t i) {return ((i & EV_FIRSTEVENT_MASK) > 0);}
400 
401 
407  static uint32_t setFirstEventBit(uint32_t i) {return (i |= EV_FIRSTEVENT_MASK);}
408 
409 
415  static uint32_t clearFirstEventBit(uint32_t i) {return (i &= ~EV_FIRSTEVENT_MASK);}
416 
417 
418  //-//////////////////////////////////////////////////////////////////
419  // BitInfo methods
420  //-//////////////////////////////////////////////////////////////////
421 
422 
424  uint32_t getEventType() override {
425  uint32_t type=0;
426  bool bitisSet;
427  for (uint32_t i=0; i < 4; i++) {
428  bitisSet = bitInfo[i+2];
429  if (bitisSet) type |= (uint32_t)1 << i;
430  }
431  return type;
432  }
433 
434 
440  static void setFirstEvent(std::bitset<24> & bSet) {
441  // Encoding bit #15 (#6 since first is bit #9)
442  bSet[6] = true;
443  }
444 
445 
452  static void unsetFirstEvent(std::bitset<24> & bSet) {
453  // Encoding bit #15 (#6 since first is bit #9)
454  bSet[6] = false;
455  }
456 
457 
462  std::bitset<24> getBitInfo() {return bitInfo;}
463 
464 
470  bool getBitInfo(uint32_t bitIndex) {
471  if (bitIndex > 23) {
472  return false;
473  }
474  return bitInfo[bitIndex];
475  }
476 
477 
483  void setBit(uint32_t bitIndex, bool value) {
484  if (bitIndex > 23) {
485  return;
486  }
487  bitInfo[bitIndex] = value;
488  }
489 
490 
500  static void setEventType(std::bitset<24> & bSet, uint32_t type) {
501  if (type < 0) type = 0;
502  else if (type > 15) type = 15;
503 
504  for (uint32_t i=2; i < 6; i++) {
505  bSet[i] = ((type >> (i-2)) & 0x1) > 0;
506  }
507  }
508 
509 
516  uint32_t getSixthWord() {
517  uint32_t v = version & 0xff;
518 
519  for (uint32_t i=0; i < bitInfo.size(); i++) {
520  if (bitInfo[i]) {
521  v |= (0x1 << (8+i));
522  }
523  }
524 
525  return v;
526  }
527 
528 
536  static uint32_t generateSixthWord(std::bitset<24> const & set) {
537  uint32_t v = 4; // version
538 
539  for (uint32_t i=0; i < set.size(); i++) {
540  if (i > 23) {
541  break;
542  }
543  if (set[i]) {
544  v |= (0x1 << (8+i));
545  }
546  }
547 
548  return v;
549  }
550 
551 
562  static uint32_t generateSixthWord(std::bitset<24> const & bSet, bool hasDictionary, bool isEnd) {
563  uint32_t v = 4; // version
564 
565  for (uint32_t i=0; i < bSet.size(); i++) {
566  if (i > 23) {
567  break;
568  }
569  if (bSet[i]) {
570  v |= (0x1 << (8+i));
571  }
572  }
573 
574  v = hasDictionary ? (v | 0x100) : v;
575  v = isEnd ? (v | 0x200) : v;
576 
577  return v;
578  }
579 
580 
593  static uint32_t generateSixthWord(uint32_t version, bool hasDictionary,
594  bool isEnd, uint32_t eventType) {
595  uint32_t v = version;
596  v = hasDictionary ? (v | 0x100) : v;
597  v = isEnd ? (v | 0x200) : v;
598  v |= ((eventType & 0xf) << 10);
599  return v;
600  }
601 
602 
616  static uint32_t generateSixthWord(std::bitset<24> bSet, uint32_t version,
617  bool hasDictionary,
618  bool isEnd, uint32_t eventType) {
619  uint32_t v = version; // version
620 
621  for (int i=0; i < bSet.size(); i++) {
622  if (i > 23) {
623  break;
624  }
625  if (bSet[i]) {
626  v |= (0x1 << (8+i));
627  }
628  }
629 
630  v = hasDictionary ? (v | 0x100) : v;
631  v = isEnd ? (v | 0x200) : v;
632  v |= ((eventType & 0xf) << 10);
633 
634  return v;
635  }
636 
637 
643  void parseToBitInfo(uint32_t word) {
644  for (int i=0; i < bitInfo.size(); i++) {
645  bitInfo[i] = ((word >> (8+i)) & 0x1) > 0;
646  }
647  }
648 
649 
650  //-//////////////////////////////////////////////////////////////////
651 
652 
654  uint32_t getSourceId() override {return reserved1;}
655 
656 
661  uint32_t getReserved1() const {return reserved1;}
662 
663 
668  void setReserved1(uint32_t r1) {reserved1 = r1;}
669 
670 
675  uint32_t getReserved2() const {return reserved2;}
676 
677 
682  void setReserved2(uint32_t r2) {reserved2 = r2;}
683 
684 
686  uint32_t getMagicNumber() override {return magicNumber;}
687 
688 
699  void setMagicNumber(uint32_t magicNum) {
700  if (magicNum != MAGIC_NUMBER) {
701  throw EvioException("Value for magicNumber, " + std::to_string(magicNum) +
702  " does not match MAGIC_NUMBER 0xc0da0100");
703  }
705  }
706 
707 
709  ByteOrder & getByteOrder() override {return byteOrder;}
710 
711 
716  void setByteOrder(ByteOrder & order) {byteOrder = order;}
717 
718 
720  std::string toString() override {
721  std::stringstream ss;
722 
723  ss << "block size: " << size << std::endl;
724  ss << "number: " << number << std::endl;
725  ss << "headerLen: " << headerLength << std::endl;
726  ss << "event count: " << eventCount << std::endl;
727  ss << "reserved1: " << reserved1 << std::endl;
728  ss << "bitInfo bits: " << bitInfo.to_string() << std::endl;
729 
730  ss << "bitInfo/ver: " << getSixthWord() << std::endl;
731  ss << "has dict: " << hasDictionary() << std::endl;
732  ss << "is last blk: " << isLastBlock() << std::endl;
733 
734  ss << "version: " << version << std::endl;
735  ss << "magicNumber: " << magicNumber << std::endl;
736  ss << " *buffer start: " << getBufferStartingPosition() << std::endl;
737  ss << " *next start: " << nextBufferStartingPosition() << std::endl;
738 
739  return ss.str();
740  }
741 
742 
744  size_t getBufferEndingPosition() override {return bufferStartingPosition + 4*size;}
745 
746 
749 
750 
752  void setBufferStartingPosition(size_t pos) override {bufferStartingPosition = pos;}
753 
754 
757 
758 
761 
762 
764  size_t bytesRemaining(size_t position) override {
765  if (position < bufferStartingPosition) {
766  throw EvioException("Provided position is less than buffer starting position.");
767  }
768 
769  size_t nextBufferStart = nextBufferStartingPosition();
770  if (position > nextBufferStart) {
771  throw EvioException("Provided position beyond buffer end position.");
772  }
773 
774  return nextBufferStart - position;
775  }
776 
777 
779  size_t write(ByteBuffer & byteBuffer) override {
780  if (byteBuffer.remaining() < 32) {
781  throw std::overflow_error("not enough room in buffer to write");
782  }
783  byteBuffer.putInt(size);
784  byteBuffer.putInt(number);
785  byteBuffer.putInt(headerLength); // should always be 8
786  byteBuffer.putInt(eventCount);
787  byteBuffer.putInt(0); // unused
788  byteBuffer.putInt(getSixthWord());
789  byteBuffer.putInt(0); // unused
790  byteBuffer.putInt(magicNumber);
791  return 32;
792  }
793 
794  };
795 
796 
797 }
798 
799 #endif //EVIO_6_0_BLOCKHEADERV4_H
static uint32_t setFirstEventBit(uint32_t i)
Set the bit in the given arg which indicates this block has a first event.
Definition: BlockHeaderV4.h:407
static const uint32_t EV_VERSION
Position of word for version of file format.
Definition: BlockHeaderV4.h:134
bool isLastBlock() override
Is this the last block in the file or being sent over the network?true if this is the last block in t...
Definition: BlockHeaderV4.h:346
size_t nextBufferStartingPosition() override
Determines where the start of the next block (record) header in some buffer is located (bytes)...
Definition: BlockHeaderV4.h:756
void setReserved2(uint32_t r2)
Sets the value of reserved2.
Definition: BlockHeaderV4.h:682
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
uint32_t getNumber() override
Get the block number for this block (record).In a file, this is usually sequential, starting at 1. the block number for this block (record).
Definition: BlockHeaderV4.h:279
ByteOrder & getByteOrder() override
Get the byte order of the data being read.byte order of the data being read.
Definition: BlockHeaderV4.h:709
uint32_t getReserved2() const
Get the 2nd reserved word.
Definition: BlockHeaderV4.h:675
static bool hasFirstEvent(uint32_t i)
Does this integer indicate that block has the first event (assuming it&#39;s the header&#39;s sixth word)...
Definition: BlockHeaderV4.h:399
static void setFirstEvent(std::bitset< 24 > &bSet)
Encode the &quot;is first event&quot; into the bit info word which will be in evio block header.
Definition: BlockHeaderV4.h:440
size_t getBufferEndingPosition() override
Get the position in the buffer (bytes) of this block&#39;s last data word. position in the buffer (bytes...
Definition: BlockHeaderV4.h:744
static uint32_t clearLastBlockBit(uint32_t i)
Clear the bit in the given arg to indicate it is NOT the last block.
Definition: BlockHeaderV4.h:387
static void unsetFirstEvent(std::bitset< 24 > &bSet)
Encode the &quot;is NOT first event&quot; into the bit info word which will be in evio block header...
Definition: BlockHeaderV4.h:452
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 th...
Definition: BlockHeaderV4.h:562
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.where the start of the first event in this block (record) is located (bytes). In evio format version 2, returns 0 if start is 0, signaling that this entire record is part of a logical record that spans at least three physical records.
Definition: BlockHeaderV4.h:760
static uint32_t clearFirstEventBit(uint32_t i)
Clear the bit in the given arg to indicate this block does NOT have a first event.
Definition: BlockHeaderV4.h:415
void setByteOrder(ByteOrder &order)
Sets the byte order of data being read.
Definition: BlockHeaderV4.h:716
Make a common interface for different versions of the BlockHeader arising from different evio version...
Definition: IBlockHeader.h:37
uint32_t getSixthWord()
Calculates the sixth word of this header which has the version number in the lowest 8 bits and the bi...
Definition: BlockHeaderV4.h:516
size_t remaining() const
Returns the number of bytes from the current position to the end of the data.
Definition: ByteBuffer.cpp:497
static bool isLastBlock(uint32_t i)
Does this integer indicate that this is the last block (assuming it&#39;s the header&#39;s sixth word)...
Definition: BlockHeaderV4.h:371
CompressionType
Enum of supported data compression types.
Definition: Compressor.h:65
static const uint32_t EV_LASTBLOCK_MASK
&quot;Last block&quot; is 10th bit in version/info word
Definition: BlockHeaderV4.h:115
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
uint32_t size
The block (physical record) size in 32 bit ints.
Definition: BlockHeaderV4.h:143
bool hasDictionary() override
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).
Definition: BlockHeaderV4.h:342
BlockHeaderV4(uint32_t sz, uint32_t num)
Creates a BlockHeader for evio version 4 format.
Definition: BlockHeaderV4.h:201
static const uint32_t HEADER_SIZE
The minimum and expected block header size in 32 bit ints.
Definition: BlockHeaderV4.h:109
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 ...
Definition: BlockHeaderV4.h:779
ByteBuffer & putInt(uint32_t val)
Relative put method for writing an int value.
Definition: ByteBuffer.cpp:1570
uint32_t getSourceId() override
Get the source ID number if in CODA online context and data is coming from ROC.source ID number if in...
Definition: BlockHeaderV4.h:654
int64_t bufferStartingPosition
This is not part of the block header proper.
Definition: BlockHeaderV4.h:179
void setMagicNumber(uint32_t magicNum)
Sets the value of magicNumber.
Definition: BlockHeaderV4.h:699
static const uint32_t EV_BLOCKSIZE
Position of word for size of block in 32-bit words.
Definition: BlockHeaderV4.h:124
static uint32_t setLastBlockBit(uint32_t i)
Set the bit in the given arg which indicates this is the last block.
Definition: BlockHeaderV4.h:379
size_t bytesRemaining(size_t position) override
Gives the bytes remaining in this block (record) given a buffer position.The position is an absolute ...
Definition: BlockHeaderV4.h:764
static const uint32_t EV_BLOCKNUM
Position of word for block number, starting at 1.
Definition: BlockHeaderV4.h:126
uint32_t number
The block number.
Definition: BlockHeaderV4.h:146
Exception class for Evio software package.
Definition: EvioException.h:29
void setEventCount(uint32_t count)
Set the number of events completely contained in the block.
Definition: BlockHeaderV4.h:269
uint32_t getReserved1() const
Get the first reserved word.
Definition: BlockHeaderV4.h:661
uint32_t getVersion() override
Get the evio version of the block (record) header.evio version of the block (record) header...
Definition: BlockHeaderV4.h:318
Definition: Compressor.h:66
uint32_t getHeaderLength() const
Get the block header length in ints.
Definition: BlockHeaderV4.h:295
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...
Definition: BlockHeaderV4.h:500
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 th...
Definition: BlockHeaderV4.h:536
static bool hasDictionary(uint32_t i)
Does this integer indicate that there is an evio dictionary (assuming it&#39;s the header&#39;s sixth word)...
Definition: BlockHeaderV4.h:338
uint32_t magicNumber
This is the magic word, 0xc0da0100, used to check endianness.
Definition: BlockHeaderV4.h:170
uint32_t getEventType() override
Get the type of events in block/record (see values of DataType.This is not supported by versions 1-3 ...
Definition: BlockHeaderV4.h:424
bool getBitInfo(uint32_t bitIndex)
Gets the value of a particular bit in the bitInfo field.
Definition: BlockHeaderV4.h:470
uint32_t getMagicNumber() override
Get the magic number the block (record) header which should be 0xc0da0100.magic number in the block (...
Definition: BlockHeaderV4.h:686
uint32_t eventCount
Since blocks only contain whole events in this version, this stores the number of events contained in...
Definition: BlockHeaderV4.h:155
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 th...
Definition: BlockHeaderV4.h:616
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...
Definition: BlockHeaderV4.h:593
static const uint32_t EV_DICTIONARY_MASK
Dictionary presence is 9th bit in version/info word.
Definition: BlockHeaderV4.h:112
void setHeaderLength(uint32_t len)
Set the block header length, in ints.
Definition: BlockHeaderV4.h:309
uint32_t reserved2
Value of second reserved word.
Definition: BlockHeaderV4.h:164
void parseToBitInfo(uint32_t word)
Parses the argument into the bit info fields.
Definition: BlockHeaderV4.h:643
bool isCompressed() override
Is this the data in this block compressed?true if the data in this block is compressed, else false.
Definition: BlockHeaderV4.h:350
static const uint32_t EV_COUNT
Position of word for number of events in block.
Definition: BlockHeaderV4.h:130
void setVersion(uint32_t ver)
Sets the evio version.
Definition: BlockHeaderV4.h:325
size_t getBufferStartingPosition() override
Get the starting position in the buffer (bytes) from which this header was read–if that happened...
Definition: BlockHeaderV4.h:748
std::string toString() override
Get the string representation of the block (record) header.string representation of the block (record...
Definition: BlockHeaderV4.h:720
void setBufferStartingPosition(size_t pos) override
Set the starting position in the buffer (bytes) from which this header was read–if that happened...
Definition: BlockHeaderV4.h:752
Compressor::CompressionType getCompressionType() override
Get the type of data compression used.type of data compression used.
Definition: BlockHeaderV4.h:354
This holds an evio block header, also known as a physical record header.
Definition: BlockHeaderV4.h:104
void setBit(uint32_t bitIndex, bool value)
Sets a particular bit in the bitInfo field.
Definition: BlockHeaderV4.h:483
void setReserved1(uint32_t r1)
Sets the value of reserved1.
Definition: BlockHeaderV4.h:668
uint32_t getSize() override
Get the size of the block (record) in 32 bit words.size of the block (record) in 32 bit words...
Definition: BlockHeaderV4.h:237
static const uint32_t EV_MAGIC
Position of word for magic number for endianness tracking.
Definition: BlockHeaderV4.h:138
BlockHeaderV4(std::shared_ptr< BlockHeaderV4 > &blkHeader)
This copy constructor creates an evio version 4 BlockHeader from another object of this class...
Definition: BlockHeaderV4.h:212
void setSize(uint32_t sz)
Set the size of the block (physical record).
Definition: BlockHeaderV4.h:245
static const uint32_t EV_HEADERSIZE
Position of word for size of header in 32-bit words (=8).
Definition: BlockHeaderV4.h:128
uint32_t version
The evio version, always 4.
Definition: BlockHeaderV4.h:158
ByteOrder byteOrder
This is the byte order of the data being read.
Definition: BlockHeaderV4.h:173
static const uint32_t EV_FIRSTEVENT_MASK
&quot;First event&quot; is 15th bit in version/info word
Definition: BlockHeaderV4.h:121
std::bitset< 24 > bitInfo
Bit information.
Definition: BlockHeaderV4.h:167
bool hasFirstEvent() override
Does this block/record contain the &quot;first event&quot; (first event to be written to each file split)...
Definition: BlockHeaderV4.h:329
void copy(std::shared_ptr< BlockHeaderV4 > &blkHeader)
This method copies another header&#39;s contents.
Definition: BlockHeaderV4.h:221
void setNumber(uint32_t num)
Set the block number for this block (physical record).
Definition: BlockHeaderV4.h:288
uint32_t headerLength
The block header length.
Definition: BlockHeaderV4.h:149
static const uint32_t EV_EVENTTYPE_MASK
&quot;Event type&quot; is 11-14th bits` in version/info word
Definition: BlockHeaderV4.h:118
uint32_t getEventCount() const
Get the number of events completely contained in the block.
Definition: BlockHeaderV4.h:259
std::bitset< 24 > getBitInfo()
Gets a copy of all stored bit information.
Definition: BlockHeaderV4.h:462
bool hasFirstEvent() const
Does this block contain the &quot;first event&quot; (first event to be written to each file split)...
Definition: BlockHeaderV4.h:362
static const uint32_t EV_RESERVED2
Position of word for reserved.
Definition: BlockHeaderV4.h:136
BlockHeaderV4()=default
Constructor initializes all fields to default values.
uint32_t getHeaderWords() override
Get the block (record) header length, in 32 bit words.block (record) header length, in 32 bit words.
Definition: BlockHeaderV4.h:299
static const ByteOrder ENDIAN_LOCAL
Local host&#39;s byte order.
Definition: ByteOrder.h:61
static const uint32_t MAGIC_NUMBER
The magic number, should be the value of magicNumber.
Definition: IBlockHeader.h:42
uint32_t reserved1
Value of first reserved word.
Definition: BlockHeaderV4.h:161
static const uint32_t EV_RESERVED1
Position of word for reserved.
Definition: BlockHeaderV4.h:132