Class to hold message data retrieved through the 'debug' interface. More...
#include <DataDebug.h>
Public Member Functions | |
| DataDebug (uint32_t adc=0, uint32_t nx=0, uint32_t ltslow=0, uint32_t ltshigh=0) | |
| Default constructor, initialize all fields. | |
| uint32_t | getRawAdc () const |
| Returns raw ROC_ADC_DATA data. | |
| uint32_t | getRawNx () const |
| Returns raw ROC_NX_DATA data. | |
| uint32_t | getRawLtsLow () const |
| Returns raw ROC_LT_LOW data. | |
| uint32_t | getRawLtsHigh () const |
| Returns raw ROC_LT_HIGH data. | |
| uint64_t | getRawLts () const |
| Returns full 64bit ROC local timestamp (unit=4ns 250 MHz clock). | |
| uint32_t | getRawMessageType () const |
| Returns raw message type. | |
| uint32_t | getNxAdcValue () const |
| Returns nXYTER ADC value. | |
| uint32_t | getNxNumber () const |
| Returns nXYTER number. | |
| uint32_t | getRawNxChNum () const |
| Returns raw (gray encoded) nXYTER channel number. | |
| uint32_t | getNxChNum () const |
| Returns ungrayed nXYTER channel number. | |
| uint32_t | getRawNxTs () const |
| Returns raw (gray encoded) nXYTER timestamp (unit=1ns). | |
| uint32_t | getNxTs () const |
| Returns ungrayed nXYTER timestamp. | |
| uint32_t | getNxParity () const |
| Returns nXYTER parity bit as send from chip. | |
| uint32_t | getNxParityCheck () const |
| Returns nXYTER parity re-calculated from data. | |
| void | print (std::ostream &os) const |
| Print message to stream os. | |
Static Public Member Functions | |
| static uint32_t | ungray (uint32_t val, int n) |
| Returns the first n bits of val after Gray decoding. | |
Protected Attributes | |
| uint32_t | fAdc |
| data from ROC_ADC_DATA | |
| uint32_t | fNx |
| data from ROC_NX_DATA | |
| uint32_t | fLtsLow |
| data from ROC_LT_LOW | |
| uint32_t | fLtsHigh |
| data from ROC_LT_HIGH | |
Class to hold message data retrieved through the 'debug' interface.
The 'debug' port provided via registers ROC_ADC_DATA, ROC_NX_DATA and ROC_LT_LOW / ROC_LT_HIGH gives direct access to the 'wide FIFO' in the ROC logic.
For nXYTER message the 'wide-fifo' holds the raw data from ADC and nXYTER which contains information not available in the final message. For non-nXYTER messages final 48 bit message is stored in the 16 bit 'ADC' and 32 bit 'NX' part of the FIFO.
The data format is:
Definition at line 9 of file DataDebug.h.
| nxyter::DataDebug::DataDebug | ( | uint32_t | adc = 0, |
|
| uint32_t | nx = 0, |
|||
| uint32_t | ltslow = 0, |
|||
| uint32_t | ltshigh = 0 | |||
| ) | [inline, explicit] |
Default constructor, initialize all fields.
Definition at line 19 of file DataDebug.h.
| uint32_t nxyter::DataDebug::getNxAdcValue | ( | ) | const [inline] |
Returns nXYTER ADC value.
Definition at line 46 of file DataDebug.h.
References fAdc.
Referenced by print().
| uint32_t nxyter::DataDebug::getNxChNum | ( | ) | const [inline] |
Returns ungrayed nXYTER channel number.
Definition at line 58 of file DataDebug.h.
References getRawNxChNum(), and ungray().
Referenced by print().
| uint32_t nxyter::DataDebug::getNxNumber | ( | ) | const [inline] |
Returns nXYTER number.
Definition at line 50 of file DataDebug.h.
References fNx.
Referenced by print().
| uint32_t nxyter::DataDebug::getNxParity | ( | ) | const [inline] |
Returns nXYTER parity bit as send from chip.
Definition at line 70 of file DataDebug.h.
References fNx.
Referenced by print().
| uint32_t nxyter::DataDebug::getNxParityCheck | ( | ) | const |
Returns nXYTER parity re-calculated from data.
Calculates the parity from data, XOR'ing Bits 30:24, 21:16, 14:8 and 2:0.
Definition at line 177 of file DataDebug.cxx.
References fNx.
Referenced by print().
| uint32_t nxyter::DataDebug::getNxTs | ( | ) | const [inline] |
Returns ungrayed nXYTER timestamp.
Definition at line 66 of file DataDebug.h.
References getRawNxTs(), and ungray().
Referenced by print().
| uint32_t nxyter::DataDebug::getRawAdc | ( | ) | const [inline] |
| uint64_t nxyter::DataDebug::getRawLts | ( | ) | const [inline] |
Returns full 64bit ROC local timestamp (unit=4ns 250 MHz clock).
Definition at line 38 of file DataDebug.h.
References fLtsHigh, and fLtsLow.
Referenced by print().
| uint32_t nxyter::DataDebug::getRawLtsHigh | ( | ) | const [inline] |
| uint32_t nxyter::DataDebug::getRawLtsLow | ( | ) | const [inline] |
| uint32_t nxyter::DataDebug::getRawMessageType | ( | ) | const [inline] |
Returns raw message type.
Definition at line 42 of file DataDebug.h.
References fAdc.
Referenced by print().
| uint32_t nxyter::DataDebug::getRawNx | ( | ) | const [inline] |
| uint32_t nxyter::DataDebug::getRawNxChNum | ( | ) | const [inline] |
Returns raw (gray encoded) nXYTER channel number.
Definition at line 54 of file DataDebug.h.
References fNx.
Referenced by getNxChNum().
| uint32_t nxyter::DataDebug::getRawNxTs | ( | ) | const [inline] |
Returns raw (gray encoded) nXYTER timestamp (unit=1ns).
Definition at line 62 of file DataDebug.h.
References fNx.
Referenced by getNxTs().
| void nxyter::DataDebug::print | ( | std::ostream & | os | ) | const |
Print message to stream os.
A nXYTER message is printed in the format
H: a:2817 nx:1000:1a:1d:00:00 0, 0, 9027 lts:0:00000024:8ee 00149742 +3,5,1
H: a:2789 nx:1000:1a:1c:00:11 2, 0, 9026 lts:0:00000024:8ee 00149742 +3,5,2
H: a:2801 nx:1000:1a:1d:00:18 3, 0, 9027 lts:0:00000024:8ee 00149742 +3,5,1
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | | | |
| | nx rawdata | | | | ROC local timestamp delta
| | bytes, bit | | | | timestamp in decimal time
| | 6:0 only | | | | stamp
| | | | | nx Timestamp (ungrayed) see
| nx raw data | | nx channel number below
| valid bits | nx number (ungrayed)
| |
nx ADC value Indicator for nx Parity Error ("P")
The difference between the ROC local time stamp and the nXYTER timestamp is represented in the format "+a,b,c" with
A non-nXYTER message is currently simply dumped in the format
M: typ:3 dat:0000:50000080 lts:0:00000020:09f 00131231
M: typ:3 dat:0000:50000100 lts:0:00000040:09f 00262303
M: typ:3 dat:0000:50000180 lts:0:00000060:09f 00393375
^ ^ ^ ^
| | | |
| | | ROC local Timestamp as for nXYTER messages
| | bits 31:0 of message
| bits 44:32 of message
raw message type: 3=sync; 4=aux; 7=system
Definition at line 99 of file DataDebug.cxx.
References fAdc, fLtsLow, fNx, getNxAdcValue(), getNxChNum(), getNxNumber(), getNxParity(), getNxParityCheck(), getNxTs(), getRawLts(), and getRawMessageType().
| uint32_t nxyter::DataDebug::ungray | ( | uint32_t | val, | |
| int | n | |||
| ) | [static] |
Returns the first n bits of val after Gray decoding.
Definition at line 193 of file DataDebug.cxx.
Referenced by getNxChNum(), and getNxTs().
uint32_t nxyter::DataDebug::fAdc [protected] |
data from ROC_ADC_DATA
Definition at line 12 of file DataDebug.h.
Referenced by getNxAdcValue(), getRawAdc(), getRawMessageType(), and print().
uint32_t nxyter::DataDebug::fLtsHigh [protected] |
data from ROC_LT_HIGH
Definition at line 15 of file DataDebug.h.
Referenced by getRawLts(), and getRawLtsHigh().
uint32_t nxyter::DataDebug::fLtsLow [protected] |
data from ROC_LT_LOW
Definition at line 14 of file DataDebug.h.
Referenced by getRawLts(), getRawLtsLow(), and print().
uint32_t nxyter::DataDebug::fNx [protected] |
data from ROC_NX_DATA
Definition at line 13 of file DataDebug.h.
Referenced by getNxNumber(), getNxParity(), getNxParityCheck(), getRawNx(), getRawNxChNum(), getRawNxTs(), and print().
1.7.1