evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BankHeader.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_BANKHEADER_H
12 #define EVIO_6_0_BANKHEADER_H
13 
14 
15 #include "Util.h"
16 #include "DataType.h"
17 #include "ByteOrder.h"
18 #include "ByteBuffer.h"
19 #include "BaseStructureHeader.h"
20 
21 
22 namespace evio {
23 
24 
36 
37  friend class EvioReader;
38 
39  public:
40 
41  BankHeader() = default;
42  BankHeader(uint16_t tag, DataType const & dataType, uint8_t num = 0);
43 
44  uint32_t getDataLength() override;
45  uint32_t getHeaderLength() override;
46  std::string toString() override;
47 
48  size_t write(std::shared_ptr<ByteBuffer> & dest) override ;
49  size_t write(ByteBuffer & dest) override;
50  size_t write(uint8_t *dest, ByteOrder const & order) override;
51  };
52 
53 }
54 
55 
56 #endif //EVIO_6_0_BANKHEADER_H
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
std::string toString() override
Obtain a string representation of the bank header.
Definition: BankHeader.cpp:93
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
uint32_t tag
The structure tag.
Definition: BaseStructureHeader.h:57
This the header for an evio bank structure (EvioBank).
Definition: BankHeader.h:35
This the header for the base structure (BaseStructure).
Definition: BaseStructureHeader.h:39
BankHeader()=default
Numerical values associated with evio data types.
Definition: DataType.h:32
uint32_t getHeaderLength() override
Get the length of the structure&#39;s header in ints.
Definition: BankHeader.cpp:39
DataType dataType
The data type of the structure.
Definition: BaseStructureHeader.h:60
size_t write(std::shared_ptr< ByteBuffer > &dest) override
Write myself out a byte buffer.
Definition: BankHeader.cpp:68
uint32_t getDataLength() override
Get the length of the structure&#39;s data in 32 bit ints (not counting the header words).
Definition: BankHeader.cpp:31
This is a class of interest to the user.
Definition: EvioReader.h:52