Project
Loading...
Searching...
No Matches
CompressedDataFormat.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef O2_TOF_COMPRESSEDDATAFORMAT
18#define O2_TOF_COMPRESSEDDATAFORMAT
19
20#include <cstdint>
21
22namespace o2
23{
24namespace tof
25{
26namespace compressed
27{
28
29struct Word_t {
30 uint32_t undefined : 31;
31 uint32_t wordType : 1;
32};
33
35 uint32_t bunchID : 12;
36 uint32_t slotPartMask : 11;
37 uint32_t undefined : 1;
38 uint32_t drmID : 7;
39 uint32_t mustBeOne : 1;
40 static const uint32_t slotEnableMask = 0x0; // deprecated
41};
42
44 uint32_t orbitID : 32;
45};
46
48 uint32_t numberOfHits : 16;
49 uint32_t frameID : 8;
50 uint32_t trmID : 4;
51 uint32_t deltaBC : 3;
52 uint32_t mustBeZero : 1;
53};
54
56 uint32_t tot : 11;
57 uint32_t time : 13;
58 uint32_t channel : 3;
59 uint32_t tdcID : 4;
60 uint32_t chain : 1;
61};
62
64 uint32_t numberOfDiagnostics : 4;
65 uint32_t eventCounter : 12;
66 uint32_t numberOfErrors : 9;
67 uint32_t undefined : 15;
68 uint32_t mustBeOne : 1;
69};
70
72 uint32_t slotID : 4;
73 uint32_t faultBits : 28;
74};
75
76struct Error_t {
77 uint32_t errorFlags : 15;
78 uint32_t undefined : 4;
79 uint32_t slotID : 4;
80 uint32_t chain : 1;
81 uint32_t tdcID : 4;
82 uint32_t mustBeSix : 4;
83};
84
96
97} // namespace compressed
98
99namespace diagnostic
100{
101
118
119static const char* DRMDiagnosticName[32] = {
120 "DRM_HAS_DATA",
121 "",
122 "",
123 "",
124 "DRM_HEADER_MISSING",
125 "DRM_TRAILER_MISSING",
126 "DRM_FEEID_MISMATCH",
127 "DRM_ORBIT_MISMATCH",
128 "DRM_CRC_MISMATCH",
129 "DRM_ENAPARTMASK_DIFFER",
130 "DRM_CLOCKSTATUS_WRONG",
131 "DRM_FAULTSLOTMASK_NOTZERO",
132 "DRM_READOUTTIMEOUT_NOTZERO",
133 "DRM_EVENTWORDS_MISMATCH",
134 "DRM_DIAGNOSTIC_SPARE1",
135 "DRM_DECODE_ERROR"};
136
139 LTM_HEADER_MISSING = 1 << 4, // start from BIT(4)
143 LTM_MAXDIAGNOSTIC_BIT = 1 << 16 // end before BIT(16)
145
146static const char* LTMDiagnosticName[32] = {
147 "LTM_HAS_DATA",
148 "",
149 "",
150 "",
151 "LTM_HEADER_MISSING",
152 "LTM_TRAILER_MISSING",
153 "LTM_DIAGNOSTIC_SPARE1",
154 "LTM_HEADER_UNEXPECTED"};
155
173
186
187static const char* TRMDiagnosticName[32] = {
188 "TRM_HAS_DATA",
189 "",
190 "",
191 "",
192 "TRM_HEADER_MISSING",
193 "TRM_TRAILER_MISSING",
194 "TRM_CRC_MISMATCH",
195 "TRM_HEADER_UNEXPECTED",
196 "TRM_EVENTCNT_MISMATCH",
197 "TRM_EMPTYBIT_NOTZERO",
198 "TRM_LBIT_NOTZERO",
199 "TRM_FAULTSLOTBIT_NOTZERO",
200 "TRM_EVENTWORDS_MISMATCH",
201 "TRM_DIAGNOSTIC_SPARE1",
202 "TRM_DIAGNOSTIC_SPARE2",
203 "TRM_DECODE_ERROR",
204 "TRM_CHAIN_A_HEADER_MISSING",
205 "TRM_CHAIN_A_TRAILER_MISSING",
206 "TRM_CHAIN_A_STATUS_NOTZERO",
207 "TRM_CHAIN_A_EVENTCNT_MISMATCH",
208 "TRM_CHAIN_A_TDCERROR_DETECTED",
209 "TRM_CHAIN_A_BUNCHCNT_MISMATCH",
210 "TRM_CHAIN_A_DIAGNOSTIC_SPARE1",
211 "TRM_CHAIN_A_DIAGNOSTIC_SPARE2",
212 "TRM_CHAIN_B_HEADER_MISSING",
213 "TRM_CHAIN_B_TRAILER_MISSING",
214 "TRM_CHAIN_B_STATUS_NOTZERO",
215 "TRM_CHAIN_B_EVENTCNT_MISMATCH",
216 "TRM_CHAIN_B_TDCERROR_DETECTED",
217 "TRM_CHAIN_B_BUNCHCNT_MISMATCH",
218 "TRM_CHAIN_B_DIAGNOSTIC_SPARE1",
219 "TRM_CHAIN_B_DIAGNOSTIC_SPARE2"};
220
221} // namespace diagnostic
222
223} // namespace tof
224} // namespace o2
225
226#endif
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...