#include <TgcByteStream.h>
This class provides conversions between RDO and ByteStream.
- Author
- Susumu Oda Susum.nosp@m.u.Od.nosp@m.a@cer.nosp@m.n.ch
Definition at line 23 of file TgcByteStream.h.
◆ ByteStream
◆ TgcByteStream()
Muon::TgcByteStream::TgcByteStream |
( |
| ) |
|
|
default |
◆ ~TgcByteStream()
Muon::TgcByteStream::~TgcByteStream |
( |
| ) |
|
|
default |
◆ byteStream2Rdo()
void Muon::TgcByteStream::byteStream2Rdo |
( |
const ByteStream & |
bs, |
|
|
TgcRdo & |
rdo, |
|
|
uint32_t |
source_id, |
|
|
MsgStream & |
log |
|
) |
| |
|
static |
Convert ByteStream to RDO.
Definition at line 200 of file TgcByteStream.cxx.
221 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 8}, {0, 9}
227 for(
int iCnt = 0; iCnt < 7; iCnt++)
230 if(
counter.id == counters[iCnt].id)
237 for(
int iCnt = 0; iCnt < 7; iCnt++)
239 if(counters[iCnt].
count == 0)
continue;
240 switch(counters[iCnt].
id)
246 <<
"fragment" << counters[iCnt].
id <<
" "
249 for(
unsigned iFrag = 0; iFrag < counters[iCnt].
count; iFrag++)
253 <<
"WORD" << iFrag <<
":" << MSG::hex << bs[iBs] <<
endmsg;
264 << counters[iCnt].
id <<
" " << counters[iCnt].
count
268 for(
unsigned iFrag = 0; iFrag < counters[iCnt].
count; iFrag++)
279 <<
" rdo.rodId():" <<rdo.
rodId()
280 <<
" roh.ldbId:" <<roh.
ldbId
281 <<
" roh.sbId:" <<roh.
sbId
282 <<
" rdo.l1Id():"<<rdo.
l1Id()
296 else slbId = (roh.
sbId-8)*2+1;
332 << counters[iCnt].
id <<
" " << counters[iCnt].
count
337 for(
unsigned iFrag = 0; iFrag < counters[iCnt].
count; iFrag++)
341 << iFrag <<
":" << MSG::hex << bs[iBs] <<
endmsg;
400 << counters[iCnt].
id <<
" " << counters[iCnt].
count
405 for(
unsigned iFrag = 0; iFrag < counters[iCnt].
count; iFrag++)
409 << iFrag <<
":" << MSG::hex << bs[iBs] <<
endmsg;
456 << counters[iCnt].
id <<
" " << counters[iCnt].
count
460 for(
unsigned iFrag = 0; iFrag < counters[iCnt].
count; iFrag++)
464 << iFrag <<
":" << MSG::hex << bs[iBs] <<
endmsg;
474 static_cast<bool>(sl.
fwd),
489 <<
"Error: TgcByteStream::byteStream2Rdo Unsupported fragment type "
◆ rdo2ByteStream()
Convert RDO to ByteStream.
Definition at line 18 of file TgcByteStream.cxx.
26 ByteStream headerBS, statusBS, countersBS, dataBS, footerBS;
28 {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 8}, {0, 9}
45 roh.
channel = raw->channel()-40;
46 roh.
sbId = raw->slbId();
61 roh.
sbType = raw->slbType();
71 if(raw->slbId()%2==0) roh.
sbId = raw->slbId() /2;
72 else roh.
sbId = (raw->slbId()+15)/2;
75 roh.
adj = raw->isAdjacent();
76 roh.
ldbId = raw->sswId();
80 dataBS.push_back(
toBS32(roh));
89 rot.
phi = raw->position();
90 rot.
seg = raw->segment();
91 rot.
sbId = raw->slbId();
92 rot.
ldbId = raw->sswId();
96 dataBS.push_back(
toBS32(rot));
101 rot.
rphi = raw->position();
102 rot.
subm = raw->subMatrix();
103 rot.
seg = raw->segment();
104 rot.
delta = raw->delta();
105 rot.
sbId = raw->slbId();
106 rot.
ldbId = raw->sswId();
124 dataBS.push_back(
toBS32(rot));
130 if(raw->isStrip() == 1 && raw->sector() & 4 ){
132 hpt.
inner = raw->inner();
136 hpt.
sector = raw->sector();
138 hpt.
strip = raw->isStrip();
140 dataBS.push_back(
toBS32(hpt));
143 hpt.
delta = raw->delta();
144 hpt.
sub = raw->hsub();
145 hpt.
hitId = raw->hitId();
146 hpt.
hipt = raw->isHipt();
147 hpt.
cand = raw->index();
148 hpt.
chip = raw->chip();
149 hpt.
sector = raw->sector();
150 hpt.
fwd = raw->isForward();
151 hpt.
strip = raw->isStrip();
153 dataBS.push_back(
toBS32(hpt));
163 sl.
veto = raw->isVeto();
165 sl.
sign = raw->isMuplus();
166 sl.
cand = raw->index();
167 sl.
sector = raw->sector();
168 sl.
fwd = raw->isForward();
171 dataBS.push_back(
toBS32(sl));
175 log << MSG::ERROR <<
"Invalid type " << raw->typeName() <<
endmsg;
181 statusBS.push_back(rdo->orbit());
183 for(
int iCnt = 0; iCnt < 7; iCnt++)
185 if(counters[iCnt].
count > 0)
187 countersBS.push_back(
toBS32(counters[iCnt]));
192 bs.insert(bs.end(), countersBS.begin(), countersBS.end());
193 bs.insert(bs.end(), dataBS.begin(), dataBS.end());
The documentation for this class was generated from the following files: