-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileSinkHeader.h
49 lines (40 loc) · 1.56 KB
/
FileSinkHeader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef FileSinkHeader_h
#define FileSinkHeader_h
#include <ctime>
#include <cstdint>
#pragma pack(4)
namespace FileSinkHeader {
namespace v0 {
constexpr uint64_t MAGIC = {0x444145482d534640}; /* "@FS-HEAD" */
struct Header { /* Total size: 304 bytes */
uint64_t magic {MAGIC}; /* 64 bits = 8 bytes */
uint64_t size {0}; /* 64 bits = 8 bytes */
uint64_t fairMQDeviceType {0}; /* 64 bits = 8 bytes */
uint64_t runNumber {0}; /* 64 bits = 8 bytes */
time_t startUnixtime {0}; /* 64 bits = 8 bytes */
time_t stopUnixtime {0}; /* 64 bits = 8 bytes */
char comments[256]; /* 8 bits x 256 = 256 bytes*/
};
} //namespace v0
inline namespace v1 {
constexpr uint64_t MAGIC = {0x004b4e53454c4946}; /* "FILESNK " */
struct Header { /* Total size: 304 bytes */
uint64_t magic {MAGIC}; /* 64 bits = 8 bytes */
union {
uint64_t size ; /* 64 bits = 8 bytes */
struct {
uint32_t length {0x130};
uint16_t hLength {0x130};
uint16_t type {0};
};
};
uint64_t fairMQDeviceType {0}; /* 64 bits = 8 bytes */
uint64_t runNumber {0}; /* 64 bits = 8 bytes */
time_t startUnixtime {0}; /* 64 bits = 8 bytes */
time_t stopUnixtime {0}; /* 64 bits = 8 bytes */
char comments[256]; /* 8 bits x 256 = 256 bytes*/
};
} //namespace v0
} //namespace FileSinkHeader
#pragma pack()
#endif