|
ATLAS Offline Software
|
#include <RpcROD_Decoder.h>
|
StatusCode | fillCollection_v240 (BS data, const uint32_t data_size, RpcPad &v) const |
| fill RpcPads from a block of integers Decode collection for old data format 2.4.0 More...
|
|
StatusCode | fillCollection_v300 (BS data, const uint32_t data_size, RpcPad &v, const uint16_t &subDetector, RpcSectorLogicContainer *) const |
| fill RpcPads from a block of integers New version for data format 3.0 (ATLAS cosmics) More...
|
|
StatusCode | fillCollection_v302new (BS data, const uint32_t data_size, RpcPad &v, const uint32_t &sourceId, RpcSectorLogicContainer *, const bool &) const |
|
StatusCode | fillCollection_v302 (BS data, const uint32_t data_size, RpcPad &v, const uint32_t &sourceId, RpcSectorLogicContainer *) const |
| fill RpcPads from a block of integers New version for data format 3.1 (ATLAS cosmics - NEW RPC READOUT) More...
|
|
StatusCode | fillCollectionsFromRob_v302 (BS data, const uint32_t data_size, std::map< Identifier, RpcPad * > &vmap, const uint32_t &sourceId, RpcSectorLogicContainer *, const bool &decodeSL) const |
|
std::vector< uint16_t > | get16bits (BS data, const int size, const int nHeader, const int nFooter) const |
|
std::vector< uint16_t > | get16bits_v301 (BS data, const int size, const int nHeader, const int nFooter) const |
|
StatusCode | checkdataformat (std::vector< uint16_t > *, int, int) const |
|
void | printcheckformat () const |
|
Definition at line 46 of file RpcROD_Decoder.h.
◆ BS
◆ RpcROD_Decoder()
Muon::RpcROD_Decoder::RpcROD_Decoder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~RpcROD_Decoder()
virtual Muon::RpcROD_Decoder::~RpcROD_Decoder |
( |
| ) |
|
|
virtualdefault |
◆ checkdataformat()
StatusCode Muon::RpcROD_Decoder::checkdataformat |
( |
std::vector< uint16_t > * |
pdata, |
|
|
int |
ini, |
|
|
int |
end |
|
) |
| const |
|
inlineprivate |
Definition at line 108 of file RpcROD_Decoder.h.
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) {
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) {
257 sc = StatusCode::FAILURE;
262 else if (decoded == 0
xb) {
270 sc = StatusCode::FAILURE;
277 sc = StatusCode::FAILURE;
◆ fillCollection_v240()
StatusCode Muon::RpcROD_Decoder::fillCollection_v240 |
( |
BS |
data, |
|
|
const uint32_t |
data_size, |
|
|
RpcPad & |
v |
|
) |
| const |
|
inlineprivate |
fill RpcPads from a block of integers Decode collection for old data format 2.4.0
Definition at line 1427 of file RpcROD_Decoder.h.
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;
◆ fillCollection_v300()
fill RpcPads from a block of integers New version for data format 3.0 (ATLAS cosmics)
Definition at line 1012 of file RpcROD_Decoder.h.
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;
◆ fillCollection_v302()
fill RpcPads from a block of integers New version for data format 3.1 (ATLAS cosmics - NEW RPC READOUT)
Definition at line 465 of file RpcROD_Decoder.h.
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;
◆ fillCollection_v302new()
◆ fillCollections()
Definition at line 304 of file RpcROD_Decoder.h.
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());
◆ fillCollectionsFromRob_v302()
◆ finalize()
StatusCode Muon::RpcROD_Decoder::finalize |
( |
| ) |
|
|
overridevirtual |
◆ get16bits()
std::vector< uint16_t > Muon::RpcROD_Decoder::get16bits |
( |
BS |
data, |
|
|
const int |
size, |
|
|
const int |
nHeader, |
|
|
const int |
nFooter |
|
) |
| const |
|
inlineprivate |
◆ get16bits_v301()
std::vector< uint16_t > Muon::RpcROD_Decoder::get16bits_v301 |
( |
BS |
data, |
|
|
const int |
size, |
|
|
const int |
nHeader, |
|
|
const int |
nFooter |
|
) |
| const |
|
inlineprivate |
◆ initialize()
StatusCode Muon::RpcROD_Decoder::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 23 of file RpcROD_Decoder.cxx.
36 ATH_MSG_ERROR(
"Readout of more than 8 BCs is not supported by the simulation");
37 return StatusCode::FAILURE;
40 return StatusCode::SUCCESS;
◆ isSector13Data()
bool Muon::RpcROD_Decoder::isSector13Data |
( |
| ) |
const |
|
inline |
◆ printcheckformat()
void Muon::RpcROD_Decoder::printcheckformat |
( |
| ) |
const |
|
inlineprivate |
Definition at line 281 of file RpcROD_Decoder.h.
286 log << MSG::INFO <<
" ============ FINAL RPC DATA FORMAT STAT. =========== " <<
endmsg;
288 log << MSG::INFO <<
" RX Header Errors............." <<
tmp <<
endmsg;
301 log << MSG::INFO <<
" ==================================================== " <<
endmsg;
◆ specialROBNumber()
int Muon::RpcROD_Decoder::specialROBNumber |
( |
| ) |
const |
|
inline |
◆ m_idHelperSvc
◆ m_maxprinterror
IntegerProperty Muon::RpcROD_Decoder::m_maxprinterror |
|
private |
◆ m_nobxs
Gaudi::Property<int> Muon::RpcROD_Decoder::m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"} |
|
private |
◆ m_printerror
int Muon::RpcROD_Decoder::m_printerror = 0 |
|
private |
◆ m_RPCcheckfail
std::atomic_int Muon::RpcROD_Decoder::m_RPCcheckfail[13] {} |
|
mutableprivate |
◆ m_rpcReadKey
◆ m_sector13Data
BooleanProperty Muon::RpcROD_Decoder::m_sector13Data |
|
private |
◆ m_specialROBNumber
IntegerProperty Muon::RpcROD_Decoder::m_specialROBNumber |
|
private |
The documentation for this class was generated from the following files:
ubit16 inputOuterPlane() const
char data[hepevt_bytes_allocation_ATLAS]
Identifier identify() const
ubit16 decodeFragment(ubit16 inputWord, char &field)
ubit16 decodeFragment(ubit16 inputWord, char &field)
ubit16 inputOverlapPhi() const
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
IntegerProperty m_maxprinterror
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcPad
ubit16 outputThreshold(int nCand) const
StatusCode fillCollectionsFromRob_v302(BS data, const uint32_t data_size, std::map< Identifier, RpcPad * > &vmap, const uint32_t &sourceId, RpcSectorLogicContainer *, const bool &decodeSL) const
float padTriggerRate(ubit16 padAddress)
std::vector< DMTest::B > xa
ubit16 numberOfCounterWords()
ubit16 inputTriggerBcid() const
#define ATH_MSG_VERBOSE(x)
std::vector< uint16_t > get16bits_v301(BS data, const int size, const int nHeader, const int nFooter) const
ubit16 hasMoreThan2TriggerCand() const
std::vector< uint16_t > get16bits(BS data, const int size, const int nHeader, const int nFooter) const
IMessageSvc * getMessageSvc(bool quiet=false)
MatrixReadOut * CMFragment()
void addCounter(const uint16_t counter)
Set methods.
SG::ReadCondHandleKey< RpcCablingCondData > m_rpcReadKey
ubit16 inputThreshold() const
StatusCode fillCollection_v300(BS data, const uint32_t data_size, RpcPad &v, const uint16_t &subDetector, RpcSectorLogicContainer *) const
fill RpcPads from a block of integers New version for data format 3.0 (ATLAS cosmics)
SectorLogicReadOut * SLFragment()
std::atomic_int m_RPCcheckfail[13]
ubit16 outputRowinBcid() const
ubit16 getSourceIDSubdetectorID()
(Non-const) Iterator class for DataVector/DataList.
OFFLINE_FRAGMENTS_NAMESPACE::PointerType BS
ubit16 decodeFragment(ubit16 inputWord, char &field)
ubit16 readSLCounterCurrent()
Gaudi::Property< int > m_nobxs
ubit16 outputOverlap(int nCand) const
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual bool tryAddFromCache(IdentifierHash hashId) override final
Looks in the cache to see if item already exists if not it returns false, If it does exist it incorpo...
ubit16 opl(ubit16 indexLink, ubit16 indexGate)
BooleanProperty m_sector13Data
StatusCode fillCollection_v240(BS data, const uint32_t data_size, RpcPad &v) const
fill RpcPads from a block of integers Decode collection for old data format 2.4.0
uint16_t numberOfInputWords()
IntegerProperty m_specialROBNumber
ubit16 inputOverlapEta() const
ubit16 nTriggerCand() const
ubit16 decodeFragment(ubit16 inputWord, char &field)
ubit16 inputRowinBcid() const
bool ensure_more_data(int index, int size, MsgStream &log, bool &printMessage, const std::string &message)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ubit16 outputTriggerBcid(int) const
void printcheckformat() const
ubit16 oveta(ubit16 indexLink, ubit16 indexGate)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
void setHasMoreThan2TriggerCand(const bool a)
ubit16 ovphi(ubit16 indexLink, ubit16 indexGate)
StatusCode addOrDelete(std::unique_ptr< T > ptr)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ubit16 getSourceIDRODID()
void setIsInput(bool isInput)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcCoinMatrix
bool findSector(const uint16_t sectorId, const uint16_t side=0) const
Check if the sector has already been decoded.
void addTriggerRate(const double trig)
def time(flags, cells_name, *args, **kw)
bool setSector(uint16_t sectorId, const uint16_t side=0)
Flag the sector as already decoded.
ubit16 bcid(ubit16 indexLink, ubit16 indexGate)
MatrixReadOut * CMFragment()
int pushWord(const ubit16 inword, uint NOBXS)
ubit16 cmadd(ubit16 indexLink, ubit16 indexGate)
uint16_t readSLHitCurrent()
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
int pushWord(const ubit16 inword, uint NOBXS)
void decodeSourceID(RODword sourceID)
ubit16 decodeFragment(ubit16 inputWord, char &field)
SectorLogicRXReadOut * SLFragment()
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
ubit16 outputRoi(int nCand) const
unsigned short int ubit16
ubit16 inputPadId() const
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ubit16 ptid(ubit16 indexLink, ubit16 indexGate)
StatusCode fillCollection_v302(BS data, const uint32_t data_size, RpcPad &v, const uint32_t &sourceId, RpcSectorLogicContainer *) const
fill RpcPads from a block of integers New version for data format 3.1 (ATLAS cosmics - NEW RPC READOU...