5 #ifndef MUONBYTESTREAM_RPCROD_DECODER_H
6 #define MUONBYTESTREAM_RPCROD_DECODER_H
12 #include "GaudiKernel/GaudiException.h"
13 #include "GaudiKernel/ServiceHandle.h"
14 #include "GaudiKernel/ToolHandle.h"
27 #include "eformat/Issue.h"
28 #include "eformat/SourceIdentifier.h"
39 if (printMessage &&
log.level() <= MSG::WARNING) {
60 const bool& decodeSL)
const override;
84 inline std::vector<uint16_t>
get16bits(
BS data,
const int size,
const int nHeader,
const int nFooter)
const;
96 Gaudi::Property<int>
m_nobxs {
this,
"NOBXS", 8,
"Number of bunch crossings in readout"};
122 for (
int i = ini;
i <
end;
i++) {
123 decoded = ((*pdata)[
i] & 0xf000) >> 12;
126 if (decoded == 0x9) {
133 sc = StatusCode::FAILURE;
139 else if (decoded == 0xe) {
145 sc = StatusCode::FAILURE;
150 else if (decoded == 0x5) {
156 sc = StatusCode::FAILURE;
162 else if (decoded == 0x6) {
170 sc = StatusCode::FAILURE;
176 else if (decoded == 0xc) {
182 sc = StatusCode::FAILURE;
188 else if (decoded == 0x8) {
194 sc = StatusCode::FAILURE;
200 else if (decoded == 0x4) {
205 ++m_RPCcheckfail[12];
206 sc = StatusCode::RECOVERABLE;
211 sc = StatusCode::FAILURE;
217 else if (decoded == 0
xa) {
223 sc = StatusCode::FAILURE;
229 else if (decoded == 0x7) {
235 sc = StatusCode::FAILURE;
241 else if (decoded == 0
xd) {
247 sc = StatusCode::FAILURE;
253 else if (decoded == 0xf) {
257 ++m_RPCcheckfail[10];
259 sc = StatusCode::FAILURE;
264 else if (decoded == 0
xb) {
270 ++m_RPCcheckfail[11];
272 sc = StatusCode::FAILURE;
279 sc = StatusCode::FAILURE;
288 log <<
MSG::INFO <<
" ============ FINAL RPC DATA FORMAT STAT. =========== " <<
endmsg;
289 int tmp = m_RPCcheckfail[0].load();
303 log <<
MSG::INFO <<
" ==================================================== " <<
endmsg;
307 const std::vector<IdentifierHash>& collections,
313 return StatusCode::FAILURE;
316 if (RPC_SECTORLOGIC ==
nullptr) {
ATH_MSG_DEBUG(
"RPC_SECTORLOGIC is null, so we will skip decoding the sector logic information"); }
320 robFrag.rod_data(
data);
324 uint32_t sourceId = robFrag.source_id();
325 uint32_t rod_sourceId = robFrag.rod_source_id();
326 uint16_t subDetector = (sourceId & 0xff0000) >> 16;
328 ATH_MSG_VERBOSE(
"ROD version: " << MSG::hex <<
version << MSG::dec <<
" ROB source ID: " << MSG::hex << sourceId << MSG::dec
329 <<
" ROD source ID: " << MSG::hex << rod_sourceId << MSG::dec <<
" Subdetector: " << MSG::hex
330 << subDetector << MSG::dec);
333 bool isSimulated = (
data[0] == 0xee1234ee) ?
true :
false;
336 if (((
version & 0x03000000) == 0x03000000) && (
data[2] != 0x00) && ((
data[0] & 0xffff0000) == 0)) {
339 }
else if (
version == 0x2400000 || isSimulated) {
342 }
else if (((
version & 0x03000000) == 0x03000000) &&
343 ((
data[0] & 0xffff0000) != 0))
359 std::map<Identifier, RpcPad*> mapOfCollections;
369 if (alreadyPresent) {
370 ATH_MSG_DEBUG(
"RPC RDO collection already exist with collection hash = " <<
static_cast<unsigned int>(
it)
371 <<
" converting is skipped!");
373 ATH_MSG_DEBUG(
"Created new Pad Collection Hash ID = " <<
static_cast<unsigned int>(
it));
377 mapOfCollections[coll->
identify()] = coll;
382 if (mapOfCollections.empty()) {
383 ATH_MSG_VERBOSE(
"mapOfCollections is empty; fillCollectionsFromRob_v302 will not be called");
384 cnv_sc = StatusCode::SUCCESS;
390 if (cnv_sc != StatusCode::SUCCESS) {
391 if (cnv_sc == StatusCode::RECOVERABLE) {
399 for (
const std::map<Identifier, RpcPad*>::value_type&
it : mapOfCollections) {
404 if (
lock.alreadyPresent()) {
405 ATH_MSG_DEBUG(
"RpcPad collection with hash " << (
int)(
it.second)->identifyHash()
406 <<
" was already decoded in a parallel view");
409 StatusCode status_lock =
lock.addOrDelete(std::unique_ptr<RpcPad>(
it.second));
411 if (status_lock != StatusCode::SUCCESS) {
412 ATH_MSG_ERROR(
"Failed to add RPC PAD collection to container with hash " << (
int)(
it.second)->identifyHash());
414 ATH_MSG_DEBUG(
"Adding RpcPad collection with hash " << (
int)(
it.second)->identifyHash()
415 <<
" to the RpcPad Container | size = " << (
it.second)->size());
427 if (
lock.alreadyPresent()) {
428 ATH_MSG_DEBUG(
"RPC RDO collection already exist with collection hash = " <<
static_cast<unsigned int>(
it)
429 <<
" converting is skipped!");
431 ATH_MSG_VERBOSE(
" Created new Pad Collection Hash ID = " <<
static_cast<unsigned int>(
it));
444 if (cnv_sc.isFailure()) {
ATH_MSG_VERBOSE(
"Error into the RPC fillCollections decoding"); }
448 StatusCode status_lock =
lock.addOrDelete(std::unique_ptr<RpcPad>(coll));
451 if (status_lock != StatusCode::SUCCESS) {
452 ATH_MSG_ERROR(
"Failed to add RPC PAD collection to container");
456 <<
" to the RpcPad Container | size = " << coll->
size());
469 bool skipSectorLogicDecoding = (sectorLogicContainer ==
nullptr);
470 if (skipSectorLogicDecoding)
ATH_MSG_DEBUG(
"Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
482 const int size =
p.size();
493 char decoded_char[1000];
494 for (
int i = 0;
i <
size;
i++) {
495 decoded = (
p[
i] & 0xf000) >> 12;
496 if (decoded < 0x4) sprintf(decoded_char,
"Hit data");
497 if (decoded == 0x4) sprintf(decoded_char,
"CM Footer");
498 if (decoded == 0x5) sprintf(decoded_char,
"PAD Header");
499 if (decoded == 0x6) sprintf(decoded_char,
"PAD/SL Subheader");
500 if (decoded == 0x7) sprintf(decoded_char,
"PAD Footer");
501 if (decoded == 0x8) sprintf(decoded_char,
"CM Subheader");
502 if (decoded == 0x9) sprintf(decoded_char,
"RX Header");
503 if (decoded == 0
xa) sprintf(decoded_char,
"PAD Prefooter");
504 if (decoded == 0
xb) sprintf(decoded_char,
"RX Footer");
505 if (decoded == 0xc) sprintf(decoded_char,
"CM Header");
506 if (decoded == 0
xd) sprintf(decoded_char,
"SL Header");
507 if (decoded == 0xe) sprintf(decoded_char,
"RX Subheader");
508 if (decoded == 0xf) sprintf(decoded_char,
"SL Footer");
510 msg(
MSG::VERBOSE) <<
"word " <<
i <<
" = " << MSG::hex <<
p[
i] << MSG::dec <<
" " << MSG::hex << decoded << MSG::dec <<
" "
511 << decoded_char <<
endmsg;
517 return StatusCode::FAILURE;
533 bool foundPad =
false;
539 bool isSLHeader =
false;
540 bool isSLSubHeader =
false;
541 bool isSLFooter =
false;
542 bool isSLFragment =
false;
543 bool isRXHeader =
false;
544 bool isRXFooter =
false;
545 bool isPADFragment =
false;
546 bool isPadHeader =
false;
547 bool isPadSubHeader =
false;
548 bool isPadPreFooter =
false;
549 bool isPadFooter =
false;
561 unsigned short int PadID = 99;
567 unsigned int SLBodyWords = 0;
568 unsigned int SL_data_sise = 500;
569 unsigned short int SLBuff[500];
573 uint16_t subDetectorID = (sourceId & 0xff0000) >> 16;
575 uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
592 isPadSubHeader =
false;
593 isPadPreFooter =
false;
596 isSLSubHeader =
false;
602 if (!skipSectorLogicDecoding) { SLROS.
decodeFragment(currentWord, recField); }
606 isSLFragment =
false;
607 isPADFragment =
false;
609 isPadSubHeader =
true;
614 isSLFragment =
false;
616 isPadPreFooter =
true;
622 isPADFragment =
false;
625 isSLFragment =
false;
627 isSLSubHeader =
true;
631 if (skipSectorLogicDecoding) {
633 isSLSubHeader =
false;
634 isSLFragment =
false;
642 char decoded_char[256];
644 sprintf(decoded_char,
" RX Header");
645 }
else if (isRXFooter) {
646 sprintf(decoded_char,
" RX Footer");
647 }
else if (isSLHeader) {
648 sprintf(decoded_char,
" SL Header");
649 }
else if (isSLSubHeader) {
650 sprintf(decoded_char,
" SL SubHeader");
651 }
else if (isSLFooter) {
652 sprintf(decoded_char,
" SL Footer");
653 }
else if (isPadHeader) {
654 sprintf(decoded_char,
" Pad Header");
655 }
else if (isPadSubHeader) {
656 sprintf(decoded_char,
" Pad SubHeader");
657 }
else if (isPadPreFooter) {
658 sprintf(decoded_char,
" Pad PreFooter");
659 }
else if (isPadFooter) {
660 sprintf(decoded_char,
" Pad Footer");
661 }
else if (isSLFragment) {
662 sprintf(decoded_char,
" SL Fragment");
663 }
else if (isPADFragment) {
664 sprintf(decoded_char,
" Pad Fragment");
666 sprintf(decoded_char,
" Undecoded");
669 msg(
MSG::VERBOSE) <<
i <<
" -->current data word is " << MSG::hex << currentWord << MSG::dec << decoded_char <<
endmsg;
683 sectorForCabling = 2 * rodId + rxid;
684 sector =
side * 32 + sectorForCabling;
689 sectorForCabling = 7;
693 sectorForCabling = 8;
697 sectorForCabling = 8;
700 }
else if (isRXFooter) {
702 }
else if (isSLHeader || isSLFragment || isSLSubHeader || isSLFooter) {
708 slfel1id = SLROS.
fel1id();
711 ATH_MSG_VERBOSE(
" SL Header: slfel1id " << slfel1id <<
" slid: " << slid);
712 }
else if (isSLSubHeader) {
719 else if (isSLFooter) {
720 if (SLindex > 1) {
ATH_MSG_VERBOSE(
"More than 2 SL fragments in sector " << sector); }
727 for (
unsigned short j = 0; j < SLBodyWords; j++) {
737 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector,
side)) {
738 slstatus = SLROS.
status();
742 bool inputHeaderFound =
false;
743 bool outputHeaderFound =
false;
744 ATH_MSG_VERBOSE(
"New RpcSectorLogic: sector=" << sector <<
" fel1id=" << slfel1id <<
" BCID=" << slbcid);
766 inputHeaderFound =
true;
768 if (!inputHeaderFound) {
779 new RpcSLTriggerHit(rowinBcid, slPadId, ptid, roi, outerPlane, overlapPhi, overlapEta, triggerBcid);
782 ATH_MSG_VERBOSE(
"New input RpcSLTriggerHit: ptid, roi= " << ptid <<
" " << roi);
786 outputHeaderFound =
true;
788 if (!outputHeaderFound) {
796 for (
int icand = 0; icand < SLROS.
nTriggerCand(); ++icand) {
802 overlapEta, triggerBcid);
806 ATH_MSG_VERBOSE(
"New output RpcSLTriggerHit: ptid, roi= " << ptid <<
" " << roi);
815 if (sectorLogicContainer) sectorLogicContainer->
push_back(sl);
817 if (sectorLogicContainer && !sectorLogicContainer->
setSector(sector,
side)) {
818 ATH_MSG_VERBOSE(
"Sector " << sector <<
" decoded more than once in SL");
823 if (SLBodyWords >= SL_data_sise) {
825 return StatusCode::FAILURE;
827 SLBuff[SLBodyWords] = currentWord;
831 }
else if (isPadHeader || isPADFragment) {
837 if (recField ==
'H') {
838 PadID = PDROS.
padid();
851 side = (sector < 32) ? 0 : 1;
855 if (!rpcCabling->giveOfflineId(
side, sectorLogic, PadID, padOfflineId)) {
857 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << PadID <<
" at side " <<
side
858 <<
" and sector " << sectorLogic <<
endmsg;
862 <<
" associated to PAD n. " << PadID <<
" at side " <<
side <<
" and sector " << sectorLogic
867 if (thisPadOfflineId == padOfflineId) {
870 <<
" requested for the conversion; return this collection" <<
endmsg;
874 v.setOnlineId(PadID);
878 v.setLvl1Id(PDROS.
l1id());
883 <<
m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
884 <<
" requested for the conversion" <<
endmsg;
889 if (recField ==
'S') {
891 v.setBcId(PDROS.
bcid());
896 if (recField ==
'P') {
901 if (currentWord & 0x0fff) {
903 msg(
MSG::VERBOSE) <<
"Pad Busy status not zero ! value: " << MSG::hex << (currentWord & 0x0fff) << MSG::dec
908 if (recField ==
'F') {
920 if (!(PadID > 3 && sector % 2 > 0)) {
return StatusCode::SUCCESS; }
924 isPadFooter ? isPADFragment = false : isPADFragment =
true;
945 matrixROS =
matrix->getHeader();
949 matrixROS =
matrix->getSubHeader();
953 msg(
MSG::VERBOSE) <<
"Creating a new CM, cmaId=" << cmaId <<
" fel1id=" << fel1id <<
" febcid=" << febcid
959 matrixROS =
matrix->getFooter();
965 for (
int i = 0;
i <
matrix->numberOfBodyWords(); ++
i) {
966 matrixROS =
matrix->getCMAHit(
i);
979 <<
" ijk=" << ijk <<
" channel=" <<
channel);
983 }
else if (ijk == 7) {
989 <<
" ijk=" << ijk <<
" overlap=" << overlap
997 v.push_back(coinMatrix);
1008 return StatusCode::SUCCESS;
1016 bool skipSectorLogicDecoding = (sectorLogicContainer ==
nullptr);
1017 if (skipSectorLogicDecoding)
ATH_MSG_DEBUG(
"Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
1022 if (data_size > 0) {
1024 for (
unsigned int i = 0;
i < data_size;
i++)
1030 uint16_t side = (subDetector == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
1043 bool foundPad =
false;
1045 bool isSLHeader =
false;
1046 bool isSLFooter =
false;
1047 bool isSLFragment =
false;
1048 bool isRXHeader =
false;
1049 bool isRXFooter =
false;
1050 bool isPADFragment =
false;
1051 bool isPadHeader =
false;
1052 bool isPadSubHeader =
false;
1053 bool isPadPreFooter =
false;
1054 bool isPadFooter =
false;
1065 unsigned short int PadID = 99;
1066 unsigned int SLBodyWords = 0;
1067 unsigned int SL_data_size = 500;
1068 unsigned short int SLBuff[500];
1070 std::unique_ptr<RpcSectorLogic> sl{};
1077 isPadHeader =
false;
1078 isPadSubHeader =
false;
1079 isPadPreFooter =
false;
1080 isPadFooter =
false;
1086 ATH_MSG_VERBOSE(
" -->current data word is " << std::hex << currentWord << std::dec);
1093 if (RXROS.
isHeader() && !isSLFragment)
1095 else if (RXROS.
isFooter() && !isSLFragment)
1097 else if (PDROS.
isHeader() && !isSLFragment)
1100 isPadSubHeader =
true;
1102 isPadPreFooter =
true;
1103 else if (PDROS.
isFooter() && !isSLFragment)
1111 if (skipSectorLogicDecoding) {
1113 isSLFragment =
false;
1120 msg(
MSG::VERBOSE) <<
" Pad Header: " << isPadHeader <<
" Pad SubHeader: " << isPadSubHeader
1121 <<
" Pad PreFooter: " << isPadPreFooter <<
" Pad Footer: " << isPadFooter <<
endmsg;
1146 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector, 0)) {
1148 sl = std::make_unique<RpcSectorLogic>(sector, 0, 0, errorCode);
1150 }
else if (sectorLogicContainer) {
1153 if ((*itSL)->sectorId() == sector) {
1160 }
else if (isRXFooter) {
1164 }
else if (isSLHeader || isSLFragment) {
1165 isSLFooter ? isSLFragment = false : isSLFragment =
true;
1180 if (isSLHeader) SLBodyWords = 0;
1183 else if (isSLFooter) {
1185 if (SLindex > 1) {
msg(MSG::ERROR) <<
"More than 2 SL fragments in sector " << sector <<
endmsg; }
1195 for (
unsigned short j = 0; j < SLBodyWords; j++) {
1204 if (sectorLogicContainer && !sectorLogicContainer->
findSector(sector, SLindex)) {
1211 for (
int igate = 0; igate < nSLgate; ++igate) {
1212 for (
int ilink = 0; ilink < nSLlink; ++ilink) {
1219 uint16_t tower = ilink + 2 * SLindex;
1225 uint16_t triggerBcid = sectorLogic->
bcid(ilink, igate);
1229 sl->push_back(slHit);
1238 if (SLindex == 0) { sl->addTriggerRate(sectorLogic->
padTriggerRate(1)); }
1243 for (
int icount = 0; icount < nSLcount; ++icount) {
1251 if (SLindex == 0 && sectorLogicContainer) { sectorLogicContainer->
push_back(std::move(sl)); }
1258 if (SLBodyWords >= SL_data_size) {
1260 return StatusCode::FAILURE;
1262 SLBuff[SLBodyWords] = currentWord;
1266 }
else if (isPadHeader || isPADFragment) {
1274 if (recField ==
'H') {
1275 PadID = PDROS.
padid();
1279 side = (sector < 32) ? 0 : 1;
1289 if (!rpcCabling->giveOfflineId(
side, sectorLogic, PadID, padOfflineId)) {
1291 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << PadID <<
" at side " <<
side
1292 <<
" and sector " << sectorLogic <<
endmsg;
1295 << PadID <<
" at side " <<
side <<
" and sector " << sectorLogic <<
endmsg;
1298 if (thisPadOfflineId == padOfflineId) {
1301 <<
" requested for the conversion; return this collection" <<
endmsg;
1307 v.setOnlineId(PadID);
1309 v.setSector(sector);
1312 v.setLvl1Id(PDROS.
l1id());
1317 <<
m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
1318 <<
" requested for the conversion" <<
endmsg;
1323 if (recField ==
'S') {
1325 v.setBcId(PDROS.
bcid());
1332 if (recField ==
'F') {
1339 return StatusCode::SUCCESS;
1343 isPadFooter ? isPADFragment = false : isPADFragment =
true;
1365 matrixROS =
matrix->getHeader();
1369 matrixROS =
matrix->getSubHeader();
1373 msg(
MSG::VERBOSE) <<
"Creating a new CM, cmaId=" << cmaId <<
" fel1id=" << fel1id <<
" febcid=" << febcid <<
endmsg;
1382 for (
int i = 0;
i <
matrix->numberOfBodyWords(); ++
i) {
1383 matrixROS =
matrix->getCMAHit(
i);
1400 }
else if (ijk == 7) {
1406 <<
" ijk=" << ijk <<
" overlap=" << overlap <<
" threshold=" <<
threshold <<
endmsg;
1413 v.push_back(coinMatrix);
1423 return StatusCode::SUCCESS;
1430 const int rodHeader = 8;
1431 const int rodFooter = 3;
1432 bool printMessage =
true;
1452 std::vector<uint16_t> v16 =
get16bits(
data, data_size, rodHeader, rodFooter);
1454 int word16Count = 0;
1455 int size16 = v16.size();
1457 assert(size16 > 0 && size16 == (
int)(2 * (data_size - rodHeader - rodFooter)));
1476 uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 0 : 1;
1481 assert(rodId <= 15);
1484 char rxHeader =
'U';
1485 if (!
ensure_more_data(word16Count, size16,
msg(), printMessage,
"start of data"))
return StatusCode::FAILURE;
1486 uint16_t receiverHeaderFragment = v16[word16Count];
1488 if (rxHeader ==
'H') {
1492 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a receiver header "
1494 <<
" Fragment ID is " << MSG::hex << rxHeader << MSG::dec <<
endmsg;
1496 while (rxHeader ==
'H' && word16Count < size16) {
1498 msg(
MSG::VERBOSE) <<
"The receiver header word is " << MSG::hex << receiverHeaderFragment << MSG::dec <<
endmsg;
1501 assert(slogic <= 31);
1502 char padHeader =
'U';
1503 uint16_t padHeaderFragment = v16[word16Count];
1505 if (padHeader ==
'H') {
1509 msg(
MSG::VERBOSE) <<
"Rpc_ROD_Decoder::ERROR : Expecting a pad header "
1510 <<
" Fragment ID is " << padHeader <<
endmsg;
1512 while (padHeader ==
'H') {
1521 if (!rpcCabling->giveOfflineId(
side, slogic, padId, padOfflineId)) {
1523 msg(
MSG::VERBOSE) <<
"Cannot retrieve the OfflineID for the PAD n. " << padId <<
" at side " <<
side
1524 <<
" and sector " << slogic <<
endmsg;
1527 << padId <<
" at side " <<
side <<
" and sector " << slogic <<
endmsg;
1534 if (thisPadOfflineId == padOfflineId) {
1538 v.setOnlineId(padId);
1540 v.setSector(sectorID);
1546 char cmaHeader =
'U';
1548 uint16_t cmaHeaderFragment = v16[word16Count];
1550 if (cmaHeader ==
'H') {
1555 <<
" Fragment ID is " << cmaHeader <<
endmsg;
1557 while (cmaHeader ==
'H') {
1560 char cmaSubHeader =
'U';
1563 uint16_t cmaSubHeaderFragment = v16[word16Count];
1564 matrixReadout.
decodeFragment(cmaSubHeaderFragment, cmaSubHeader);
1565 if (cmaSubHeader ==
'S') {
1566 febcid = matrixReadout.
febcid();
1570 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a cma sub-header"
1571 <<
" Fragment ID is " << cmaSubHeader <<
endmsg;
1576 uint16_t cmaBodyFragment = v16[word16Count];
1578 if (cmaBody ==
'B') {
1583 <<
" Fragment ID is " << cmaBody <<
endmsg;
1584 while (cmaBody ==
'B') {
1594 }
else if (ijk == 7) {
1608 cmaBodyFragment = v16[word16Count];
1610 if (cmaBody ==
'B') {
1614 <<
" " << MSG::hex << cmaBodyFragment << MSG::dec <<
endmsg;
1616 ATH_MSG_VERBOSE(
" No more body fragment found " << cmaBody <<
" " << MSG::hex << cmaBodyFragment << MSG::dec);
1619 char cmaFooter =
'U';
1625 uint16_t cmaFooterFragment = v16[word16Count];
1627 if (cmaFooter ==
'F') {
1632 ATH_MSG_ERROR(
"Trying to call null coinMatrix - this should never happen!");
1639 <<
" Fragment ID is " << cmaFooter <<
" " << MSG::hex << cmaFooterFragment << MSG::dec
1643 if (thisPadOfflineId == padOfflineId)
1644 v.push_back(coinMatrix);
1649 cmaHeaderFragment = v16[word16Count];
1651 if (cmaHeader ==
'H') {
1657 char padFooter =
'U';
1660 uint16_t padFooterFragment = v16[word16Count];
1662 if (padFooter ==
'F') {
1666 if (thisPadOfflineId == padOfflineId) {
1667 v.setErrorCode(errorCode);
1669 return StatusCode::FAILURE;
1672 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a pad footer "
1673 <<
" Fragment ID is " << padFooter <<
" " << MSG::hex << padFooterFragment << MSG::dec <<
endmsg;
1675 padHeaderFragment = v16[word16Count];
1677 if (padHeader ==
'H') {
1684 char rxFooter =
'U';
1686 uint16_t receiverFooterFragment = v16[word16Count];
1688 if (rxFooter ==
'F') {
1692 msg(
MSG::VERBOSE) <<
"RpcROD_Decoder::ERROR : Expecting a receiver footer "
1693 <<
" Fragment ID is " << rxFooter <<
" " << MSG::hex << receiverFooterFragment << MSG::dec <<
endmsg;
1695 if (word16Count < size16) {
1696 receiverHeaderFragment = v16[word16Count];
1698 if (rxHeader ==
'H') {
1709 return StatusCode::FAILURE;
1716 std::vector<uint16_t>
result;
1718 for (
int i = nHeader;
i < (
size - nFooter);
i++) {
1722 result.push_back(fragment);
1732 std::vector<uint16_t>
result;
1734 for (
int i = nHeader;
i < (
size - nFooter);
i++) {
1738 result.push_back(fragment);