|
LDMX Software
|
Capture header and ECON-D header data for one sample (L1A) More...
#include <ECONDEventInfo.h>
Public Types | |
| enum | Corruption { BAD_HEADER_MARKER = 0 , BAD_LENGTH = 1 , BAD_HEADER_CRC = 2 , BAD_CRC32 = 3 , BAD_PAYLOAD = 4 , TRUNCATED = 5 } |
| Bits of the corruption mask. More... | |
Public Member Functions | |
| void | setCaptureHeader (int econ_id, int i_sample, bool is_soi, int length) |
| Set the capture header data. | |
| void | setHeader (int payload_length, int flags, int ht, int ebo, int bx, int l1a, int orbit, int reset_request) |
| Set the ECON-D event header data. | |
| void | setCorruption (int mask) |
| set the corruption mask | |
| void | addLink (const ECONDLinkInfo &link) |
| add the data from the next link | |
| int | getEconID () const |
| ECON ID from the capture header. | |
| int | getSampleIndex () const |
| sample index from the capture header | |
| bool | isSOI () const |
| sample of interest flag from the capture header | |
| int | getCaptureLength () const |
| ECON-D packet length from the capture header. | |
| int | getPayloadLength () const |
| payload length from the ECON-D header | |
| bool | isPassthrough () const |
| P flag, pass through mode. | |
| bool | isExpected () const |
| E flag, HGCROC event header/trailer expected. | |
| bool | isMatch () const |
| M flag, E/B/O match with the L1A FIFO. | |
| bool | isTruncated () const |
| T flag, truncated. | |
| bool | hasSubpacketError () const |
| S flag, sub-packet error. | |
| int | getHT () const |
| 2-bit H/T status | |
| int | getEBO () const |
| 2-bit E/B/O status | |
| int | getBX () const |
| bunch crossing | |
| int | getL1A () const |
| 6-bit L1A number | |
| int | getOrbit () const |
| 3-bit orbit number | |
| int | getResetRequest () const |
| 2-bit reset request | |
| int | getCorruption () const |
| corruption mask, bits from Corruption | |
| bool | isCorrupt (Corruption c) const |
| check a single corruption bit | |
| bool | isCorrupt () const |
| any corruption bit is set | |
| const std::vector< ECONDLinkInfo > & | getLinks () const |
| link data in order of transmission | |
Private Member Functions | |
| ClassDef (ECONDSampleInfo, 1) | |
Private Attributes | |
| int | econ_id_ {-1} |
| ECON ID. | |
| int | i_sample_ {-1} |
| sample index | |
| bool | is_soi_ {false} |
| sample of interest flag | |
| int | capture_length_ {0} |
| ECON-D packet length from capture header. | |
| int | payload_length_ {0} |
| payload length from ECON-D header | |
| int | flags_ {0} |
| packed P, E, M, T, S flags | |
| int | ht_ {0} |
| H/T status. | |
| int | ebo_ {0} |
| E/B/O status. | |
| int | bx_ {0} |
| bunch crossing | |
| int | l1a_ {0} |
| L1A number. | |
| int | orbit_ {0} |
| orbit number | |
| int | reset_request_ {0} |
| reset request | |
| int | corruption_ {0} |
| corruption mask | |
| std::vector< ECONDLinkInfo > | links_ |
| link data | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const ECONDSampleInfo &s) |
Capture header and ECON-D header data for one sample (L1A)
Definition at line 81 of file ECONDEventInfo.h.
Bits of the corruption mask.
Same order as packing::ECONDEventPacket::Corruption
Definition at line 88 of file ECONDEventInfo.h.
|
inline |
add the data from the next link
Definition at line 137 of file ECONDEventInfo.h.
References links_.
Referenced by packing::ECONDDecoder::produce().
|
inline |
|
inline |
ECON-D packet length from the capture header.
Definition at line 146 of file ECONDEventInfo.h.
References capture_length_.
|
inline |
corruption mask, bits from Corruption
Definition at line 172 of file ECONDEventInfo.h.
References corruption_.
|
inline |
|
inline |
ECON ID from the capture header.
Definition at line 140 of file ECONDEventInfo.h.
References econ_id_.
|
inline |
|
inline |
|
inline |
link data in order of transmission
Definition at line 178 of file ECONDEventInfo.h.
References links_.
|
inline |
|
inline |
payload length from the ECON-D header
Definition at line 148 of file ECONDEventInfo.h.
References payload_length_.
|
inline |
|
inline |
sample index from the capture header
Definition at line 142 of file ECONDEventInfo.h.
References i_sample_.
|
inline |
|
inline |
|
inline |
check a single corruption bit
Definition at line 174 of file ECONDEventInfo.h.
References corruption_.
|
inline |
E flag, HGCROC event header/trailer expected.
Definition at line 152 of file ECONDEventInfo.h.
References flags_.
|
inline |
M flag, E/B/O match with the L1A FIFO.
Definition at line 154 of file ECONDEventInfo.h.
References flags_.
|
inline |
|
inline |
sample of interest flag from the capture header
Definition at line 144 of file ECONDEventInfo.h.
References is_soi_.
|
inline |
|
inline |
Set the capture header data.
| [in] | econ_id | ECON ID |
| [in] | i_sample | sample index within the event |
| [in] | is_soi | sample of interest flag |
| [in] | length | ECON-D packet length in 32b words |
Definition at line 108 of file ECONDEventInfo.h.
References capture_length_, econ_id_, i_sample_, and is_soi_.
Referenced by packing::ECONDDecoder::produce().
|
inline |
set the corruption mask
Definition at line 134 of file ECONDEventInfo.h.
References corruption_.
Referenced by packing::ECONDDecoder::produce().
|
inline |
Set the ECON-D event header data.
The flags are packed as P (bit 0), E (1), M (2), T (3), S (4).
Definition at line 121 of file ECONDEventInfo.h.
References bx_, ebo_, flags_, ht_, l1a_, orbit_, payload_length_, and reset_request_.
Referenced by packing::ECONDDecoder::produce().
|
friend |
Definition at line 24 of file ECONDEventInfo.cxx.
|
private |
bunch crossing
Definition at line 200 of file ECONDEventInfo.h.
Referenced by getBX(), and setHeader().
|
private |
ECON-D packet length from capture header.
Definition at line 190 of file ECONDEventInfo.h.
Referenced by getCaptureLength(), and setCaptureHeader().
|
private |
corruption mask
Definition at line 208 of file ECONDEventInfo.h.
Referenced by getCorruption(), isCorrupt(), isCorrupt(), and setCorruption().
|
private |
E/B/O status.
Definition at line 198 of file ECONDEventInfo.h.
Referenced by getEBO(), and setHeader().
|
private |
ECON ID.
Definition at line 184 of file ECONDEventInfo.h.
Referenced by getEconID(), and setCaptureHeader().
|
private |
packed P, E, M, T, S flags
Definition at line 194 of file ECONDEventInfo.h.
Referenced by hasSubpacketError(), isExpected(), isMatch(), isPassthrough(), isTruncated(), and setHeader().
|
private |
H/T status.
Definition at line 196 of file ECONDEventInfo.h.
Referenced by getHT(), and setHeader().
|
private |
sample index
Definition at line 186 of file ECONDEventInfo.h.
Referenced by getSampleIndex(), and setCaptureHeader().
|
private |
sample of interest flag
Definition at line 188 of file ECONDEventInfo.h.
Referenced by isSOI(), and setCaptureHeader().
|
private |
L1A number.
Definition at line 202 of file ECONDEventInfo.h.
Referenced by getL1A(), and setHeader().
|
private |
|
private |
orbit number
Definition at line 204 of file ECONDEventInfo.h.
Referenced by getOrbit(), and setHeader().
|
private |
payload length from ECON-D header
Definition at line 192 of file ECONDEventInfo.h.
Referenced by getPayloadLength(), and setHeader().
|
private |
reset request
Definition at line 206 of file ECONDEventInfo.h.
Referenced by getResetRequest(), and setHeader().