CbmRoot
gDpbMessv100.h
Go to the documentation of this file.
1 #ifndef GDPB_MESS_V1_00_DEF_H
2 #define GDPB_MESS_V1_00_DEF_H
3 
4 #include <iostream>
5 #include <stdint.h>
6 
7 namespace gdpbv100 {
8  // Size of one clock cycle (=1 coarse bin)
9  const double kdClockCycleSize = 6250.0; //[ps]
10  const double kdClockCycleSizeNs = kdClockCycleSize / 1000.0; //[ns]
11  // TODO:For now make 100ps default, maybe need later an option for it
12  const double kdTotBinSize = 50.0; //ps
13 
14  const uint32_t kuFineTime = 0x0000007F; // Fine Counter value
15  const uint32_t kuFtShift = 0; // Fine Counter offset
16  const uint32_t kuCoarseTime = 0x0007FF80; // Coarse Counter value
17  const uint32_t kuCtShift = 7; // Coarse Counter offset
18  const uint32_t kuCtSize = 12; // Coarse Counter size in bits
19 
20  const uint32_t kuFineCounterSize = ((kuFineTime >> kuFtShift) + 1);
21  const uint32_t kuCoarseCounterSize = ((kuCoarseTime >> kuCtShift) + 1);
22  const uint32_t kuCoarseOverflowTest =
23  kuCoarseCounterSize / 2; // Limit for overflow check
24  const uint32_t kuTotCounterSize = 256;
25 
26  const double kdFtSize = kuFineCounterSize;
27  const double kdFtBinsNb = 112.;
28 
29  // Nominal bin size of NL are neglected
31  // Epoch Size in bins
33  // Epoch Size in ps
34  // alternatively: (kiCoarseTime>>kiCtShift + 1)*kdClockCycleSize
35  const double kdEpochInPs =
36  static_cast<double>(kuCoarseCounterSize) * kdClockCycleSize;
37  const double kdEpochInNs = kdEpochInPs / 1000.0;
38 
39  // Epoch counter size in epoch
40  const uint32_t kuEpochCounterSz = 0x7FFFFFFF;
41  // Epoch counter size in bin
42  const uint64_t kulEpochCycleBins =
43  static_cast<uint64_t>(kuEpochCounterSz + 1) * kuEpochInBins;
44  // Epoch counter size in s
45  const double kdEpochCycleInS =
46  static_cast<double>(kuEpochCounterSz + 1) * (kdEpochInNs / 1e9);
47 
48  // Epoch Cycle MS start message size in bits
49  const uint64_t kulEpochCycleFieldSz = 0x1FFFFF; // 21 bits
50 
51  const uint32_t kuChipIdMergedEpoch = 255; // 0xFF
52 
53  const uint32_t kuFeePulserChannel =
54  3; // Channel where a pulser can be set ON at 20 ns 500 Hz
55  const uint32_t kuFeePulserChannelDiam =
56  0; // Channel where a pulser can be set ON at 20 ns 500 Hz
57 
58  enum MessageTypes {
59  MSG_HIT = 0,
60  MSG_EPOCH = 1,
61  MSG_SLOWC = 2,
62  MSG_SYST = 3,
66  MSG_STAR_TRI_D = 7
67  };
68 
70  SYS_GET4_ERROR = 0, // GET4 error event
72  1, // Raw data from gDPB in case of unknown message type from GET4
74  2, // Added when GET4 is missing the SYNC flag when it is expected
75  // SYS_SYNC_ERROR = 3 // added to data stream when the closy-sync-strobe does not match the gDPB 160MHz timestamp counter
76  SYS_PATTERN =
77  3 // added to data stream when one of the ASIC patterns (missmatch, enable, resync) changed
78  };
79 
81  PATT_MISSMATCH = 0, // Missmatch pattern, 1 bit per ASIC
82  PATT_ENABLE = 1, // Enable pattern, 1 bit per ASIC
83  PATT_RESYNC = 2, // Resync request pattern, 1 bit per ASIC
84  PATT_STATUS = 3 // Status pattern, 1 bit per ASIC (SW only)
85  };
86 
91  msg_print_Human = 8
92  };
93 
97  msg_print_File = 3
98  };
99 
105  };
106 
122  0x11, // Not there anymore in manual for Get4 v2.00?
129  0x17, // New in manual for Get4 v2.00, no description?
130  GET4_V2X_ERR_UNKNOWN = 0x7F
131  };
132 
133  class Message {
134 
135  protected:
136  uint64_t data; // main and only storage field for the message
137 
138  public:
139  Message() : data(0) {}
140 
141  Message(const Message& src) : data(src.data) {}
142 
143  Message(uint64_t dataIn) : data(dataIn) {}
144 
145  ~Message() {};
146 
147  void assign(const Message& src) { data = src.data; }
148 
149  Message& operator=(const Message& src) {
150  assign(src);
151  return *this;
152  }
153 
154  inline void reset() { data = 0; }
155 
156  inline uint64_t getData() const { return data; }
157  inline void setData(uint64_t value) { data = value; }
158 
159  inline uint64_t getFieldLong(uint32_t shift, uint32_t len) const {
160  return (data >> shift) & (((static_cast<uint64_t>(1)) << len) - 1);
161  }
162 
163  inline uint32_t getField(uint32_t shift, uint32_t len) const {
164  return (data >> shift) & (((static_cast<uint64_t>(1)) << len) - 1);
165  }
166 
167  inline void setField(uint32_t shift, uint32_t len, uint32_t value) {
168  uint64_t mask = (((static_cast<uint64_t>(1)) << len) - 1);
169  data = (data & ~(mask << shift))
170  | ((static_cast<uint64_t>(value) & mask) << shift);
171  }
172 
173  inline void setFieldLong(uint32_t shift, uint32_t len, uint64_t value) {
174  uint64_t mask = (((static_cast<uint64_t>(1)) << len) - 1);
175  data = (data & ~(mask << shift)) | ((value & mask) << shift);
176  }
177 
178  inline uint8_t getBit(uint32_t shift) const { return (data >> shift) & 1; }
179 
180  inline void setBit(uint32_t shift, uint8_t value) {
181  data = value ? (data | ((static_cast<uint64_t>(1)) << shift))
182  : (data & ~((static_cast<uint64_t>(1)) << shift));
183  }
184 
185 
186  inline uint32_t getFieldBE(uint32_t shift, uint32_t len) const {
187  return (dataBE() >> shift) & (((static_cast<uint32_t>(1)) << len) - 1);
188  }
189  inline uint8_t getBitBE(uint32_t shift) const {
190  return (dataBE() >> shift) & 1;
191  }
192  inline uint64_t dataBE() const {
193  return ((data & 0x00000000000000FF) << 56)
194  + ((data & 0x000000000000FF00) << 40)
195  + ((data & 0x0000000000FF0000) << 24)
196  + ((data & 0x00000000FF000000) << 8)
197  + ((data >> 8) & 0x00000000FF000000)
198  + ((data >> 24) & 0x0000000000FF0000)
199  + ((data >> 40) & 0x000000000000FF00)
200  + ((data >> 56) & 0x00000000000000FF);
201  }
202 
203  // --------------------------- common fields ---------------------------------
204 
206  inline uint8_t getMessageType() const { return getField(0, 3); }
207 
209  inline void setMessageType(uint8_t v) { setField(0, 3, v); }
210 
211  // ---------- Get4 gDPB 24b/32b ALL access methods ------------------------
212  inline uint16_t getGdpbGenGdpbId() const { return getField(48, 16); }
213  inline void setGdpbGenGdpbId(uint32_t v) { setField(48, 16, v); }
214  inline uint16_t getGdpbGenChipId() const { return getField(40, 8); }
215  inline void setGdpbGenChipId(uint32_t v) { setField(40, 8, v); }
216 
217  // ---------- Get4 gDPB 24b/32b Hit access methods ------------------------
218  inline uint16_t getGdpbHitIs24b() const { return getBit(39); }
219  inline uint16_t getGdpbHitChanId() const { return getField(32, 2); }
220  inline uint32_t getGdpbHitFullTs() const { return getField(13, 19); }
221  inline uint16_t getGdpbHitCoarse() const { return getField(20, 12); }
222  inline uint16_t getGdpbHitFineTs() const { return getField(13, 7); }
223  // ---------- Get4 gDPB 24b Hit access methods ----------------------------
224  inline bool getGdpbHit24Edge() const { return getBit(34); }
225  // ---------- Get4 gDPB 32b Hit access methods ----------------------------
226  inline bool getGdpbHit32DllLck() const { return getBit(12); }
227  inline uint16_t getGdpbHit32Tot() const { return getField(4, 8); }
228 
229  // ---------- Get4 gDPB 24b/32b Epoch access methods ----------------------
230  inline bool getGdpbEpLinkId() const { return getBit(39); }
231  inline uint32_t getGdpbEpEpochNb() const { return getField(8, 31); }
232  inline bool getGdpbEpSync() const { return getBit(7); }
233  inline bool getGdpbEpDataLoss() const { return getBit(6); }
234  inline bool getGdpbEpEpochLoss() const { return getBit(5); }
235  inline bool getGdpbEpMissmatch() const { return getBit(4); }
236 
237  // ---------- Get4 gDPB 24b/32b Slow cont. access methods -----------------
238  inline uint32_t getGdpbSlcMess() const { return getField(4, 29); }
239  inline uint32_t getGdpbSlcChan() const { return getField(31, 2); }
240  inline uint32_t getGdpbSlcEdge() const { return getBit(30); }
241  inline uint32_t getGdpbSlcType() const { return getField(28, 2); }
242  inline uint32_t getGdpbSlcData() const { return getField(4, 24); }
243 
244  // ---------- Get4 gDPB System Msg access methods -------------------------
245  inline uint16_t getGdpbSysSubType() const { return getField(38, 2); }
246  inline bool getGdpbSysLinkId() const { return getBit(37); }
247  // ---------- Get4 gDPB 24b/32b Errors access methods ---------------------
248  inline bool getGdpbSysErrRoType() const { return getBit(36); }
249  inline uint16_t getGdpbSysErrUnused() const { return getField(32, 4); }
250  inline uint16_t getGdpbSysErrInfo() const { return getField(11, 21); }
251  inline uint16_t getGdpbSysErrChanId() const { return getField(12, 2); }
252  inline bool getGdpbSysErrEdge() const { return getBit(11); }
253  inline uint16_t getGdpbSysErrData() const { return getField(4, 7); }
254  // ---------- Get4 gDPB unknown msg type access methods -------------------
255  inline uint32_t getGdpbSysUnkwData() const { return getField(4, 32); }
256  // ---------- FW error msg type access methods ----------------------------
257  inline uint32_t getGdpbSysFwErrResync() const { return getBit(36); }
258  // ---------- ASIC Pattern messages access methods ------------------------
259  inline uint16_t getGdpbSysPattType() const { return getField(46, 2); }
260  inline uint16_t getGdpbSysPattIndex() const { return getField(40, 4); }
261  inline uint32_t getGdpbSysPattPattern() const { return getField(4, 32); }
262 
263  // ---------- STAR Trigger messages access methods ------------------------
264  inline uint16_t getStarTrigMsgIndex() const { return getField(0, 2); }
265  //++++//
266  inline uint64_t getGdpbTsMsbStarA() const { return getFieldLong(4, 40); }
267  //++++//
268  inline uint64_t getGdpbTsLsbStarB() const { return getFieldLong(20, 24); }
269  inline uint64_t getStarTsMsbStarB() const { return getFieldLong(4, 16); }
270  //++++//
271  inline uint64_t getStarTsMidStarC() const { return getFieldLong(4, 40); }
272  //++++//
273  inline uint64_t getStarTsLsbStarD() const { return getFieldLong(36, 8); }
275  inline uint32_t getStarFillerD() const {
276  return getField(24, 12);
277  } // Should be always 0
278  inline uint32_t getStarTrigCmdStarD() const { return getField(20, 4); }
279  inline uint32_t getStarDaqCmdStarD() const { return getField(16, 4); }
280  inline uint32_t getStarTokenStarD() const { return getField(4, 12); }
281 
282  // ---------- Get4 gDPB 24b/32b Epoch setter methods ----------------------
283  inline void setGdpbEpEpochNb(uint32_t v) { setField(8, 31, v); }
284 
285  // ---------- Get4 gDPB System Msg access methods -------------------------
286  inline void setGdpbSysSubType(uint16_t v) { setField(38, 2, v); }
287  // ---------- ASIC Pattern messages access methods ------------------------
288  inline void setGdpbSysPattType(uint16_t v) { setField(46, 2, v); }
289  inline void setGdpbSysPattIndex(uint16_t v) { setField(40, 4, v); }
290  inline void setGdpbSysPattPattern(uint32_t v) { setField(4, 32, v); }
291 
292  // ---------- STAR Trigger messages setter methods ------------------------
293  inline void setStarTrigMsgIndex(uint8_t v) { setField(0, 2, v); }
294  //++++//
295  inline void setGdpbTsMsbStarA(uint64_t fullGdpbTs) {
296  setFieldLong(4, 40, (fullGdpbTs >> 24));
297  }
298  //++++//
299  inline void setGdpbTsLsbStarB(uint64_t fullGdpbTs) {
300  setFieldLong(20, 24, (fullGdpbTs));
301  }
302  inline void setStarTsMsbStarB(uint64_t fullStarTs) {
303  setFieldLong(4, 16, (fullStarTs >> 48));
304  }
305  //++++//
306  inline void setStarTsMidStarC(uint64_t fullStarTs) {
307  setFieldLong(4, 40, (fullStarTs >> 8));
308  }
309  //++++//
310  inline void setStarTsLsbStarD(uint64_t fullStarTs) {
311  setFieldLong(36, 8, (fullStarTs));
312  }
314  inline void setStarFillerD() { setField(24, 12, 0); } // Should be always 0
315  inline void setStarTrigCmdStarD(uint8_t v) { setField(20, 4, v); }
316  inline void setStarDaqCmdStarD(uint8_t v) { setField(16, 4, v); }
317  inline void setStarTokenStarD(uint16_t v) { setField(4, 12, v); }
318 
319  // ---------- Common functions -----------------------
321  inline bool isHitMsg() const { return getMessageType() == MSG_HIT; }
323  inline bool isEpochMsg() const { return getMessageType() == MSG_EPOCH; }
325  inline bool isGet4SlCtrMsg() const { return getMessageType() == MSG_SLOWC; }
327  inline bool isSysMsg() const { return getMessageType() == MSG_SYST; }
329  inline bool isStarTrigger() const {
330  return MSG_STAR_TRI_A <= getMessageType();
331  }
332 
333  void printDataCout(unsigned kind = msg_print_Prefix | msg_print_Data,
334  uint32_t epoch = 0) const;
335  void printDataLog(unsigned kind = msg_print_Prefix | msg_print_Data,
336  uint32_t epoch = 0) const;
337 
338  void printData(unsigned outType = msg_print_Cout,
339  unsigned kind = msg_print_Human,
340  uint32_t epoch = 0,
341  std::ostream& os = std::cout) const;
342 
343  uint64_t getMsgFullTime(uint64_t epoch) const;
344 
345  double getMsgFullTimeD(uint64_t epoch) const;
346 
348  inline static uint64_t FullTimeStamp(uint64_t epoch, uint32_t ts) {
349  return (epoch << 19) | (ts & 0x7ffff);
350  }
351 
352 
353  static uint64_t CalcDistance(uint64_t start, uint64_t stop);
354 
355  static double CalcDistanceD(double start, double stop);
356 
357  bool operator<(const gdpbv100::Message& other) const;
358  bool operator==(const gdpbv100::Message& other) const;
359  bool operator!=(const gdpbv100::Message& other) const;
360  };
361 
362  class FullMessage : public Message {
363  protected:
364  uint64_t
365  fulExtendedEpoch; // Epoch of the message, extended with 32b epoch cycle counter
366 
367  public:
369 
370  FullMessage(const Message& src, uint64_t uEpIn = 0)
371  : Message(src), fulExtendedEpoch(uEpIn) {}
372 
375 
376  void assign(const FullMessage& src) {
377  Message::assign(src);
379  }
380 
382  assign(src);
383  return *this;
384  }
385 
386  bool operator<(const FullMessage& other) const;
387 
388  inline void reset() {
389  Message::reset();
390  fulExtendedEpoch = 0;
391  }
392 
393  inline uint64_t getExtendedEpoch() const { return fulExtendedEpoch; }
394 
395  inline double GetFullTimeNs() const {
397  }
398 
399  void PrintMessage(unsigned outType = msg_print_Cout,
400  unsigned kind = msg_print_Human) const;
401  };
402 
403 } // namespace gdpbv100
404 
405 
406 #endif // GDPB_MESS_V1_00_DEF_H
gdpbv100::Message::getStarTrigCmdStarD
uint32_t getStarTrigCmdStarD() const
Definition: gDpbMessv100.h:278
gdpbv100::MSG_STAR_TRI_A
@ MSG_STAR_TRI_A
Definition: gDpbMessv100.h:63
gdpbv100::Message
Definition: gDpbMessv100.h:133
gdpbv100::Message::setFieldLong
void setFieldLong(uint32_t shift, uint32_t len, uint64_t value)
Definition: gDpbMessv100.h:173
gdpbv100::Message::getGdpbSlcType
uint32_t getGdpbSlcType() const
Definition: gDpbMessv100.h:241
gdpbv100::kuTotCounterSize
const uint32_t kuTotCounterSize
Definition: gDpbMessv100.h:24
gdpbv100::Message::CalcDistance
static uint64_t CalcDistance(uint64_t start, uint64_t stop)
Returns the time difference between two expanded time stamps.
Definition: gDpbMessv100.cxx:136
gdpbv100::Message::getMsgFullTimeD
double getMsgFullTimeD(uint64_t epoch) const
Returns expanded and adjusted time of message in double (in ns)
Definition: gDpbMessv100.cxx:103
gdpbv100::Message::getGdpbSysErrChanId
uint16_t getGdpbSysErrChanId() const
Definition: gDpbMessv100.h:251
gdpbv100::Message::setMessageType
void setMessageType(uint8_t v)
Sets the message type field in the current message.
Definition: gDpbMessv100.h:209
gdpbv100::kdClockCycleSizeNs
const double kdClockCycleSizeNs
Definition: gDpbMessv100.h:10
gdpbv100::Message::getGdpbTsMsbStarA
uint64_t getGdpbTsMsbStarA() const
Definition: gDpbMessv100.h:266
gdpbv100::PattMessageTypes
PattMessageTypes
Definition: gDpbMessv100.h:80
gdpbv100::Message::getGdpbEpEpochNb
uint32_t getGdpbEpEpochNb() const
Definition: gDpbMessv100.h:231
gdpbv100::FullMessage::assign
void assign(const FullMessage &src)
Definition: gDpbMessv100.h:376
gdpbv100::msg_print_Hex
@ msg_print_Hex
Definition: gDpbMessv100.h:90
gdpbv100::FullMessage::GetFullTimeNs
double GetFullTimeNs() const
Definition: gDpbMessv100.h:395
gdpbv100::Message::operator=
Message & operator=(const Message &src)
Definition: gDpbMessv100.h:149
gdpbv100::kuCoarseOverflowTest
const uint32_t kuCoarseOverflowTest
Definition: gDpbMessv100.h:22
gdpbv100::GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_TOT_OVERWRT
Definition: gDpbMessv100.h:121
gdpbv100::Message::operator!=
bool operator!=(const gdpbv100::Message &other) const
inequality operator, assumes same epoch for both messages
Definition: gDpbMessv100.cxx:93
gdpbv100::Get4Message32bSlC
Get4Message32bSlC
Definition: gDpbMessv100.h:100
gdpbv100::kdFtSize
const double kdFtSize
Definition: gDpbMessv100.h:26
gdpbv100::msg_print_Cout
@ msg_print_Cout
Definition: gDpbMessv100.h:95
gdpbv100::Message::getStarFillerD
uint32_t getStarFillerD() const
12 bits in between are set to 0
Definition: gDpbMessv100.h:275
gdpbv100::Message::getGdpbSlcChan
uint32_t getGdpbSlcChan() const
Definition: gDpbMessv100.h:239
gdpbv100::Message::isSysMsg
bool isSysMsg() const
Returns true is message type is MSG_SYST (system message)
Definition: gDpbMessv100.h:327
gdpbv100::Message::getGdpbEpSync
bool getGdpbEpSync() const
Definition: gDpbMessv100.h:232
gdpbv100::Message::Message
Message()
Definition: gDpbMessv100.h:139
gdpbv100::SYS_GET4_ERROR
@ SYS_GET4_ERROR
Definition: gDpbMessv100.h:70
gdpbv100::msg_print_Human
@ msg_print_Human
Definition: gDpbMessv100.h:91
gdpbv100::kdTotBinSize
const double kdTotBinSize
Definition: gDpbMessv100.h:12
gdpbv100::Message::printDataLog
void printDataLog(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to the Fairroot logger.
Definition: gDpbMessv100.cxx:185
gdpbv100::MSG_HIT
@ MSG_HIT
Definition: gDpbMessv100.h:59
gdpbv100::Message::getGdpbGenGdpbId
uint16_t getGdpbGenGdpbId() const
Definition: gDpbMessv100.h:212
gdpbv100::Message::getGdpbSysPattType
uint16_t getGdpbSysPattType() const
Definition: gDpbMessv100.h:259
gdpbv100::MSG_SLOWC
@ MSG_SLOWC
Definition: gDpbMessv100.h:61
gdpbv100::Message::setGdpbGenChipId
void setGdpbGenChipId(uint32_t v)
Definition: gDpbMessv100.h:215
gdpbv100::kuCoarseTime
const uint32_t kuCoarseTime
Definition: gDpbMessv100.h:16
gdpbv100::SysMessageTypes
SysMessageTypes
Definition: gDpbMessv100.h:69
gdpbv100::msg_print_FairLog
@ msg_print_FairLog
Definition: gDpbMessv100.h:96
gdpbv100::FullMessage::getExtendedEpoch
uint64_t getExtendedEpoch() const
Definition: gDpbMessv100.h:393
gdpbv100::Message::printDataCout
void printDataCout(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to cout.
Definition: gDpbMessv100.cxx:172
gdpbv100::Message::getMessageType
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 4 bit.
Definition: gDpbMessv100.h:206
gdpbv100::MSG_STAR_TRI_D
@ MSG_STAR_TRI_D
Definition: gDpbMessv100.h:66
gdpbv100::Message::isEpochMsg
bool isEpochMsg() const
Returns true is message type is MSG_EPOCH (epoch2 marker)
Definition: gDpbMessv100.h:323
gdpbv100::Message::getBitBE
uint8_t getBitBE(uint32_t shift) const
Definition: gDpbMessv100.h:189
gdpbv100::Message::getGdpbSlcMess
uint32_t getGdpbSlcMess() const
Definition: gDpbMessv100.h:238
gdpbv100::GET4_32B_SLC_START_SEU
@ GET4_32B_SLC_START_SEU
Definition: gDpbMessv100.h:104
gdpbv100::Message::getGdpbSysSubType
uint16_t getGdpbSysSubType() const
Definition: gDpbMessv100.h:245
gdpbv100::FullMessage::FullMessage
FullMessage(const Message &src, uint64_t uEpIn=0)
Definition: gDpbMessv100.h:370
gdpbv100::Message::setGdpbEpEpochNb
void setGdpbEpEpochNb(uint32_t v)
Definition: gDpbMessv100.h:283
gdpbv100::Message::setGdpbGenGdpbId
void setGdpbGenGdpbId(uint32_t v)
Definition: gDpbMessv100.h:213
gdpbv100::kuCtShift
const uint32_t kuCtShift
Definition: gDpbMessv100.h:17
gdpbv100::kdEpochInNs
const double kdEpochInNs
Definition: gDpbMessv100.h:37
gdpbv100::GET4_V2X_ERR_TOKEN
@ GET4_V2X_ERR_TOKEN
Definition: gDpbMessv100.h:116
gdpbv100::Message::Message
Message(const Message &src)
Definition: gDpbMessv100.h:141
gdpbv100::GET4_V2X_ERR_CHAN_STATE
@ GET4_V2X_ERR_CHAN_STATE
Definition: gDpbMessv100.h:114
gdpbv100::kuEpochCounterSz
const uint32_t kuEpochCounterSz
Definition: gDpbMessv100.h:40
gdpbv100::Message::operator<
bool operator<(const gdpbv100::Message &other) const
strict weak ordering operator, assumes same epoch for both messages
Definition: gDpbMessv100.cxx:56
gdpbv100::Message::isStarTrigger
bool isStarTrigger() const
Returns true is message type is MSG_STAR_TRI_A, _B, _C, _D (STAR Trigger message)
Definition: gDpbMessv100.h:329
gdpbv100::kdClockCycleSize
const double kdClockCycleSize
Definition: gDpbMessv100.h:9
gdpbv100::Message::setStarTrigCmdStarD
void setStarTrigCmdStarD(uint8_t v)
Definition: gDpbMessv100.h:315
gdpbv100::Message::getGdpbSysErrData
uint16_t getGdpbSysErrData() const
Definition: gDpbMessv100.h:253
gdpbv100::Message::getGdpbSysPattIndex
uint16_t getGdpbSysPattIndex() const
Definition: gDpbMessv100.h:260
gdpbv100::kdEpochInPs
const double kdEpochInPs
Definition: gDpbMessv100.h:35
gdpbv100::msg_print_Data
@ msg_print_Data
Definition: gDpbMessv100.h:89
gdpbv100::Message::setData
void setData(uint64_t value)
Definition: gDpbMessv100.h:157
gdpbv100::Message::setStarTrigMsgIndex
void setStarTrigMsgIndex(uint8_t v)
Definition: gDpbMessv100.h:293
gdpbv100::Message::dataBE
uint64_t dataBE() const
Definition: gDpbMessv100.h:192
gdpbv100::Message::getGdpbEpLinkId
bool getGdpbEpLinkId() const
Definition: gDpbMessv100.h:230
gdpbv100::kdEpochCycleInS
const double kdEpochCycleInS
Definition: gDpbMessv100.h:45
gdpbv100::GET4_V2X_ERR_DLL_LOCK
@ GET4_V2X_ERR_DLL_LOCK
Definition: gDpbMessv100.h:119
gdpbv100::GET4_V2X_ERR_FIFO_WRITE
@ GET4_V2X_ERR_FIFO_WRITE
Definition: gDpbMessv100.h:112
gdpbv100::Message::Message
Message(uint64_t dataIn)
Definition: gDpbMessv100.h:143
gdpbv100::Message::getField
uint32_t getField(uint32_t shift, uint32_t len) const
Definition: gDpbMessv100.h:163
gdpbv100::Message::getStarTsLsbStarD
uint64_t getStarTsLsbStarD() const
Definition: gDpbMessv100.h:273
gdpbv100::Message::data
uint64_t data
Definition: gDpbMessv100.h:136
gdpbv100::kdFtBinsNb
const double kdFtBinsNb
Definition: gDpbMessv100.h:27
gdpbv100::PATT_MISSMATCH
@ PATT_MISSMATCH
Definition: gDpbMessv100.h:81
gdpbv100::GET4_V2X_ERR_UNKNOWN
@ GET4_V2X_ERR_UNKNOWN
Definition: gDpbMessv100.h:130
gdpbv100::MSG_STAR_TRI_C
@ MSG_STAR_TRI_C
Definition: gDpbMessv100.h:65
gdpbv100::GET4_32B_SLC_SCALER
@ GET4_32B_SLC_SCALER
Definition: gDpbMessv100.h:101
gdpbv100::FullMessage::PrintMessage
void PrintMessage(unsigned outType=msg_print_Cout, unsigned kind=msg_print_Human) const
Definition: gDpbMessv100.cxx:523
gdpbv100::Message::getFieldBE
uint32_t getFieldBE(uint32_t shift, uint32_t len) const
Definition: gDpbMessv100.h:186
gdpbv100::Message::getGdpbSysFwErrResync
uint32_t getGdpbSysFwErrResync() const
Definition: gDpbMessv100.h:257
gdpbv100::PATT_RESYNC
@ PATT_RESYNC
Definition: gDpbMessv100.h:83
gdpbv100::GET4_V2X_ERR_EP
@ GET4_V2X_ERR_EP
Definition: gDpbMessv100.h:111
gdpbv100::Message::getData
uint64_t getData() const
Definition: gDpbMessv100.h:156
gdpbv100::GET4_V2X_ERR_SYNC
@ GET4_V2X_ERR_SYNC
Definition: gDpbMessv100.h:109
gdpbv100::FullMessage::operator=
FullMessage & operator=(const FullMessage &src)
Definition: gDpbMessv100.h:381
gdpbv100::GET4_V2X_ERR_EP_CNT_SYNC
@ GET4_V2X_ERR_EP_CNT_SYNC
Definition: gDpbMessv100.h:110
gdpbv100::Message::setGdpbTsMsbStarA
void setGdpbTsMsbStarA(uint64_t fullGdpbTs)
Definition: gDpbMessv100.h:295
gdpbv100::GET4_V2X_ERR_SEQUENCE_ER
@ GET4_V2X_ERR_SEQUENCE_ER
Definition: gDpbMessv100.h:127
gdpbv100::Message::setStarFillerD
void setStarFillerD()
12 bits in between are set to 0
Definition: gDpbMessv100.h:314
gdpbv100::Message::getGdpbTsLsbStarB
uint64_t getGdpbTsLsbStarB() const
Definition: gDpbMessv100.h:268
gdpbv100::Message::getStarTrigMsgIndex
uint16_t getStarTrigMsgIndex() const
Definition: gDpbMessv100.h:264
gdpbv100::kuCoarseCounterSize
const uint32_t kuCoarseCounterSize
Definition: gDpbMessv100.h:21
gdpbv100::Message::getGdpbSlcEdge
uint32_t getGdpbSlcEdge() const
Definition: gDpbMessv100.h:240
gdpbv100::GET4_32B_SLC_DEADT
@ GET4_32B_SLC_DEADT
Definition: gDpbMessv100.h:102
gdpbv100::GET4_V2X_ERR_TOK_RING_ST
@ GET4_V2X_ERR_TOK_RING_ST
Definition: gDpbMessv100.h:115
gdpbv100::msg_print_Prefix
@ msg_print_Prefix
Definition: gDpbMessv100.h:88
gdpbv100::kuChipIdMergedEpoch
const uint32_t kuChipIdMergedEpoch
Definition: gDpbMessv100.h:51
gdpbv100::Message::~Message
~Message()
Definition: gDpbMessv100.h:145
gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_ADD_RIS_EDG
Definition: gDpbMessv100.h:125
gdpbv100::Message::getGdpbHitFineTs
uint16_t getGdpbHitFineTs() const
Definition: gDpbMessv100.h:222
gdpbv100::FullMessage::reset
void reset()
Definition: gDpbMessv100.h:388
gdpbv100::FullMessage::FullMessage
FullMessage(const FullMessage &src)
Definition: gDpbMessv100.h:373
gdpbv100::Message::getBit
uint8_t getBit(uint32_t shift) const
Definition: gDpbMessv100.h:178
gdpbv100::Message::assign
void assign(const Message &src)
Definition: gDpbMessv100.h:147
gdpbv100::Message::getGdpbHit32DllLck
bool getGdpbHit32DllLck() const
Definition: gDpbMessv100.h:226
gdpbv100::kuFineCounterSize
const uint32_t kuFineCounterSize
Definition: gDpbMessv100.h:20
gdpbv100::Message::setField
void setField(uint32_t shift, uint32_t len, uint32_t value)
Definition: gDpbMessv100.h:167
gdpbv100::MSG_SYST
@ MSG_SYST
Definition: gDpbMessv100.h:62
gdpbv100::Message::setStarTsLsbStarD
void setStarTsLsbStarD(uint64_t fullStarTs)
Definition: gDpbMessv100.h:310
gdpbv100::Message::CalcDistanceD
static double CalcDistanceD(double start, double stop)
Returns the time difference between two expanded time stamps.
Definition: gDpbMessv100.cxx:152
gdpbv100::Get4Message32bErrors
Get4Message32bErrors
Definition: gDpbMessv100.h:107
gdpbv100::Message::getStarTsMidStarC
uint64_t getStarTsMidStarC() const
Definition: gDpbMessv100.h:271
gdpbv100::Message::setBit
void setBit(uint32_t shift, uint8_t value)
Definition: gDpbMessv100.h:180
gdpbv100::Message::getGdpbHit24Edge
bool getGdpbHit24Edge() const
Definition: gDpbMessv100.h:224
gdpbv100::MessageTypes
MessageTypes
Definition: gDpbMessv100.h:58
gdpbv100::GET4_V2X_ERR_TOT_RANGE
@ GET4_V2X_ERR_TOT_RANGE
Definition: gDpbMessv100.h:123
gdpbv100::GET4_V2X_ERR_DLL_RESET
@ GET4_V2X_ERR_DLL_RESET
Definition: gDpbMessv100.h:120
gdpbv100::GET4_V2X_ERR_SPI
@ GET4_V2X_ERR_SPI
Definition: gDpbMessv100.h:118
gdpbv100::kdBinSize
const double kdBinSize
Definition: gDpbMessv100.h:30
gdpbv100::GET4_V2X_ERR_READ_INIT
@ GET4_V2X_ERR_READ_INIT
Definition: gDpbMessv100.h:108
gdpbv100::kuFeePulserChannel
const uint32_t kuFeePulserChannel
Definition: gDpbMessv100.h:53
gdpbv100::MessagePrintMask
MessagePrintMask
Definition: gDpbMessv100.h:87
gdpbv100::Message::getGdpbSysPattPattern
uint32_t getGdpbSysPattPattern() const
Definition: gDpbMessv100.h:261
gdpbv100::FullMessage::FullMessage
FullMessage()
Definition: gDpbMessv100.h:368
gdpbv100::Message::setGdpbSysPattIndex
void setGdpbSysPattIndex(uint16_t v)
Definition: gDpbMessv100.h:289
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
gdpbv100::MSG_EPOCH
@ MSG_EPOCH
Definition: gDpbMessv100.h:60
gdpbv100
Definition: gDpbMessv100.cxx:29
gdpbv100::Message::getGdpbSysUnkwData
uint32_t getGdpbSysUnkwData() const
Definition: gDpbMessv100.h:255
gdpbv100::Message::getGdpbSysErrRoType
bool getGdpbSysErrRoType() const
Definition: gDpbMessv100.h:248
gdpbv100::Message::setStarTsMidStarC
void setStarTsMidStarC(uint64_t fullStarTs)
Definition: gDpbMessv100.h:306
gdpbv100::kuCtSize
const uint32_t kuCtSize
Definition: gDpbMessv100.h:18
gdpbv100::GET4_V2X_ERR_LOST_EVT
@ GET4_V2X_ERR_LOST_EVT
Definition: gDpbMessv100.h:113
gdpbv100::kulEpochCycleFieldSz
const uint64_t kulEpochCycleFieldSz
Definition: gDpbMessv100.h:49
gdpbv100::Message::getGdpbHitIs24b
uint16_t getGdpbHitIs24b() const
Definition: gDpbMessv100.h:218
gdpbv100::Message::printData
void printData(unsigned outType=msg_print_Cout, unsigned kind=msg_print_Human, uint32_t epoch=0, std::ostream &os=std::cout) const
Print message in binary or human readable format to a stream.
Definition: gDpbMessv100.cxx:216
gdpbv100::Message::getGdpbEpEpochLoss
bool getGdpbEpEpochLoss() const
Definition: gDpbMessv100.h:234
gdpbv100::Message::setGdpbSysPattPattern
void setGdpbSysPattPattern(uint32_t v)
Definition: gDpbMessv100.h:290
gdpbv100::Message::getGdpbGenChipId
uint16_t getGdpbGenChipId() const
Definition: gDpbMessv100.h:214
gdpbv100::Message::setGdpbTsLsbStarB
void setGdpbTsLsbStarB(uint64_t fullGdpbTs)
Definition: gDpbMessv100.h:299
gdpbv100::Message::operator==
bool operator==(const gdpbv100::Message &other) const
equality operator, assumes same epoch for both messages
Definition: gDpbMessv100.cxx:88
gdpbv100::GET4_V2X_ERR_READOUT_ERR
@ GET4_V2X_ERR_READOUT_ERR
Definition: gDpbMessv100.h:117
gdpbv100::kuEpochInBins
const uint32_t kuEpochInBins
Definition: gDpbMessv100.h:32
gdpbv100::kuFineTime
const uint32_t kuFineTime
Definition: gDpbMessv100.h:14
gdpbv100::Message::getGdpbEpDataLoss
bool getGdpbEpDataLoss() const
Definition: gDpbMessv100.h:233
gdpbv100::MSG_STAR_TRI_B
@ MSG_STAR_TRI_B
Definition: gDpbMessv100.h:64
gdpbv100::Message::setGdpbSysSubType
void setGdpbSysSubType(uint16_t v)
Definition: gDpbMessv100.h:286
gdpbv100::kulEpochCycleBins
const uint64_t kulEpochCycleBins
Definition: gDpbMessv100.h:42
gdpbv100::Message::getGdpbHitCoarse
uint16_t getGdpbHitCoarse() const
Definition: gDpbMessv100.h:221
gdpbv100::Message::isHitMsg
bool isHitMsg() const
Returns true is message type is MSG_HIT (Get4 hit data)
Definition: gDpbMessv100.h:321
gdpbv100::kuFtShift
const uint32_t kuFtShift
Definition: gDpbMessv100.h:15
gdpbv100::Message::getGdpbSysErrEdge
bool getGdpbSysErrEdge() const
Definition: gDpbMessv100.h:252
gdpbv100::SYS_PATTERN
@ SYS_PATTERN
Definition: gDpbMessv100.h:76
gdpbv100::Message::setStarDaqCmdStarD
void setStarDaqCmdStarD(uint8_t v)
Definition: gDpbMessv100.h:316
gdpbv100::Message::getGdpbSlcData
uint32_t getGdpbSlcData() const
Definition: gDpbMessv100.h:242
gdpbv100::Message::getGdpbHitFullTs
uint32_t getGdpbHitFullTs() const
Definition: gDpbMessv100.h:220
gdpbv100::GET4_32B_SLC_SPIREAD
@ GET4_32B_SLC_SPIREAD
Definition: gDpbMessv100.h:103
gdpbv100::Message::getGdpbSysErrInfo
uint16_t getGdpbSysErrInfo() const
Definition: gDpbMessv100.h:250
gdpbv100::FullMessage
Definition: gDpbMessv100.h:362
gdpbv100::kuFeePulserChannelDiam
const uint32_t kuFeePulserChannelDiam
Definition: gDpbMessv100.h:55
gdpbv100::Message::getGdpbSysLinkId
bool getGdpbSysLinkId() const
Definition: gDpbMessv100.h:246
gdpbv100::Message::setStarTokenStarD
void setStarTokenStarD(uint16_t v)
Definition: gDpbMessv100.h:317
gdpbv100::PATT_STATUS
@ PATT_STATUS
Definition: gDpbMessv100.h:84
gdpbv100::Message::setGdpbSysPattType
void setGdpbSysPattType(uint16_t v)
Definition: gDpbMessv100.h:288
gdpbv100::Message::getStarTokenStarD
uint32_t getStarTokenStarD() const
Definition: gDpbMessv100.h:280
gdpbv100::Message::FullTimeStamp
static uint64_t FullTimeStamp(uint64_t epoch, uint32_t ts)
Expanded timestamp for 160 MHz * 19 bit (12 + 7) epochs.
Definition: gDpbMessv100.h:348
gdpbv100::Message::getStarTsMsbStarB
uint64_t getStarTsMsbStarB() const
Definition: gDpbMessv100.h:269
gdpbv100::Message::getFieldLong
uint64_t getFieldLong(uint32_t shift, uint32_t len) const
Definition: gDpbMessv100.h:159
gdpbv100::Message::getGdpbHitChanId
uint16_t getGdpbHitChanId() const
Definition: gDpbMessv100.h:219
gdpbv100::Message::getMsgFullTime
uint64_t getMsgFullTime(uint64_t epoch) const
Returns expanded and adjusted time of message (in ns)
Definition: gDpbMessv100.cxx:98
gdpbv100::MessagePrintType
MessagePrintType
Definition: gDpbMessv100.h:94
gdpbv100::Message::getGdpbEpMissmatch
bool getGdpbEpMissmatch() const
Definition: gDpbMessv100.h:235
gdpbv100::PATT_ENABLE
@ PATT_ENABLE
Definition: gDpbMessv100.h:82
gdpbv100::GET4_V2X_ERR_UNPAIR_FALL
@ GET4_V2X_ERR_UNPAIR_FALL
Definition: gDpbMessv100.h:126
gdpbv100::SYS_GET4_SYNC_MISS
@ SYS_GET4_SYNC_MISS
Definition: gDpbMessv100.h:73
gdpbv100::Message::getGdpbSysErrUnused
uint16_t getGdpbSysErrUnused() const
Definition: gDpbMessv100.h:249
gdpbv100::FullMessage::fulExtendedEpoch
uint64_t fulExtendedEpoch
Definition: gDpbMessv100.h:365
gdpbv100::Message::getGdpbHit32Tot
uint16_t getGdpbHit32Tot() const
Definition: gDpbMessv100.h:227
gdpbv100::Message::setStarTsMsbStarB
void setStarTsMsbStarB(uint64_t fullStarTs)
Definition: gDpbMessv100.h:302
gdpbv100::Message::isGet4SlCtrMsg
bool isGet4SlCtrMsg() const
Returns true is message type is MSG_SLOWC (GET4 Slow Control)
Definition: gDpbMessv100.h:325
gdpbv100::GET4_V2X_ERR_EVT_DISCARD
@ GET4_V2X_ERR_EVT_DISCARD
Definition: gDpbMessv100.h:124
gdpbv100::Message::reset
void reset()
Definition: gDpbMessv100.h:154
gdpbv100::Message::getStarDaqCmdStarD
uint32_t getStarDaqCmdStarD() const
Definition: gDpbMessv100.h:279
gdpbv100::FullMessage::operator<
bool operator<(const FullMessage &other) const
strict weak ordering operator, including epoch for both messages
Definition: gDpbMessv100.cxx:515
gdpbv100::GET4_V2X_ERR_EPOCH_OVERF
@ GET4_V2X_ERR_EPOCH_OVERF
Definition: gDpbMessv100.h:128
gdpbv100::SYS_GDPB_UNKWN
@ SYS_GDPB_UNKWN
Definition: gDpbMessv100.h:71
gdpbv100::msg_print_File
@ msg_print_File
Definition: gDpbMessv100.h:97