5 #ifndef MUONBYTESTREAM_RPCROD_DECODER_H
6 #define MUONBYTESTREAM_RPCROD_DECODER_H
15 #include "GaudiKernel/GaudiException.h"
16 #include "GaudiKernel/ServiceHandle.h"
17 #include "GaudiKernel/ToolHandle.h"
30 #include "eformat/Issue.h"
31 #include "eformat/SourceIdentifier.h"
37 if (printMessage &&
log.level() <= MSG::WARNING) {
58 const bool& decodeSL)
const override;
82 inline std::vector<uint16_t>
get16bits(
BS data,
const int size,
const int nHeader,
const int nFooter)
const;
94 Gaudi::Property<int>
m_nobxs {
this,
"NOBXS", 8,
"Number of bunch crossings in readout"};
120 for (
int i = ini;
i <
end;
i++) {
121 decoded = ((*pdata)[
i] & 0xf000) >> 12;
124 if (decoded == 0x9) {
131 sc = StatusCode::FAILURE;
137 else if (decoded == 0xe) {
143 sc = StatusCode::FAILURE;
148 else if (decoded == 0x5) {
154 sc = StatusCode::FAILURE;
160 else if (decoded == 0x6) {
168 sc = StatusCode::FAILURE;
174 else if (decoded == 0xc) {
180 sc = StatusCode::FAILURE;
186 else if (decoded == 0x8) {
192 sc = StatusCode::FAILURE;
198 else if (decoded == 0x4) {
203 ++m_RPCcheckfail[12];
204 sc = StatusCode::RECOVERABLE;
209 sc = StatusCode::FAILURE;
215 else if (decoded == 0
xa) {
221 sc = StatusCode::FAILURE;
227 else if (decoded == 0x7) {
233 sc = StatusCode::FAILURE;
239 else if (decoded == 0
xd) {
245 sc = StatusCode::FAILURE;
251 else if (decoded == 0xf) {
255 ++m_RPCcheckfail[10];
257 sc = StatusCode::FAILURE;
262 else if (decoded == 0
xb) {
268 ++m_RPCcheckfail[11];
270 sc = StatusCode::FAILURE;
277 sc = StatusCode::FAILURE;
286 log << MSG::INFO <<
" ============ FINAL RPC DATA FORMAT STAT. =========== " <<
endmsg;
287 int tmp = m_RPCcheckfail[0].load();
288 log << MSG::INFO <<
" RX Header Errors............." <<
tmp <<
endmsg;
289 log << MSG::INFO <<
" RX SubHeader Errors.........." << m_RPCcheckfail[1] <<
endmsg;
290 log << MSG::INFO <<
" PAD Header Errors............" << m_RPCcheckfail[2] <<
endmsg;
291 log << MSG::INFO <<
" PAD/SL SubHeader Errors......" << m_RPCcheckfail[3] <<
endmsg;
292 log << MSG::INFO <<
" CM Header Errors............." << m_RPCcheckfail[4] <<
endmsg;
293 log << MSG::INFO <<
" CM SubHeader Errors.........." << m_RPCcheckfail[5] <<
endmsg;
294 log << MSG::INFO <<
" CM Footer Errors............." << m_RPCcheckfail[6] <<
endmsg;
295 log << MSG::INFO <<
" PAD PreFooter Errors........." << m_RPCcheckfail[7] <<
endmsg;
296 log << MSG::INFO <<
" PAD Footer Errors............" << m_RPCcheckfail[8] <<
endmsg;
297 log << MSG::INFO <<
" SL Header Errors............." << m_RPCcheckfail[9] <<
endmsg;
298 log << MSG::INFO <<
" SL Footer Errors............." << m_RPCcheckfail[10] <<
endmsg;
299 log << MSG::INFO <<
" RX Footer Errors............." << m_RPCcheckfail[11] <<
endmsg;
300 log << MSG::INFO <<
" CRC8 check Failures.........." << m_RPCcheckfail[12] <<
endmsg;
301 log << MSG::INFO <<
" ==================================================== " <<
endmsg;
305 const std::vector<IdentifierHash>& collections,
311 return StatusCode::FAILURE;
314 if (RPC_SECTORLOGIC ==
nullptr) {
ATH_MSG_DEBUG(
"RPC_SECTORLOGIC is null, so we will skip decoding the sector logic information"); }
318 robFrag.rod_data(
data);
322 uint32_t sourceId = robFrag.source_id();
323 uint32_t rod_sourceId = robFrag.rod_source_id();
324 uint16_t subDetector = (sourceId & 0xff0000) >> 16;
326 ATH_MSG_VERBOSE(
"ROD version: " << MSG::hex <<
version << MSG::dec <<
" ROB source ID: " << MSG::hex << sourceId << MSG::dec
327 <<
" ROD source ID: " << MSG::hex << rod_sourceId << MSG::dec <<
" Subdetector: " << MSG::hex
328 << subDetector << MSG::dec);
331 bool isSimulated = (
data[0] == 0xee1234ee) ?
true :
false;
334 if (((
version & 0x03000000) == 0x03000000) && (
data[2] != 0x00) && ((
data[0] & 0xffff0000) == 0)) {
337 }
else if (
version == 0x2400000 || isSimulated) {
340 }
else if (((
version & 0x03000000) == 0x03000000) &&
341 ((
data[0] & 0xffff0000) != 0))
357 std::map<Identifier, RpcPad*> mapOfCollections;
367 if (alreadyPresent) {
368 ATH_MSG_DEBUG(
"RPC RDO collection already exist with collection hash = " <<
static_cast<unsigned int>(
it)
369 <<
" converting is skipped!");
371 ATH_MSG_DEBUG(
"Created new Pad Collection Hash ID = " <<
static_cast<unsigned int>(
it));
375 mapOfCollections[coll->
identify()] = coll;
380 if (mapOfCollections.empty()) {
381 ATH_MSG_VERBOSE(
"mapOfCollections is empty; fillCollectionsFromRob_v302 will not be called");
382 cnv_sc = StatusCode::SUCCESS;
388 if (cnv_sc != StatusCode::SUCCESS) {
389 if (cnv_sc == StatusCode::RECOVERABLE) {
397 for (
const std::map<Identifier, RpcPad*>::value_type&
it : mapOfCollections) {
403 ATH_MSG_DEBUG(
"RpcPad collection with hash " << (
int)(
it.second)->identifyHash()
404 <<
" was already decoded in a parallel view");
409 if (status_lock != StatusCode::SUCCESS) {
410 ATH_MSG_ERROR(
"Failed to add RPC PAD collection to container with hash " << (
int)(
it.second)->identifyHash());
412 ATH_MSG_DEBUG(
"Adding RpcPad collection with hash " << (
int)(
it.second)->identifyHash()
413 <<
" to the RpcPad Container | size = " << (
it.second)->size());
426 ATH_MSG_DEBUG(
"RPC RDO collection already exist with collection hash = " <<
static_cast<unsigned int>(
it)
427 <<
" converting is skipped!");
429 ATH_MSG_VERBOSE(
" Created new Pad Collection Hash ID = " <<
static_cast<unsigned int>(
it));
442 if (cnv_sc.isFailure()) {
ATH_MSG_VERBOSE(
"Error into the RPC fillCollections decoding"); }
449 if (status_lock != StatusCode::SUCCESS) {
450 ATH_MSG_ERROR(
"Failed to add RPC PAD collection to container");
454 <<
" to the RpcPad Container | size = " << coll->
size());
467 bool skipSectorLogicDecoding = (sectorLogicContainer ==
nullptr);
468 if (skipSectorLogicDecoding)
ATH_MSG_DEBUG(
"Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
480 const int size =
p.size();
491 char decoded_char[1000];
492 for (
int i = 0;
i <
size;
i++) {
493 decoded = (
p[
i] & 0xf000) >> 12;
494 if (decoded < 0x4) sprintf(decoded_char,
"Hit data");
495 if (decoded == 0x4) sprintf(decoded_char,
"CM Footer");
496 if (decoded == 0x5) sprintf(decoded_char,
"PAD Header");
497 if (decoded == 0x6) sprintf(decoded_char,
"PAD/SL Subheader");
498 if (decoded == 0x7) sprintf(decoded_char,
"PAD Footer");
499 if (decoded == 0x8) sprintf(decoded_char,
"CM Subheader");
500 if (decoded == 0x9) sprintf(decoded_char,
"RX Header");
501 if (decoded == 0
xa) sprintf(decoded_char,
"PAD Prefooter");
502 if (decoded == 0
xb) sprintf(decoded_char,
"RX Footer");
503 if (decoded == 0xc) sprintf(decoded_char,
"CM Header");
504 if (decoded == 0
xd) sprintf(decoded_char,
"SL Header");
505 if (decoded == 0xe) sprintf(decoded_char,
"RX Subheader");
506 if (decoded == 0xf) sprintf(decoded_char,
"SL Footer");
508 msg(
MSG::VERBOSE) <<
"word " <<
i <<
" = " << MSG::hex <<
p[
i] << MSG::dec <<
" " << MSG::hex << decoded << MSG::dec <<
" "
509 << decoded_char <<
endmsg;
515 return StatusCode::FAILURE;
531 bool foundPad =
false;
537 bool isSLHeader =
false;
538 bool isSLSubHeader =
false;
539 bool isSLFooter =
false;
540 bool isSLFragment =
false;
541 bool isRXHeader =
false;
542 bool isRXFooter =
false;
543 bool isPADFragment =
false;
544 bool isPadHeader =
false;
545 bool isPadSubHeader =
false;
546 bool isPadPreFooter =
false;
547 bool isPadFooter =
false;
559 unsigned short int PadID = 99;
565 unsigned int SLBodyWords = 0;
566 unsigned int SL_data_sise = 500;
567 unsigned short int SLBuff[500];
571 uint16_t subDetectorID = (sourceId & 0xff0000) >> 16;
573 uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
590 isPadSubHeader =
false;
591 isPadPreFooter =
false;
594 isSLSubHeader =
false;
600 if (!skipSectorLogicDecoding) { SLROS.
decodeFragment(currentWord, recField); }
604 isSLFragment =
false;
605 isPADFragment =
false;
607 isPadSubHeader =
true;
612 isSLFragment =
false;
614 isPadPreFooter =
true;
620 isPADFragment =
false;
623 isSLFragment =
false;
625 isSLSubHeader =
true;
629 if (skipSectorLogicDecoding) {
631 isSLSubHeader =
false;
632 isSLFragment =
false;
640 char decoded_char[256];
642 sprintf(decoded_char,
" RX Header");
643 }
else if (isRXFooter) {
644 sprintf(decoded_char,
" RX Footer");
645 }
else if (isSLHeader) {
646 sprintf(decoded_char,
" SL Header");
647 }
else if (isSLSubHeader) {
648 sprintf(decoded_char,
" SL SubHeader");
649 }
else if (isSLFooter) {
650 sprintf(decoded_char,
" SL Footer");
651 }
else if (isPadHeader) {
652 sprintf(decoded_char,
" Pad Header");
653 }
else if (isPadSubHeader) {
654 sprintf(decoded_char,
" Pad SubHeader");
655 }
else if (isPadPreFooter) {
656 sprintf(decoded_char,
" Pad PreFooter");
657 }
else if (isPadFooter) {
658 sprintf(decoded_char,
" Pad Footer");
659 }
else if (isSLFragment) {
660 sprintf(decoded_char,
" SL Fragment");
661 }
else if (isPADFragment) {
662 sprintf(decoded_char,
" Pad Fragment");
664 sprintf(decoded_char,
" Undecoded");
667 msg(
MSG::VERBOSE) <<
i <<
" -->current data word is " << MSG::hex << currentWord << MSG::dec << decoded_char <<
endmsg;
681 sectorForCabling = 2 * rodId + rxid;
682 sector =
side * 32 + sectorForCabling;
687 sectorForCabling = 7;
691 sectorForCabling = 8;
695 sectorForCabling = 8;
698 }
else if (isRXFooter) {
700 }
else if (isSLHeader || isSLFragment || isSLSubHeader || isSLFooter) {
706 slfel1id = SLROS.
fel1id();
709 ATH_MSG_VERBOSE(
" SL Header: slfel1id " << slfel1id <<
" slid: " << slid);
710 }
else if (isSLSubHeader) {
717 else if (isSLFooter) {
718 if (SLindex > 1) {
ATH_MSG_VERBOSE(
"More than 2 SL fragments in sector " << sector); }
725 for (
unsigned short j = 0; j < SLBodyWords; j++) {
735 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector,
side)) {
736 slstatus = SLROS.
status();
740 bool inputHeaderFound =
false;
741 bool outputHeaderFound =
false;
742 ATH_MSG_VERBOSE(
"New RpcSectorLogic: sector=" << sector <<
" fel1id=" << slfel1id <<
" BCID=" << slbcid);
764 inputHeaderFound =
true;
766 if (!inputHeaderFound) {
777 new RpcSLTriggerHit(rowinBcid, slPadId, ptid, roi, outerPlane, overlapPhi, overlapEta, triggerBcid);
780 ATH_MSG_VERBOSE(
"New input RpcSLTriggerHit: ptid, roi= " << ptid <<
" " << roi);
784 outputHeaderFound =
true;
786 if (!outputHeaderFound) {
794 for (
int icand = 0; icand < SLROS.
nTriggerCand(); ++icand) {
800 overlapEta, triggerBcid);
804 ATH_MSG_VERBOSE(
"New output RpcSLTriggerHit: ptid, roi= " << ptid <<
" " << roi);
813 if (sectorLogicContainer) sectorLogicContainer->
push_back(sl);
815 if (sectorLogicContainer && !sectorLogicContainer->
setSector(sector,
side)) {
816 ATH_MSG_VERBOSE(
"Sector " << sector <<
" decoded more than once in SL");
821 if (SLBodyWords >= SL_data_sise) {
823 return StatusCode::FAILURE;
825 SLBuff[SLBodyWords] = currentWord;
829 }
else if (isPadHeader || isPADFragment) {
835 if (recField ==
'H') {
836 PadID = PDROS.
padid();
849 side = (sector < 32) ? 0 : 1;
853 if (!rpcCabling->giveOfflineId(
side, sectorLogic, PadID, padOfflineId)) {
855 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << PadID <<
" at side " <<
side
856 <<
" and sector " << sectorLogic <<
endmsg;
860 <<
" associated to PAD n. " << PadID <<
" at side " <<
side <<
" and sector " << sectorLogic
865 if (thisPadOfflineId == padOfflineId) {
868 <<
" requested for the conversion; return this collection" <<
endmsg;
872 v.setOnlineId(PadID);
876 v.setLvl1Id(PDROS.
l1id());
881 <<
m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
882 <<
" requested for the conversion" <<
endmsg;
887 if (recField ==
'S') {
889 v.setBcId(PDROS.
bcid());
894 if (recField ==
'P') {
899 if (currentWord & 0x0fff) {
901 msg(
MSG::VERBOSE) <<
"Pad Busy status not zero ! value: " << MSG::hex << (currentWord & 0x0fff) << MSG::dec
906 if (recField ==
'F') {
918 if (!(PadID > 3 && sector % 2 > 0)) {
return StatusCode::SUCCESS; }
922 isPadFooter ? isPADFragment = false : isPADFragment =
true;
943 matrixROS =
matrix->getHeader();
947 matrixROS =
matrix->getSubHeader();
951 msg(
MSG::VERBOSE) <<
"Creating a new CM, cmaId=" << cmaId <<
" fel1id=" << fel1id <<
" febcid=" << febcid
957 matrixROS =
matrix->getFooter();
963 for (
int i = 0;
i <
matrix->numberOfBodyWords(); ++
i) {
964 matrixROS =
matrix->getCMAHit(
i);
977 <<
" ijk=" << ijk <<
" channel=" <<
channel);
981 }
else if (ijk == 7) {
987 <<
" ijk=" << ijk <<
" overlap=" << overlap
995 v.push_back(coinMatrix);
1006 return StatusCode::SUCCESS;
1014 bool skipSectorLogicDecoding = (sectorLogicContainer ==
nullptr);
1015 if (skipSectorLogicDecoding)
ATH_MSG_DEBUG(
"Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
1020 if (data_size > 0) {
1022 for (
unsigned int i = 0;
i < data_size;
i++)
1028 uint16_t side = (subDetector == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
1041 bool foundPad =
false;
1043 bool isSLHeader =
false;
1044 bool isSLFooter =
false;
1045 bool isSLFragment =
false;
1046 bool isRXHeader =
false;
1047 bool isRXFooter =
false;
1048 bool isPADFragment =
false;
1049 bool isPadHeader =
false;
1050 bool isPadSubHeader =
false;
1051 bool isPadPreFooter =
false;
1052 bool isPadFooter =
false;
1063 unsigned short int PadID = 99;
1064 unsigned int SLBodyWords = 0;
1065 unsigned int SL_data_size = 500;
1066 unsigned short int SLBuff[500];
1075 isPadHeader =
false;
1076 isPadSubHeader =
false;
1077 isPadPreFooter =
false;
1078 isPadFooter =
false;
1084 ATH_MSG_VERBOSE(
" -->current data word is " << std::hex << currentWord << std::dec);
1091 if (RXROS.
isHeader() && !isSLFragment)
1093 else if (RXROS.
isFooter() && !isSLFragment)
1095 else if (PDROS.
isHeader() && !isSLFragment)
1098 isPadSubHeader =
true;
1100 isPadPreFooter =
true;
1101 else if (PDROS.
isFooter() && !isSLFragment)
1109 if (skipSectorLogicDecoding) {
1111 isSLFragment =
false;
1118 msg(
MSG::VERBOSE) <<
" Pad Header: " << isPadHeader <<
" Pad SubHeader: " << isPadSubHeader
1119 <<
" Pad PreFooter: " << isPadPreFooter <<
" Pad Footer: " << isPadFooter <<
endmsg;
1144 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector, 0)) {
1148 }
else if (sectorLogicContainer) {
1151 if ((*itSL)->sectorId() == sector) {
1158 }
else if (isRXFooter) {
1162 }
else if (isSLHeader || isSLFragment) {
1163 isSLFooter ? isSLFragment = false : isSLFragment =
true;
1178 if (isSLHeader) SLBodyWords = 0;
1181 else if (isSLFooter) {
1183 if (SLindex > 1) {
msg(MSG::ERROR) <<
"More than 2 SL fragments in sector " << sector <<
endmsg; }
1193 for (
unsigned short j = 0; j < SLBodyWords; j++) {
1202 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector, SLindex)) {
1209 for (
int igate = 0; igate < nSLgate; ++igate) {
1210 for (
int ilink = 0; ilink < nSLlink; ++ilink) {
1217 uint16_t tower = ilink + 2 * SLindex;
1223 uint16_t triggerBcid = sectorLogic->
bcid(ilink, igate);
1241 for (
int icount = 0; icount < nSLcount; ++icount) {
1249 if (SLindex == 0 && sectorLogicContainer) { sectorLogicContainer->
push_back(sl); }
1256 if (SLBodyWords >= SL_data_size) {
1258 return StatusCode::FAILURE;
1260 SLBuff[SLBodyWords] = currentWord;
1264 }
else if (isPadHeader || isPADFragment) {
1272 if (recField ==
'H') {
1273 PadID = PDROS.
padid();
1277 side = (sector < 32) ? 0 : 1;
1287 if (!rpcCabling->giveOfflineId(
side, sectorLogic, PadID, padOfflineId)) {
1289 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << PadID <<
" at side " <<
side
1290 <<
" and sector " << sectorLogic <<
endmsg;
1293 << PadID <<
" at side " <<
side <<
" and sector " << sectorLogic <<
endmsg;
1296 if (thisPadOfflineId == padOfflineId) {
1299 <<
" requested for the conversion; return this collection" <<
endmsg;
1305 v.setOnlineId(PadID);
1307 v.setSector(sector);
1310 v.setLvl1Id(PDROS.
l1id());
1315 <<
m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
1316 <<
" requested for the conversion" <<
endmsg;
1321 if (recField ==
'S') {
1323 v.setBcId(PDROS.
bcid());
1330 if (recField ==
'F') {
1337 return StatusCode::SUCCESS;
1341 isPadFooter ? isPADFragment = false : isPADFragment =
true;
1363 matrixROS =
matrix->getHeader();
1367 matrixROS =
matrix->getSubHeader();
1371 msg(
MSG::VERBOSE) <<
"Creating a new CM, cmaId=" << cmaId <<
" fel1id=" << fel1id <<
" febcid=" << febcid <<
endmsg;
1380 for (
int i = 0;
i <
matrix->numberOfBodyWords(); ++
i) {
1381 matrixROS =
matrix->getCMAHit(
i);
1398 }
else if (ijk == 7) {
1404 <<
" ijk=" << ijk <<
" overlap=" << overlap <<
" threshold=" <<
threshold <<
endmsg;
1411 v.push_back(coinMatrix);
1421 return StatusCode::SUCCESS;
1428 const int rodHeader = 8;
1429 const int rodFooter = 3;
1430 bool printMessage =
true;
1450 std::vector<uint16_t> v16 =
get16bits(
data, data_size, rodHeader, rodFooter);
1452 int word16Count = 0;
1453 int size16 = v16.size();
1455 assert(size16 > 0 && size16 == (
int)(2 * (data_size - rodHeader - rodFooter)));
1474 uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 0 : 1;
1479 assert(rodId <= 15);
1482 char rxHeader =
'U';
1483 if (!
ensure_more_data(word16Count, size16,
msg(), printMessage,
"start of data"))
return StatusCode::FAILURE;
1484 uint16_t receiverHeaderFragment = v16[word16Count];
1486 if (rxHeader ==
'H') {
1490 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a receiver header "
1492 <<
" Fragment ID is " << MSG::hex << rxHeader << MSG::dec <<
endmsg;
1494 while (rxHeader ==
'H' && word16Count < size16) {
1496 msg(
MSG::VERBOSE) <<
"The receiver header word is " << MSG::hex << receiverHeaderFragment << MSG::dec <<
endmsg;
1499 assert(slogic <= 31);
1500 char padHeader =
'U';
1501 uint16_t padHeaderFragment = v16[word16Count];
1503 if (padHeader ==
'H') {
1507 msg(
MSG::VERBOSE) <<
"Rpc_ROD_Decoder::ERROR : Expecting a pad header "
1508 <<
" Fragment ID is " << padHeader <<
endmsg;
1510 while (padHeader ==
'H') {
1519 if (!rpcCabling->giveOfflineId(
side, slogic, padId, padOfflineId)) {
1521 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << padId <<
" at side " <<
side
1522 <<
" and sector " << slogic <<
endmsg;
1525 << padId <<
" at side " <<
side <<
" and sector " << slogic <<
endmsg;
1532 if (thisPadOfflineId == padOfflineId) {
1536 v.setOnlineId(padId);
1538 v.setSector(sectorID);
1544 char cmaHeader =
'U';
1546 uint16_t cmaHeaderFragment = v16[word16Count];
1548 if (cmaHeader ==
'H') {
1553 <<
" Fragment ID is " << cmaHeader <<
endmsg;
1555 while (cmaHeader ==
'H') {
1558 char cmaSubHeader =
'U';
1561 uint16_t cmaSubHeaderFragment = v16[word16Count];
1562 matrixReadout.
decodeFragment(cmaSubHeaderFragment, cmaSubHeader);
1563 if (cmaSubHeader ==
'S') {
1564 febcid = matrixReadout.
febcid();
1568 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a cma sub-header"
1569 <<
" Fragment ID is " << cmaSubHeader <<
endmsg;
1574 uint16_t cmaBodyFragment = v16[word16Count];
1576 if (cmaBody ==
'B') {
1581 <<
" Fragment ID is " << cmaBody <<
endmsg;
1582 while (cmaBody ==
'B') {
1592 }
else if (ijk == 7) {
1606 cmaBodyFragment = v16[word16Count];
1608 if (cmaBody ==
'B') {
1612 <<
" " << MSG::hex << cmaBodyFragment << MSG::dec <<
endmsg;
1614 ATH_MSG_VERBOSE(
" No more body fragment found " << cmaBody <<
" " << MSG::hex << cmaBodyFragment << MSG::dec);
1617 char cmaFooter =
'U';
1623 uint16_t cmaFooterFragment = v16[word16Count];
1625 if (cmaFooter ==
'F') {
1630 ATH_MSG_ERROR(
"Trying to call null coinMatrix - this should never happen!");
1637 <<
" Fragment ID is " << cmaFooter <<
" " << MSG::hex << cmaFooterFragment << MSG::dec
1641 if (thisPadOfflineId == padOfflineId)
1642 v.push_back(coinMatrix);
1647 cmaHeaderFragment = v16[word16Count];
1649 if (cmaHeader ==
'H') {
1655 char padFooter =
'U';
1658 uint16_t padFooterFragment = v16[word16Count];
1660 if (padFooter ==
'F') {
1664 if (thisPadOfflineId == padOfflineId) {
1665 v.setErrorCode(errorCode);
1667 return StatusCode::FAILURE;
1670 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a pad footer "
1671 <<
" Fragment ID is " << padFooter <<
" " << MSG::hex << padFooterFragment << MSG::dec <<
endmsg;
1673 padHeaderFragment = v16[word16Count];
1675 if (padHeader ==
'H') {
1682 char rxFooter =
'U';
1684 uint16_t receiverFooterFragment = v16[word16Count];
1686 if (rxFooter ==
'F') {
1690 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a receiver footer "
1691 <<
" Fragment ID is " << rxFooter <<
" " << MSG::hex << receiverFooterFragment << MSG::dec <<
endmsg;
1693 if (word16Count < size16) {
1694 receiverHeaderFragment = v16[word16Count];
1696 if (rxHeader ==
'H') {
1707 return StatusCode::FAILURE;
1714 std::vector<uint16_t>
result;
1716 for (
int i = nHeader;
i < (
size - nFooter);
i++) {
1720 result.push_back(fragment);
1730 std::vector<uint16_t>
result;
1732 for (
int i = nHeader;
i < (
size - nFooter);
i++) {
1736 result.push_back(fragment);