evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TagSegmentHeader.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_TAGSEGMENTHEADER_H
12 #define EVIO_6_0_TAGSEGMENTHEADER_H
13 
14 
15 #include <memory>
16 
17 
18 #include "Util.h"
19 #include "DataType.h"
20 #include "ByteOrder.h"
21 #include "ByteBuffer.h"
22 #include "BaseStructureHeader.h"
23 
24 
25 namespace evio {
26 
37 
38  public:
39 
40  TagSegmentHeader() = default;
41  TagSegmentHeader(uint16_t tag, DataType const & dataType);
42  TagSegmentHeader(uint16_t tag, std::string const & format);
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_TAGSEGMENTHEADER_H
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
uint32_t getHeaderLength() override
Get the length of the structure&#39;s header in ints.
Definition: TagSegmentHeader.cpp:50
This the header for an evio tagsegment structure (EvioTagSegment).
Definition: TagSegmentHeader.h:36
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
uint32_t tag
The structure tag.
Definition: BaseStructureHeader.h:57
uint32_t getDataLength() override
Get the length of the structure&#39;s data in 32 bit ints (not counting the header words).
Definition: TagSegmentHeader.cpp:42
std::string toString() override
Obtain a string representation of the tagsegment header.
Definition: TagSegmentHeader.cpp:97
This the header for the base structure (BaseStructure).
Definition: BaseStructureHeader.h:39
Numerical values associated with evio data types.
Definition: DataType.h:32
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: TagSegmentHeader.cpp:75