#include <NSWElink.h>
Definition at line 20 of file NSWElink.h.
◆ NSWElink() [1/2]
Muon::nsw::NSWElink::NSWElink |
( |
const uint32_t * |
bs, |
|
|
uint32_t |
remaining |
|
) |
| |
Definition at line 19 of file NSWElink.cxx.
34 s <<
"Packet status in FELIX header 0x" << std::hex <<
m_packet_status << std::dec;
35 Muon::nsw::MuonNSWCommonDecoder::NSWElinkFelixHeaderException
e (ERS_HERE,
s.str ());
39 if (remaining *
sizeof (
uint32_t) < packet_nbytes)
42 s <<
"Packet length in FELIX header " << packet_nbytes <<
" is larger than available data";
43 Muon::nsw::MuonNSWCommonDecoder::NSWElinkFelixHeaderException
e (ERS_HERE,
s.str ());
54 ERS_DEBUG (2,
"==============================================================");
55 ERS_DEBUG (2,
"FELIX HEADER: LENGTH (BYTES) = " << packet_nbytes <<
63 ERS_DEBUG (2,
"ROC HEADER: | NULL = " <<
m_isNull <<
71 s <<
"Additional data detected in packet flagged as null " << packet_nbytes;
87 s <<
"Packet length in FELIX header " << packet_nbytes <<
" and null event flag in packet are inconsistent";
114 static const unsigned int hit_size = 4;
118 std::ostringstream
s;
119 s <<
"Hit size is not compatible with flags in ROC header, elink ID = " <<
m_elinkWord <<
" L1 ID = " <<
m_l1Id;
127 if (packet_nbytes % 4) ++
m_nhits;
129 ERS_DEBUG (2,
"ROC HEADER: T = " <<
m_noTdc <<
" | NULL = " <<
m_isNull <<
151 ERS_DEBUG (2,
"ROC TRAILER: EXTENDED = " <<
m_extended <<
" | TIMEOUT = " <<
m_tout << std::hex <<
153 " | CHECKSUM = 0x" << std::hex <<
static_cast <unsigned int> (
m_checksum) << std::dec);
◆ ~NSWElink()
Muon::nsw::NSWElink::~NSWElink |
( |
| ) |
|
|
virtual |
◆ NSWElink() [2/2]
◆ bcId()
uint16_t Muon::nsw::NSWElink::bcId |
( |
| ) |
const |
|
inline |
◆ checksum()
uint8_t Muon::nsw::NSWElink::checksum |
( |
| ) |
const |
|
inline |
◆ elinkId() [1/2]
◆ elinkId() [2/2]
◆ elinkWord()
uint32_t Muon::nsw::NSWElink::elinkWord |
( |
| ) |
const |
|
inline |
◆ extended()
bool Muon::nsw::NSWElink::extended |
( |
| ) |
const |
|
inline |
◆ flagMiss()
uint16_t Muon::nsw::NSWElink::flagMiss |
( |
| ) |
const |
|
inline |
◆ get_channels()
◆ isNull()
bool Muon::nsw::NSWElink::isNull |
( |
| ) |
const |
|
inline |
◆ l0Id()
uint16_t Muon::nsw::NSWElink::l0Id |
( |
| ) |
const |
|
inline |
◆ l1Id()
uint16_t Muon::nsw::NSWElink::l1Id |
( |
| ) |
const |
|
inline |
◆ nhits()
unsigned int Muon::nsw::NSWElink::nhits |
( |
| ) |
const |
|
inline |
◆ nhitsTrail()
uint16_t Muon::nsw::NSWElink::nhitsTrail |
( |
| ) |
const |
|
inline |
◆ noTdc()
bool Muon::nsw::NSWElink::noTdc |
( |
| ) |
const |
|
inline |
◆ nwords()
unsigned int Muon::nsw::NSWElink::nwords |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ orbit()
uint16_t Muon::nsw::NSWElink::orbit |
( |
| ) |
const |
|
inline |
◆ rocId()
uint16_t Muon::nsw::NSWElink::rocId |
( |
| ) |
const |
|
inline |
◆ status()
unsigned int Muon::nsw::NSWElink::status |
( |
| ) |
const |
|
inline |
◆ test_checksum()
unsigned int Muon::nsw::NSWElink::test_checksum |
( |
const uint8_t * |
buffer, |
|
|
unsigned int |
buflen |
|
) |
| |
|
inlineprivate |
Definition at line 93 of file NSWElink.h.
96 unsigned int running_checksum = 0;
98 for (
unsigned int i = 0;
i < buflen; ++
i, ++
p)
99 running_checksum += *
p;
101 running_checksum = (running_checksum & 0xff) + (running_checksum >> 8);
102 running_checksum = (running_checksum & 0xff) + (running_checksum >> 8);
103 running_checksum = (~running_checksum) & 0xff;
105 return running_checksum;
◆ tout()
bool Muon::nsw::NSWElink::tout |
( |
| ) |
const |
|
inline |
◆ m_bcId
uint16_t Muon::nsw::NSWElink::m_bcId |
|
private |
◆ m_channels
◆ m_checksum
uint8_t Muon::nsw::NSWElink::m_checksum |
|
private |
◆ m_elinkId
◆ m_elinkWord
uint32_t Muon::nsw::NSWElink::m_elinkWord |
|
private |
◆ m_extended
bool Muon::nsw::NSWElink::m_extended |
|
private |
◆ m_flagMiss
uint16_t Muon::nsw::NSWElink::m_flagMiss |
|
private |
◆ m_isNull
bool Muon::nsw::NSWElink::m_isNull |
|
private |
◆ m_l0Id
uint16_t Muon::nsw::NSWElink::m_l0Id |
|
private |
◆ m_l1Id
uint16_t Muon::nsw::NSWElink::m_l1Id |
|
private |
◆ m_nhits
unsigned int Muon::nsw::NSWElink::m_nhits |
|
private |
◆ m_nhitsTrail
uint16_t Muon::nsw::NSWElink::m_nhitsTrail |
|
private |
◆ m_noTdc
bool Muon::nsw::NSWElink::m_noTdc |
|
private |
◆ m_orbit
uint16_t Muon::nsw::NSWElink::m_orbit |
|
private |
◆ m_packet_status
unsigned int Muon::nsw::NSWElink::m_packet_status |
|
private |
◆ m_rocId
uint16_t Muon::nsw::NSWElink::m_rocId |
|
private |
◆ m_running_checksum
unsigned int Muon::nsw::NSWElink::m_running_checksum |
|
private |
◆ m_tout
bool Muon::nsw::NSWElink::m_tout |
|
private |
◆ m_wordCount
unsigned int Muon::nsw::NSWElink::m_wordCount |
|
private |
◆ s_null_packet_length
const unsigned int Muon::nsw::NSWElink::s_null_packet_length = 10 |
|
staticprivate |
The documentation for this class was generated from the following files: