ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::RpcROD_Decoder Class Reference

#include <RpcROD_Decoder.h>

Inheritance diagram for Muon::RpcROD_Decoder:
Collaboration diagram for Muon::RpcROD_Decoder:

Public Member Functions

 RpcROD_Decoder (const std::string &type, const std::string &name, const IInterface *p)
 
virtual ~RpcROD_Decoder ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode fillCollections (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, RpcPadContainer &rdoIdc, const std::vector< IdentifierHash > &collections, RpcSectorLogicContainer *, const bool &decodeSL) const override
 
int specialROBNumber () const
 
bool isSector13Data () const
 

Private Types

typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType BS
 

Private Member Functions

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
 

Private Attributes

int m_printerror = 0
 
std::atomic_int m_RPCcheckfail [13] {}
 
IntegerProperty m_maxprinterror
 
Gaudi::Property< int > m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SG::ReadCondHandleKey< RpcCablingCondDatam_rpcReadKey {this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
 
IntegerProperty m_specialROBNumber
 
BooleanProperty m_sector13Data
 

Detailed Description

Definition at line 46 of file RpcROD_Decoder.h.

Member Typedef Documentation

◆ BS

Definition at line 65 of file RpcROD_Decoder.h.

Constructor & Destructor Documentation

◆ RpcROD_Decoder()

Muon::RpcROD_Decoder::RpcROD_Decoder ( const std::string &  type,
const std::string &  name,
const IInterface *  p 
)

Definition at line 16 of file RpcROD_Decoder.cxx.

16  :
17  base_class(type, name, parent) {
18  declareProperty("SpecialROBNumber", m_specialROBNumber = -1);
19  declareProperty("Sector13Data", m_sector13Data = false);
20  declareProperty("DataErrorPrintLimit", m_maxprinterror = 1000);
21 }

◆ ~RpcROD_Decoder()

virtual Muon::RpcROD_Decoder::~RpcROD_Decoder ( )
virtualdefault

Member Function Documentation

◆ 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.

108  {
109  // ===================================
110  // Check ROB fragment structure
111  // ===================================
112 
113  int decoded;
115  StatusCode sc = StatusCode::SUCCESS;
116 
117  int previous = 0;
118 
119  // Loop on buffer
120  for (int i = ini; i < end; i++) {
121  decoded = ((*pdata)[i] & 0xf000) >> 12;
122 
123  // RX Header
124  if (decoded == 0x9) {
125  if (previous == 0) {
126  previous = 1;
127  } else {
128  ++m_RPCcheckfail[0];
129  previous = 0;
130  // m_bsErrCont->addError((*pdata)[i],Muon::RXHeaderErrors);
131  sc = StatusCode::FAILURE;
132  return sc;
133  }
134  }
135 
136  // RX SubHeader
137  else if (decoded == 0xe) {
138  if (previous == 1) {
139  previous = 2;
140  } else {
141  ++m_RPCcheckfail[1];
142  previous = 0;
143  sc = StatusCode::FAILURE;
144  return sc;
145  }
146  }
147  // PAD Header
148  else if (decoded == 0x5) {
149  if (previous == 2) {
150  previous = 3;
151  } else {
152  ++m_RPCcheckfail[2];
153  previous = 0;
154  sc = StatusCode::FAILURE;
155  return sc;
156  }
157  }
158 
159  // PAD or SL Subheader
160  else if (decoded == 0x6) {
161  if (previous == 3) {
162  previous = 4;
163  } else if (previous == 8) {
164  previous = 9;
165  } else {
166  ++m_RPCcheckfail[3];
167  previous = 0;
168  sc = StatusCode::FAILURE;
169  return sc;
170  }
171  }
172 
173  // CM Header
174  else if (decoded == 0xc) {
175  if (previous == 4) {
176  previous = 5;
177  } else {
178  ++m_RPCcheckfail[4];
179  previous = 0;
180  sc = StatusCode::FAILURE;
181  return sc;
182  }
183  }
184 
185  // CM Subheader
186  else if (decoded == 0x8) {
187  if (previous == 5) {
188  previous = 6;
189  } else {
190  ++m_RPCcheckfail[5];
191  previous = 0;
192  sc = StatusCode::FAILURE;
193  return sc;
194  }
195  }
196 
197  // CM Footer
198  else if (decoded == 0x4) {
199  if (previous == -1 || previous == 6) {
200  previous = 4;
201  if (matrix.checkCRC8((ubit16)(*pdata)[i])) {
202  } else {
203  ++m_RPCcheckfail[12];
204  sc = StatusCode::RECOVERABLE;
205  }
206  } else {
207  ++m_RPCcheckfail[6];
208  previous = 0;
209  sc = StatusCode::FAILURE;
210  return sc;
211  }
212  }
213 
214  // PAD Prefooter
215  else if (decoded == 0xa) {
216  if (previous == 4) {
217  previous = 7;
218  } else {
219  ++m_RPCcheckfail[7];
220  previous = 0;
221  sc = StatusCode::FAILURE;
222  return sc;
223  }
224  }
225 
226  // PAD Footer
227  else if (decoded == 0x7) {
228  if (previous == 7) {
229  previous = 2;
230  } else {
231  ++m_RPCcheckfail[8];
232  previous = 0;
233  sc = StatusCode::FAILURE;
234  return sc;
235  }
236  }
237 
238  // SL Header
239  else if (decoded == 0xd) {
240  if (previous == 2) {
241  previous = 8;
242  } else {
243  ++m_RPCcheckfail[9];
244  previous = 0;
245  sc = StatusCode::FAILURE;
246  return sc;
247  }
248  }
249 
250  // SL Footer
251  else if (decoded == 0xf) {
252  if (previous == 9 || previous == -1) {
253  previous = 10;
254  } else {
255  ++m_RPCcheckfail[10];
256  previous = 0;
257  sc = StatusCode::FAILURE;
258  return sc;
259  }
260  }
261  // RX Footer
262  else if (decoded == 0xb) {
263  if (previous == 10) {
264  previous = 0;
265  // ===== end of fragment reached =====
266  return sc;
267  } else {
268  ++m_RPCcheckfail[11];
269  previous = 0;
270  sc = StatusCode::FAILURE;
271  return sc;
272  }
273  } else {
274  previous = -1;
275  }
276  }
277  sc = StatusCode::FAILURE;
278  return sc;
279  }

◆ 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.

1427  {
1428  const int rodHeader = 8;
1429  const int rodFooter = 3;
1430  bool printMessage = true; // to print only once per call
1431 
1432  /*
1433  msg(MSG::VERBOSE) << "**********Decoder dumping the words******** " << endmsg;
1434  if (data_size > 0 ) {
1435  msg(MSG::VERBOSE) << "The size of this ROD-read is " << data_size << endmsg;
1436  for (int i=0; i < data_size; i++)
1437  msg(MSG::VERBOSE) << "word " << i << " = " << MSG::hex << p[i] << MSG::dec << endmsg;
1438  }
1439  */
1440 
1441  // the identifier of this collection
1442  Identifier thisPadOfflineId = v.identify();
1443 
1444  if (msgLvl(MSG::VERBOSE))
1445  msg(MSG::VERBOSE) << "The offline ID request for conversion is "
1446  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) << endmsg;
1447 
1448  // remove the rod header and footer then
1449  // convert the rest of 32-bits into 16-bit words
1450  std::vector<uint16_t> v16 = get16bits(data, data_size, rodHeader, rodFooter);
1451 
1452  int word16Count = 0;
1453  int size16 = v16.size();
1454 
1455  assert(size16 > 0 && size16 == (int)(2 * (data_size - rodHeader - rodFooter)));
1456 
1457  RPCRODStructure rodReadout;
1458  RXReadOutStructure rxReadout;
1459  PadReadOutStructure padReadout;
1460  MatrixReadOutStructure matrixReadout;
1461 
1462  // first 8 32-bit words are the ROD headers
1463  // then come a series of 16-bit words: the data
1464  // followed by 3 32-bit ROD footer
1465 
1466  // before moving to the first receiver header
1467  // find out where we are: half A or C?
1468 
1469  rodReadout.decodeSourceID(data[3]);
1470  uint16_t subDetectorID = rodReadout.getSourceIDSubdetectorID();
1471 
1472  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "subDetectorID = 0x" << MSG::hex << subDetectorID << MSG::dec << endmsg;
1473 
1474  uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 0 : 1;
1475  uint16_t rodId = rodReadout.getSourceIDRODID();
1476 
1477  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "rodID = 0x" << MSG::hex << rodId << MSG::dec << endmsg;
1478 
1479  assert(rodId <= 15);
1480 
1481  // loop over 2 possible receivers per ROD
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];
1485  rxReadout.decodeFragment(receiverHeaderFragment, rxHeader);
1486  if (rxHeader == 'H') {
1487  word16Count += 1;
1488  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a receiver header " << endmsg;
1489  } else if (msgLvl(MSG::VERBOSE))
1490  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a receiver header "
1491  << "bailing out"
1492  << " Fragment ID is " << MSG::hex << rxHeader << MSG::dec << endmsg;
1493 
1494  while (rxHeader == 'H' && word16Count < size16) {
1495  if (msgLvl(MSG::VERBOSE))
1496  msg(MSG::VERBOSE) << "The receiver header word is " << MSG::hex << receiverHeaderFragment << MSG::dec << endmsg;
1497  uint16_t slogic = 2 * rodId + rxReadout.RXid();
1498  uint16_t sectorID = side * 32 + slogic;
1499  assert(slogic <= 31);
1500  char padHeader = 'U';
1501  uint16_t padHeaderFragment = v16[word16Count];
1502  padReadout.decodeFragment(padHeaderFragment, padHeader);
1503  if (padHeader == 'H') {
1504  word16Count += 1;
1505  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a pad header " << endmsg;
1506  } else if (msgLvl(MSG::VERBOSE))
1507  msg(MSG::VERBOSE) << "Rpc_ROD_Decoder::ERROR : Expecting a pad header "
1508  << " Fragment ID is " << padHeader << endmsg;
1509 
1510  while (padHeader == 'H') {
1511  uint16_t padId = padReadout.padid();
1512 
1513  uint16_t status = 0;
1514 
1515  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
1516  const RpcCablingCondData* rpcCabling{*cablingCondData};
1517 
1518  Identifier padOfflineId;
1519  if (!rpcCabling->giveOfflineId(side, slogic, padId, padOfflineId)) {
1520  if (msgLvl(MSG::VERBOSE))
1521  msg(MSG::VERBOSE) << "Cannot retrieve the OfflineID for the PAD n. " << padId << " at side " << side
1522  << " and sector " << slogic << endmsg;
1523  } else if (msgLvl(MSG::VERBOSE))
1524  msg(MSG::VERBOSE) << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId) << " associated to PAD n. "
1525  << padId << " at side " << side << " and sector " << slogic << endmsg;
1526 
1527  // check if this the collection requested
1528  // otherwise created a new collection and
1529  // record the new collection into StoreGate
1530  // so that the next time the new collection is requested,
1531  // it will be already in StoreGate!!!
1532  if (thisPadOfflineId == padOfflineId) {
1533  if (msgLvl(MSG::VERBOSE))
1534  msg(MSG::VERBOSE) << "Found the collection to return "
1535  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) << endmsg;
1536  v.setOnlineId(padId);
1537  v.setStatus(status);
1538  v.setSector(sectorID);
1539  } else {
1540  if (msgLvl(MSG::VERBOSE))
1541  msg(MSG::VERBOSE) << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
1542  << "!=" << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId) << endmsg;
1543  }
1544  char cmaHeader = 'U';
1545  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "padHeader")) break;
1546  uint16_t cmaHeaderFragment = v16[word16Count];
1547  matrixReadout.decodeFragment(cmaHeaderFragment, cmaHeader);
1548  if (cmaHeader == 'H') {
1549  word16Count += 1;
1550  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a cma header" << endmsg;
1551  } else if (msgLvl(MSG::VERBOSE))
1552  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a cma header"
1553  << " Fragment ID is " << cmaHeader << endmsg;
1554 
1555  while (cmaHeader == 'H') {
1556  uint16_t cmaId = matrixReadout.cmid();
1557  uint16_t fel1id = matrixReadout.fel1id();
1558  char cmaSubHeader = 'U';
1559  uint16_t febcid = static_cast<uint16_t>(-1);
1560  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "cmaHeader")) break;
1561  uint16_t cmaSubHeaderFragment = v16[word16Count];
1562  matrixReadout.decodeFragment(cmaSubHeaderFragment, cmaSubHeader);
1563  if (cmaSubHeader == 'S') {
1564  febcid = matrixReadout.febcid();
1565  word16Count += 1;
1566  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a cma sub-header" << endmsg;
1567  } else if (msgLvl(MSG::VERBOSE))
1568  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a cma sub-header"
1569  << " Fragment ID is " << cmaSubHeader << endmsg;
1570 
1571  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "cmtSubHeader")) break;
1572  RpcCoinMatrix* coinMatrix = new RpcCoinMatrix(padOfflineId, cmaId, fel1id, febcid);
1573  char cmaBody = 'U';
1574  uint16_t cmaBodyFragment = v16[word16Count];
1575  matrixReadout.decodeFragment(cmaBodyFragment, cmaBody);
1576  if (cmaBody == 'B') {
1577  word16Count += 1;
1578  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a cma body " << MSG::hex << cmaBodyFragment << endmsg;
1579  } else if (msgLvl(MSG::VERBOSE))
1580  msg(MSG::VERBOSE) << "Expecting cma body"
1581  << " Fragment ID is " << cmaBody << endmsg;
1582  while (cmaBody == 'B') {
1583  uint16_t bcid = matrixReadout.bcid();
1584  uint16_t time = matrixReadout.time();
1585  uint16_t ijk = matrixReadout.ijk();
1586 
1587  RpcFiredChannel* firedChannel = 0;
1588  if (ijk < 7) {
1589  uint16_t channel = matrixReadout.channel();
1590  firedChannel = new RpcFiredChannel(bcid, time, ijk, channel);
1591  coinMatrix->push_back(firedChannel);
1592  } else if (ijk == 7) {
1593  uint16_t threshold = matrixReadout.threshold();
1594  uint16_t overlap = matrixReadout.overlap();
1595  firedChannel = new RpcFiredChannel(bcid, time, ijk, threshold, overlap);
1596  coinMatrix->push_back(firedChannel);
1597  } else {
1598  if (msgLvl(MSG::VERBOSE))
1599  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Wrong ijk value " << ijk << "in cma body " << endmsg;
1600  }
1601  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "cmaBody")) {
1602  delete coinMatrix;
1603  coinMatrix = 0;
1604  break;
1605  }
1606  cmaBodyFragment = v16[word16Count];
1607  matrixReadout.decodeFragment(cmaBodyFragment, cmaBody);
1608  if (cmaBody == 'B') {
1609  word16Count += 1;
1610  if (msgLvl(MSG::VERBOSE))
1611  msg(MSG::VERBOSE) << "Found a cma body"
1612  << " " << MSG::hex << cmaBodyFragment << MSG::dec << endmsg;
1613  } else
1614  ATH_MSG_VERBOSE(" No more body fragment found " << cmaBody << " " << MSG::hex << cmaBodyFragment << MSG::dec);
1615  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "End of a cma body" << endmsg;
1616  } // end of fired channels
1617  char cmaFooter = 'U';
1618  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "after cmaBody")) {
1619  delete coinMatrix;
1620  coinMatrix = 0;
1621  break;
1622  }
1623  uint16_t cmaFooterFragment = v16[word16Count];
1624  matrixReadout.decodeFragment(cmaFooterFragment, cmaFooter);
1625  if (cmaFooter == 'F') {
1626  uint16_t crc = matrixReadout.crc();
1627  if (coinMatrix)
1628  coinMatrix->setCRC(crc); // Added to try to "fix" CID 12374
1629  else
1630  ATH_MSG_ERROR("Trying to call null coinMatrix - this should never happen!");
1631  word16Count += 1;
1632  if (msgLvl(MSG::VERBOSE))
1633  msg(MSG::VERBOSE) << "Found a cma Footer " << MSG::hex << cmaFooterFragment << MSG::dec << endmsg;
1634  } else { // of cma, record it into a pad
1635  if (msgLvl(MSG::VERBOSE))
1636  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a cma Footer"
1637  << " Fragment ID is " << cmaFooter << " " << MSG::hex << cmaFooterFragment << MSG::dec
1638  << endmsg;
1639  }
1640 
1641  if (thisPadOfflineId == padOfflineId)
1642  v.push_back(coinMatrix);
1643  else
1644  delete coinMatrix;
1645 
1646  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "cmaFooter")) break;
1647  cmaHeaderFragment = v16[word16Count];
1648  matrixReadout.decodeFragment(cmaHeaderFragment, cmaHeader);
1649  if (cmaHeader == 'H') {
1650  word16Count += 1;
1651  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a cma header" << endmsg;
1652  } else if (msgLvl(MSG::VERBOSE))
1653  msg(MSG::VERBOSE) << "End of all CMAs" << endmsg;
1654  } // end of cma
1655  char padFooter = 'U';
1656  uint16_t errorCode = static_cast<uint16_t>(-1);
1657  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "after CMAs")) break;
1658  uint16_t padFooterFragment = v16[word16Count];
1659  padReadout.decodeFragment(padFooterFragment, padFooter);
1660  if (padFooter == 'F') {
1661  word16Count += 1;
1662  errorCode = padReadout.errorCode();
1663  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a pad footer " << endmsg;
1664  if (thisPadOfflineId == padOfflineId) {
1665  v.setErrorCode(errorCode);
1666  // we found the pad and it is filled so clean up and return quickly!
1667  return StatusCode::FAILURE;
1668  }
1669  } else if (msgLvl(MSG::VERBOSE))
1670  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a pad footer "
1671  << " Fragment ID is " << padFooter << " " << MSG::hex << padFooterFragment << MSG::dec << endmsg;
1672  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "padFooter")) break;
1673  padHeaderFragment = v16[word16Count];
1674  padReadout.decodeFragment(padHeaderFragment, padHeader);
1675  if (padHeader == 'H') {
1676  word16Count += 1;
1677  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a pad header " << endmsg;
1678  } else if (msgLvl(MSG::VERBOSE))
1679  msg(MSG::VERBOSE) << "End of all pads " << endmsg;
1680  } // end of pads
1681 
1682  char rxFooter = 'U';
1683  if (!ensure_more_data(word16Count, size16, msg(), printMessage, "after pads")) break;
1684  uint16_t receiverFooterFragment = v16[word16Count];
1685  rxReadout.decodeFragment(receiverFooterFragment, rxFooter);
1686  if (rxFooter == 'F') {
1687  word16Count += 1;
1688  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a receiver footer " << endmsg;
1689  } else if (msgLvl(MSG::VERBOSE))
1690  msg(MSG::VERBOSE) << "RpcROD_Decoder::ERROR : Expecting a receiver footer "
1691  << " Fragment ID is " << rxFooter << " " << MSG::hex << receiverFooterFragment << MSG::dec << endmsg;
1692 
1693  if (word16Count < size16) {
1694  receiverHeaderFragment = v16[word16Count];
1695  rxReadout.decodeFragment(receiverHeaderFragment, rxHeader);
1696  if (rxHeader == 'H') {
1697  word16Count += 1;
1698  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found a receiver header " << endmsg;
1699  } else if (msgLvl(MSG::VERBOSE))
1700  msg(MSG::VERBOSE) << "End of all receivers " << endmsg;
1701  }
1702 
1703  } // end of receivers: while (rxHeader == 'H' && wordCount < size16)
1704 
1705  // end of the ROD
1706 
1707  return StatusCode::FAILURE;
1708  }

◆ fillCollection_v300()

StatusCode Muon::RpcROD_Decoder::fillCollection_v300 ( BS  data,
const uint32_t  data_size,
RpcPad v,
const uint16_t &  subDetector,
RpcSectorLogicContainer sectorLogicContainer 
) const
inlineprivate

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.

1013  {
1014  bool skipSectorLogicDecoding = (sectorLogicContainer == nullptr);
1015  if (skipSectorLogicDecoding) ATH_MSG_DEBUG("Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
1016 
1017  //#ifndef NVERBOSE
1018  if (msgLvl(MSG::VERBOSE)) {
1019  msg(MSG::VERBOSE) << "**********Decoder dumping the words******** " << endmsg;
1020  if (data_size > 0) {
1021  msg(MSG::VERBOSE) << "The size of this ROD-read is " << data_size << endmsg;
1022  for (unsigned int i = 0; i < data_size; i++)
1023  msg(MSG::VERBOSE) << "word " << i << " = " << MSG::hex << data[i] << MSG::dec << endmsg;
1024  }
1025  }
1026  //#endif
1027 
1028  uint16_t side = (subDetector == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
1029 
1030  // TMP FIXME the sector number needs to be fixed !!
1031  uint16_t sector = 0;
1032 
1033  // counter of the numerb of sector logic fragments found
1034  uint16_t SLindex = 0;
1035 
1036  // the identifier of this collection
1037  Identifier thisPadOfflineId = v.identify();
1038 
1039  // Identifier of the collection in data
1040  Identifier padOfflineId;
1041  bool foundPad = false;
1042 
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;
1053 
1054  // return;
1055 
1056  RPCRODDecode myRPC;
1057  RXReadOutStructure RXROS;
1058  PadReadOutStructure PDROS;
1060  MatrixReadOutStructure matrixROS;
1061 
1062  char recField;
1063  unsigned short int PadID = 99;
1064  unsigned int SLBodyWords = 0;
1065  unsigned int SL_data_size = 500; // same value used for the size of SLBuff
1066  unsigned short int SLBuff[500];
1067 
1068  RpcSectorLogic* sl = 0;
1069 
1070  for (uint16_t i = 0; i < data_size; ++i) {
1071  // std::cout << "REGISTER: " << i << std::endl;
1072 
1073  isRXHeader = false;
1074  isRXFooter = false;
1075  isPadHeader = false;
1076  isPadSubHeader = false;
1077  isPadPreFooter = false;
1078  isPadFooter = false;
1079  isSLHeader = false;
1080  isSLFooter = false;
1081  uint32_t currentWord = data[i];
1082 
1083  //#ifndef NVERBOSE
1084  ATH_MSG_VERBOSE(" -->current data word is " << std::hex << currentWord << std::dec);
1085  //#endif
1086 
1087  RXROS.decodeFragment(currentWord, recField);
1088  PDROS.decodeFragment(currentWord, recField);
1089  SLROS.decodeFragment(currentWord, recField);
1090 
1091  if (RXROS.isHeader() && !isSLFragment)
1092  isRXHeader = true;
1093  else if (RXROS.isFooter() && !isSLFragment)
1094  isRXFooter = true;
1095  else if (PDROS.isHeader() && !isSLFragment)
1096  isPadHeader = true;
1097  else if (PDROS.isSubHeader() && !isSLFragment)
1098  isPadSubHeader = true;
1099  else if (PDROS.isPreFooter() && !isSLFragment)
1100  isPadPreFooter = true;
1101  else if (PDROS.isFooter() && !isSLFragment)
1102  isPadFooter = true;
1103  else if (SLROS.isHeader())
1104  isSLHeader = true;
1105  else if (SLROS.isFooter())
1106  isSLFooter = true;
1107 
1108  // The SLROS functions still return values (based on default values)
1109  if (skipSectorLogicDecoding) {
1110  isSLHeader = false;
1111  isSLFragment = false;
1112  isSLFooter = false;
1113  }
1114 
1115  //#ifndef NVERBOSE
1116  if (msgLvl(MSG::VERBOSE)) {
1117  msg(MSG::VERBOSE) << " RX Header: " << isRXHeader << " RX Footer: " << isRXFooter << endmsg;
1118  msg(MSG::VERBOSE) << " Pad Header: " << isPadHeader << " Pad SubHeader: " << isPadSubHeader
1119  << " Pad PreFooter: " << isPadPreFooter << " Pad Footer: " << isPadFooter << endmsg;
1120  msg(MSG::VERBOSE) << " isPADFragment: " << isPADFragment << endmsg;
1121  msg(MSG::VERBOSE) << " SL Header: " << isSLHeader << " SL Footer: " << isSLFooter << endmsg;
1122  msg(MSG::VERBOSE) << " isSLFragment: " << isSLFragment << endmsg;
1123  }
1124  //#endif
1125 
1126  if (isRXHeader) {
1127  //#ifndef NVERBOSE
1128  if (msgLvl(MSG::VERBOSE)) {
1129  msg(MSG::VERBOSE) << " this is a RX Header " << endmsg;
1130  msg(MSG::VERBOSE) << " Sector ID=" << RXROS.RXid() << endmsg;
1131  }
1132  //#endif
1133 
1134  // set sector ID, old format of RX header
1135  // sector = RXROS.RXid();
1136  sector = RXROS.status();
1137 
1138  uint16_t errorCode = RXROS.errorCode();
1139 
1140  // set to zero the index of the SL fragment
1141  SLindex = 0;
1142 
1143  // check if the SL already exists
1144  if (sectorLogicContainer && !sectorLogicContainer->findSector(sector, 0)) {
1145  // Create the new sector logic object
1146  sl = new RpcSectorLogic(sector, 0, 0, errorCode);
1147 
1148  } else if (sectorLogicContainer) {
1149  for (RpcSectorLogicContainer::iterator itSL = sectorLogicContainer->begin(); itSL != sectorLogicContainer->end();
1150  ++itSL) {
1151  if ((*itSL)->sectorId() == sector) {
1152  sl = (*itSL);
1153  break;
1154  }
1155  }
1156  }
1157 
1158  } else if (isRXFooter) {
1159  //#ifndef NVERBOSE
1160  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " this is a RX Footer " << endmsg;
1161  //#endif
1162  } else if (isSLHeader || isSLFragment) {
1163  isSLFooter ? isSLFragment = false : isSLFragment = true;
1164 
1165  // push only the lowest 16 bits
1166  int foundSL = myRPC.pushWord(currentWord, 0, m_nobxs);
1167 
1168  // Check the Sector Logic Fragment
1169  if (foundSL) {
1170  //#ifndef NVERBOSE
1171  if (msgLvl(MSG::VERBOSE)) {
1172  msg(MSG::VERBOSE) << "SectorLogicReadOut checkFragment: " << myRPC.SLFragment()->checkFragment() << endmsg;
1173  msg(MSG::VERBOSE) << myRPC.SLFragment() << endmsg;
1174  }
1175  //#endif
1176  }
1177 
1178  if (isSLHeader) SLBodyWords = 0;
1179 
1180  // Decode the sector logic footer
1181  else if (isSLFooter) {
1182 #ifndef NVERBOSE
1183  if (SLindex > 1) { msg(MSG::ERROR) << "More than 2 SL fragments in sector " << sector << endmsg; }
1184 #endif
1185 
1186 #ifndef NVERBOSE
1187  msg(MSG::VERBOSE) << " Number of data words in SectorLogicReadOut= " << SLBodyWords << endmsg;
1188  msg(MSG::VERBOSE) << " TEST SL: " << foundSL << endmsg;
1189 #endif
1190 
1191 #ifndef NVERBOSE
1192  // Print out a raw dump of the SL fragment
1193  for (unsigned short j = 0; j < SLBodyWords; j++) {
1194  msg(MSG::VERBOSE) << " SL data word " << j << " : " << std::hex << SLBuff[j] << MSG::dec << endmsg;
1195  }
1196 #endif
1197 
1198  // Found the sector logic footer, the sector logic fragment
1199  // can be added to the sector logic container
1200 
1201  // Check if the sector was already added to the container
1202  if (sectorLogicContainer && !sectorLogicContainer->findSector(sector, SLindex)) {
1203  SectorLogicReadOut* sectorLogic = myRPC.SLFragment();
1204  // decode the SL hits and push back in the sector logic
1205  uint16_t nSLlink = 2;
1206  uint16_t nSLgate = 7;
1207 
1208  // fill the hit content
1209  for (int igate = 0; igate < nSLgate; ++igate) {
1210  for (int ilink = 0; ilink < nSLlink; ++ilink) {
1211  uint16_t ptid = sectorLogic->ptid(ilink, igate);
1212 
1213  if (ptid != 0) {
1214  uint16_t cmadd = sectorLogic->cmadd(ilink, igate);
1215 
1216  uint16_t bcid = igate;
1217  uint16_t tower = ilink + 2 * SLindex;
1218 
1219  uint16_t opl = sectorLogic->opl(ilink, igate);
1220  uint16_t ovphi = sectorLogic->ovphi(ilink, igate);
1221  uint16_t oveta = sectorLogic->oveta(ilink, igate);
1222 
1223  uint16_t triggerBcid = sectorLogic->bcid(ilink, igate);
1224 
1225  // create the hit and push back in the sl
1226  RpcSLTriggerHit* slHit = new RpcSLTriggerHit(bcid, tower, ptid, cmadd, opl, ovphi, oveta, triggerBcid);
1227  sl->push_back(slHit);
1228  }
1229  }
1230  }
1231 
1232  // set the trigger rates
1233  // add the trigger rate of the second tower only if it is
1234  // the first sector logic fragment
1235  sl->addTriggerRate(sectorLogic->padTriggerRate(0));
1236  if (SLindex == 0) { sl->addTriggerRate(sectorLogic->padTriggerRate(1)); }
1237 
1238  // push back the counters
1239  uint16_t nSLcount = sectorLogic->numberOfCounterWords();
1240 
1241  for (int icount = 0; icount < nSLcount; ++icount) {
1242  uint16_t counter = ((sectorLogic->readSLCounterCurrent()) & 0x1fff);
1243  sl->addCounter(counter);
1244  }
1245 
1246  // Flag the sector as initialized
1247  // bool setSector = sectorLogicContainer->setSector(sector,SLindex);
1248 
1249  if (SLindex == 0 && sectorLogicContainer) { sectorLogicContainer->push_back(sl); }
1250  }
1251 
1252  // increment the SLindex counter of the number of fragments
1253  SLindex++;
1254 
1255  } else {
1256  if (SLBodyWords >= SL_data_size) {
1257  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Sector Logic payload corrupted" << endmsg;
1258  return StatusCode::FAILURE;
1259  }
1260  SLBuff[SLBodyWords] = currentWord;
1261  SLBodyWords++;
1262  } // isSLHeader
1263 
1264  } else if (isPadHeader || isPADFragment) {
1265  // Now decoding the header of the pad
1266 #ifndef NVERBOSE
1267  msg(MSG::VERBOSE) << " Pad Header or Pad Fragment " << endmsg;
1268 #endif
1269 
1270  PDROS.decodeFragment(currentWord, recField);
1271 
1272  if (recField == 'H') {
1273  PadID = PDROS.padid();
1274 
1275  uint16_t status = 0;
1276 
1277  side = (sector < 32) ? 0 : 1;
1278  uint16_t sectorLogic = sector - side * 32;
1279 #ifndef NVERBOSE
1280  msg(MSG::VERBOSE) << " Pad Identifier= " << PadID << " Status: " << status << endmsg;
1281 #endif
1282 
1283  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
1284  const RpcCablingCondData* rpcCabling{*cablingCondData};
1285 
1286  // get the offline ID of the pad
1287  if (!rpcCabling->giveOfflineId(side, sectorLogic, PadID, padOfflineId)) {
1288  if (msgLvl(MSG::VERBOSE))
1289  msg(MSG::VERBOSE) << "Cannot retrieve the OfflineID for the PAD n. " << PadID << " at side " << side
1290  << " and sector " << sectorLogic << endmsg;
1291  } else if (msgLvl(MSG::VERBOSE))
1292  msg(MSG::VERBOSE) << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId) << " associated to PAD n. "
1293  << PadID << " at side " << side << " and sector " << sectorLogic << endmsg;
1294 
1295  // check if it's the pad to convert
1296  if (thisPadOfflineId == padOfflineId) {
1297  if (msgLvl(MSG::VERBOSE))
1298  msg(MSG::VERBOSE) << " match found with ID " << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
1299  << " requested for the conversion; return this collection" << endmsg;
1300 
1301  foundPad = true;
1302 #ifndef NVERBOSE
1303  msg(MSG::VERBOSE) << "Found the pad to convert !" << endmsg;
1304 #endif
1305  v.setOnlineId(PadID);
1306  v.setStatus(status);
1307  v.setSector(sector);
1308 
1309  // set the lvl1 id
1310  v.setLvl1Id(PDROS.l1id());
1311 
1312  } else {
1313  if (msgLvl(MSG::VERBOSE))
1314  msg(MSG::VERBOSE) << " match NOT found with ID "
1315  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
1316  << " requested for the conversion" << endmsg;
1317  }
1318  }
1319 
1320  // if it's a subheader, set the bcid
1321  if (recField == 'S') {
1322  if (foundPad) {
1323  v.setBcId(PDROS.bcid());
1324 #ifndef NVERBOSE
1325  msg(MSG::VERBOSE) << "Found the subheader, setting bcid to: " << PDROS.bcid() << endmsg;
1326 #endif
1327  }
1328  }
1329 
1330  if (recField == 'F') {
1331 #ifndef NVERBOSE
1332  msg(MSG::VERBOSE) << " Pad Footer " << endmsg;
1333 #endif
1334  // found the pad, bail out
1335  if (foundPad) {
1336  foundPad = false;
1337  return StatusCode::SUCCESS;
1338  }
1339  }
1340 
1341  isPadFooter ? isPADFragment = false : isPADFragment = true;
1342 
1343 #ifndef NVERBOSE
1344  msg(MSG::VERBOSE) << " current word " << std::hex << currentWord << MSG::dec << endmsg;
1345 
1346  msg(MSG::VERBOSE) << " ==isPADFragment= " << isPADFragment << endmsg;
1347  msg(MSG::VERBOSE) << " calling pushword: " << std::hex << currentWord << MSG::dec << endmsg;
1348 #endif
1349 
1350  int foundCM = 0;
1351  foundCM = myRPC.pushWord(currentWord, 0, m_nobxs);
1352 
1353  if (foundCM == 1) {
1354 #ifndef NVERBOSE
1355  msg(MSG::VERBOSE) << myRPC.CMFragment() << endmsg;
1356 #endif
1357  // If the pad is the good one, add the CMs to the container
1358  if (foundPad) {
1359  MatrixReadOut* matrix = myRPC.CMFragment();
1360 
1361  // std::cout << myRPC.CMFragment()<< std::endl;
1362 
1363  matrixROS = matrix->getHeader();
1364  uint16_t cmaId = matrixROS.cmid();
1365  uint16_t fel1id = matrixROS.fel1id();
1366 
1367  matrixROS = matrix->getSubHeader();
1368  uint16_t febcid = matrixROS.febcid();
1369 
1370 #ifndef NVERBOSE
1371  msg(MSG::VERBOSE) << "Creating a new CM, cmaId=" << cmaId << " fel1id=" << fel1id << " febcid=" << febcid << endmsg;
1372 #endif
1373 
1374  // Create the new cm
1375  RpcCoinMatrix* coinMatrix = new RpcCoinMatrix(padOfflineId, cmaId, fel1id, febcid);
1376 
1377  // std::cout << matrix->numberOfBodyWords() << std::endl;
1378 
1379  // Loop on the hits and push them in the coin matrix
1380  for (int i = 0; i < matrix->numberOfBodyWords(); ++i) {
1381  matrixROS = matrix->getCMAHit(i);
1382 
1383  uint16_t bcid = matrixROS.bcid();
1384  uint16_t time = matrixROS.time();
1385  uint16_t ijk = matrixROS.ijk();
1386 
1387  RpcFiredChannel* firedChan = 0;
1388 
1389  if (ijk < 7) {
1390  uint16_t channel = matrixROS.channel();
1391  firedChan = new RpcFiredChannel(bcid, time, ijk, channel);
1392 #ifndef NVERBOSE
1393  msg(MSG::VERBOSE) << "Adding a fired channel, bcid=" << bcid << " time="
1394  << " ijk=" << ijk << " channel=" << channel << endmsg;
1395 #endif
1396  // add the fired channel to the matrix
1397  coinMatrix->push_back(firedChan);
1398  } else if (ijk == 7) {
1399  uint16_t overlap = matrixROS.overlap();
1400  uint16_t threshold = matrixROS.threshold();
1401  firedChan = new RpcFiredChannel(bcid, time, ijk, threshold, overlap);
1402 #ifndef NVERBOSE
1403  msg(MSG::VERBOSE) << "Adding a fired channel, bcid=" << bcid << " time="
1404  << " ijk=" << ijk << " overlap=" << overlap << " threshold=" << threshold << endmsg;
1405 #endif
1406  // add the fired channel to the matrix
1407  coinMatrix->push_back(firedChan);
1408  }
1409  }
1410 
1411  v.push_back(coinMatrix);
1412 
1413  } // end of the matrix decoding
1414 
1415  (myRPC.CMFragment())->reset(m_nobxs);
1416 
1417  } // end of the pad decoding
1418  }
1419  }
1420 
1421  return StatusCode::SUCCESS;
1422  }

◆ fillCollection_v302()

StatusCode Muon::RpcROD_Decoder::fillCollection_v302 ( BS  data,
const uint32_t  data_size,
RpcPad v,
const uint32_t &  sourceId,
RpcSectorLogicContainer sectorLogicContainer 
) const
inlineprivate

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.

466  {
467  bool skipSectorLogicDecoding = (sectorLogicContainer == nullptr);
468  if (skipSectorLogicDecoding) ATH_MSG_DEBUG("Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
469 
470  /* for (unsigned int i = 0; i<1000; ++i) { */
471  /* //std::cout<<" aaa "<<std::endl; */
472  /* msg(MSG::VERBOSE) << "try to increase cpu time "<<log(pow(((double)i+1.)/999.,3))<<endmsg; */
473  /* } */
474 
475  // m_bench.point(1);
476  // unpack the 32 bits words into 16 bits
477  // no ROD header and footer
478  std::vector<uint16_t> p = get16bits_v301(data, data_size, 0, 0);
479 
480  const int size = p.size();
481 
482  ATH_MSG_VERBOSE("**********Decoder v302 dumping the words******** ");
484  /* #ifndef NVERBOSE */
485  /* std::cout<<" printing something for testing"<<std::endl; */
486  /* #endif */
487 
488  if (size > 0 && msgLvl(MSG::VERBOSE)) {
489  msg(MSG::VERBOSE) << "The size of this ROD-read is " << size << endmsg;
490  int decoded;
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 == 0xa) sprintf(decoded_char, "PAD Prefooter");
502  if (decoded == 0xb) sprintf(decoded_char, "RX Footer");
503  if (decoded == 0xc) sprintf(decoded_char, "CM Header");
504  if (decoded == 0xd) sprintf(decoded_char, "SL Header");
505  if (decoded == 0xe) sprintf(decoded_char, "RX Subheader");
506  if (decoded == 0xf) sprintf(decoded_char, "SL Footer");
507 
508  msg(MSG::VERBOSE) << "word " << i << " = " << MSG::hex << p[i] << MSG::dec << " " << MSG::hex << decoded << MSG::dec << " "
509  << decoded_char << endmsg;
510  }
511  }
512 
513  if (size == 0) {
514  ATH_MSG_VERBOSE(" Buffer size 0 ! ");
515  return StatusCode::FAILURE;
516  }
517 
518  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "The source ID is: " << MSG::hex << sourceId << endmsg;
519 
520  uint16_t sectorForCabling = 0;
521  uint16_t sector = 0;
522 
523  // counter of the numerb of sector logic fragments found
524  uint16_t SLindex = 0;
525 
526  // the identifier of this collection
527  Identifier thisPadOfflineId = v.identify();
528 
529  // Identifier of the collection in data
530  Identifier padOfflineId;
531  bool foundPad = false;
532 
533  if (msgLvl(MSG::VERBOSE))
534  msg(MSG::VERBOSE) << "The offline ID request for conversion is "
535  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) << endmsg;
536 
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;
548 
549  // return;
550 
551  RPCRXRODDecode myRPC;
552  RXReadOutStructure RXROS;
553  PadReadOutStructure PDROS;
555  MatrixReadOutStructure matrixROS;
556  RPCRODStructure rodReadout;
557 
558  char recField;
559  unsigned short int PadID = 99;
560  uint16_t slfel1id = 0;
561  uint16_t slid = 0;
562  uint16_t slbcid = 0;
563  uint16_t slstatus = 0;
564  uint16_t slcrc = 0;
565  unsigned int SLBodyWords = 0;
566  unsigned int SL_data_sise = 500; // same value used for the size of SLBuff
567  unsigned short int SLBuff[500];
568 
569  // decode the source Id and set side and sector number
570  rodReadout.decodeSourceID(sourceId);
571  uint16_t subDetectorID = (sourceId & 0xff0000) >> 16;
572 
573  uint16_t side = (subDetectorID == eformat::MUON_RPC_BARREL_A_SIDE) ? 1 : 0;
574  uint16_t rodId = rodReadout.getSourceIDRODID();
575  if (msgLvl(MSG::VERBOSE)) {
576  msg(MSG::VERBOSE) << "subDetectorID = 0x" << MSG::hex << subDetectorID << MSG::dec << endmsg;
577 
578  msg(MSG::VERBOSE) << "rodID = 0x" << MSG::hex << rodId << MSG::dec << endmsg;
579  msg(MSG::VERBOSE) << "The side is " << side << endmsg;
580  }
581 
582  // RpcSectorLogic* sl;
583 
584  for (uint16_t i = 0; i < size; ++i) {
585  // std::cout << "REGISTER: " << i << std::endl;
586 
587  isRXHeader = false;
588  isRXFooter = false;
589  isPadHeader = false;
590  isPadSubHeader = false;
591  isPadPreFooter = false;
592  isPadFooter = false;
593  isSLHeader = false;
594  isSLSubHeader = false;
595  isSLFooter = false;
596  uint32_t currentWord = p[i];
597 
598  RXROS.decodeFragment(currentWord, recField);
599  PDROS.decodeFragment(currentWord, recField);
600  if (!skipSectorLogicDecoding) { SLROS.decodeFragment(currentWord, recField); }
601 
602  if (RXROS.isHeader()) {
603  isRXHeader = true;
604  isSLFragment = false;
605  isPADFragment = false;
606  } else if (PDROS.isSubHeader() && !isSLFragment) {
607  isPadSubHeader = true;
608  } else if (RXROS.isFooter()) {
609  isRXFooter = true;
610  } else if (PDROS.isHeader()) {
611  isPadHeader = true;
612  isSLFragment = false;
613  } else if (PDROS.isPreFooter()) {
614  isPadPreFooter = true;
615  } else if (PDROS.isFooter()) {
616  isPadFooter = true;
617  } else if (SLROS.isHeader()) {
618  isSLHeader = true;
619  isSLFragment = true;
620  isPADFragment = false;
621  } else if (SLROS.isFooter()) {
622  isSLFooter = true;
623  isSLFragment = false;
624  } else if (SLROS.isSubHeader() && isSLFragment) {
625  isSLSubHeader = true;
626  }
627 
628  // The SLROS functions still return values (based on default values)
629  if (skipSectorLogicDecoding) {
630  isSLHeader = false;
631  isSLSubHeader = false;
632  isSLFragment = false;
633  isSLFooter = false;
634  }
635 
636  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
637  const RpcCablingCondData* rpcCabling{*cablingCondData};
638 
639  if (msgLvl(MSG::VERBOSE)) {
640  char decoded_char[256];
641  if (isRXHeader) {
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");
663  } else {
664  sprintf(decoded_char, " Undecoded");
665  }
666 
667  msg(MSG::VERBOSE) << i << " -->current data word is " << MSG::hex << currentWord << MSG::dec << decoded_char << endmsg;
668  }
669  if (isRXHeader) {
670  if (msgLvl(MSG::VERBOSE)) {
671  msg(MSG::VERBOSE) << " this is a RX Header " << endmsg;
672  msg(MSG::VERBOSE) << " Sector ID=" << RXROS.RXid() << endmsg;
673  }
674 
675  // get the sector id according to the new format
676  // not yet implemented in the readout classes
677 
678  // uint16_t rxid = (currentWord & 0x800) >> 11;
679 
680  uint16_t rxid = RXROS.RXid();
681  sectorForCabling = 2 * rodId + rxid;
682  sector = side * 32 + sectorForCabling;
683 
684  // fix for M3
685  if ((rodId == 3 || rodId == 1) && (m_specialROBNumber > 0)) {
686  sector = 39;
687  sectorForCabling = 7;
688  // fix for M3 with runnumber up to 11533 (SFI)
689  if (m_specialROBNumber == 0x650001) {
690  sector = 40;
691  sectorForCabling = 8;
692  }
693  } else if ((rodId == 4 || rodId == 2) && (m_specialROBNumber > 0)) {
694  sector = 40;
695  sectorForCabling = 8;
696  }
697 
698  } else if (isRXFooter) {
699  ATH_MSG_VERBOSE(" this is a RX Footer ");
700  } else if (isSLHeader || isSLFragment || isSLSubHeader || isSLFooter) {
701  // push only the lowest 16 bits
702  int foundSL = myRPC.pushWord(currentWord, 0, m_nobxs);
703 
704  if (isSLHeader) {
705  SLBodyWords = 0;
706  slfel1id = SLROS.fel1id();
707  slid = SLROS.slid();
708 
709  ATH_MSG_VERBOSE(" SL Header: slfel1id " << slfel1id << " slid: " << slid);
710  } else if (isSLSubHeader) {
711  slbcid = SLROS.slbcid();
712 
713  ATH_MSG_VERBOSE("SL subheader: slbcid: " << slbcid);
714 
715  }
716  // Decode the sector logic footer
717  else if (isSLFooter) {
718  if (SLindex > 1) { ATH_MSG_VERBOSE("More than 2 SL fragments in sector " << sector); }
719 
720  if (msgLvl(MSG::VERBOSE)) {
721  msg(MSG::VERBOSE) << " Number of data words in SectorLogicReadOut= " << SLBodyWords << endmsg;
722  msg(MSG::VERBOSE) << " TEST SL: " << foundSL << endmsg;
723 
724  // Print out a raw dump of the SL fragment
725  for (unsigned short j = 0; j < SLBodyWords; j++) {
726  msg(MSG::VERBOSE) << " SL data word " << j << " : " << MSG::hex << SLBuff[j] << MSG::dec << endmsg;
727  }
728  }
729 
730  // Found the sector logic footer, the sector logic fragment
731  // can be added to the sector logic container
732 
733  SectorLogicRXReadOut* sectorLogic = myRPC.SLFragment();
734 
735  if (sectorLogicContainer && !sectorLogicContainer->findSector(sector, side)) {
736  slstatus = SLROS.status();
737  slcrc = SLROS.crc();
738  // fill the hit content for the first sector
739  RpcSectorLogic* sl = new RpcSectorLogic(sector, slfel1id, slbcid, slstatus, slcrc);
740  bool inputHeaderFound = false;
741  bool outputHeaderFound = false;
742  ATH_MSG_VERBOSE("New RpcSectorLogic: sector=" << sector << " fel1id=" << slfel1id << " BCID=" << slbcid);
743 
744  uint16_t rowinBcid = 999;
745  uint16_t slPadId = 999;
746 
747  for (int islwords = 0; islwords < sectorLogic->numberOfInputWords(); ++islwords) {
748  uint16_t ptid;
749  uint16_t roi;
750  uint16_t outerPlane;
751  uint16_t overlapPhi;
752  uint16_t overlapEta;
753 
754  uint16_t slWord = sectorLogic->readSLHitCurrent();
755 
756  ATH_MSG_VERBOSE("SLhit word: " << std::hex << slWord << std::dec);
757  SLROS.decodeFragment(slWord, recField);
758 
759  uint16_t triggerBcid;
760 
761  if (SLROS.isInputHeader()) {
762  rowinBcid = SLROS.inputRowinBcid();
763  slPadId = SLROS.inputPadId();
764  inputHeaderFound = true;
765  } else if (SLROS.isInputBody()) {
766  if (!inputHeaderFound) {
767  ATH_MSG_VERBOSE("ERROR: inputSLHeader missing !!");
768  } else {
769  ptid = SLROS.inputThreshold();
770  roi = SLROS.inputRoi();
771  outerPlane = SLROS.inputOuterPlane();
772  overlapPhi = SLROS.inputOverlapPhi();
773  overlapEta = SLROS.inputOverlapEta();
774  triggerBcid = SLROS.inputTriggerBcid();
775 
776  RpcSLTriggerHit* slHit =
777  new RpcSLTriggerHit(rowinBcid, slPadId, ptid, roi, outerPlane, overlapPhi, overlapEta, triggerBcid);
778  slHit->setIsInput(true);
779  sl->push_back(slHit);
780  ATH_MSG_VERBOSE("New input RpcSLTriggerHit: ptid, roi= " << ptid << " " << roi);
781  }
782  } else if (SLROS.isOutputHeader()) {
783  rowinBcid = SLROS.outputRowinBcid();
784  outputHeaderFound = true;
785  } else if (SLROS.isOutputBody()) {
786  if (!outputHeaderFound) {
787  rowinBcid = 999;
788  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "ERROR: outputSLHeader missing !!" << endmsg;
789  } else {
790  if (SLROS.isOutputDecoded()) {
791  outerPlane = 0;
792  overlapPhi = 0;
793 
794  for (int icand = 0; icand < SLROS.nTriggerCand(); ++icand) {
795  ptid = SLROS.outputThreshold(icand);
796  triggerBcid = SLROS.outputTriggerBcid(icand);
797  roi = SLROS.outputRoi(icand);
798  overlapEta = SLROS.outputOverlap(icand);
799  RpcSLTriggerHit* slHit = new RpcSLTriggerHit(rowinBcid, 0, ptid, roi, outerPlane, overlapPhi,
800  overlapEta, triggerBcid);
801  slHit->setIsInput(false);
802  // use only one out od the two sectors for the moment (???)
803  sl->push_back(slHit);
804  ATH_MSG_VERBOSE("New output RpcSLTriggerHit: ptid, roi= " << ptid << " " << roi);
805  }
806 
807  if (SLROS.hasMoreThan2TriggerCand()) { sl->setHasMoreThan2TriggerCand(true); }
808  }
809  }
810  }
811  }
812 
813  if (sectorLogicContainer) sectorLogicContainer->push_back(sl);
814 
815  if (sectorLogicContainer && !sectorLogicContainer->setSector(sector, side)) {
816  ATH_MSG_VERBOSE("Sector " << sector << " decoded more than once in SL");
817  }
818  }
819 
820  } else {
821  if (SLBodyWords >= SL_data_sise) {
822  ATH_MSG_VERBOSE("Sector Logic payload corrupted");
823  return StatusCode::FAILURE;
824  }
825  SLBuff[SLBodyWords] = currentWord;
826  SLBodyWords++;
827  } // isSLHeader
828 
829  } else if (isPadHeader || isPADFragment) {
830  // Now decoding the header of the pad
831  ATH_MSG_VERBOSE(" Pad Header or Pad Fragment ");
832 
833  PDROS.decodeFragment(currentWord, recField);
834 
835  if (recField == 'H') {
836  PadID = PDROS.padid();
837 
838  // special setup for Dec06 sector 13 data
839  if (m_sector13Data) {
840  if (PadID < 3) {
841  sector = 56;
842  } else {
843  sector = 55;
844  // move the pad value to the 0-2 range;
845  PadID -= 3;
846  }
847  }
848 
849  side = (sector < 32) ? 0 : 1;
850  uint16_t sectorLogic = sector - side * 32;
851 
852  // get the offline ID of the pad
853  if (!rpcCabling->giveOfflineId(side, sectorLogic, PadID, padOfflineId)) {
854  if (msgLvl(MSG::VERBOSE))
855  msg(MSG::VERBOSE) << "Cannot retrieve the OfflineID for the PAD n. " << PadID << " at side " << side
856  << " and sector " << sectorLogic << endmsg;
857  } else {
858  if (msgLvl(MSG::VERBOSE))
859  msg(MSG::VERBOSE) << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
860  << " associated to PAD n. " << PadID << " at side " << side << " and sector " << sectorLogic
861  << endmsg;
862  }
863 
864  // check if it's the pad to convert
865  if (thisPadOfflineId == padOfflineId) {
866  if (msgLvl(MSG::VERBOSE))
867  msg(MSG::VERBOSE) << " match found with ID " << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
868  << " requested for the conversion; return this collection" << endmsg;
869 
870  foundPad = true;
871 
872  v.setOnlineId(PadID);
873  v.setSector(sector);
874 
875  // set the lvl1 id
876  v.setLvl1Id(PDROS.l1id());
877 
878  } else {
879  if (msgLvl(MSG::VERBOSE))
880  msg(MSG::VERBOSE) << " match NOT found with ID "
881  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
882  << " requested for the conversion" << endmsg;
883  }
884  }
885 
886  // if it's a subheader, set the bcid
887  if (recField == 'S') {
888  if (foundPad) {
889  v.setBcId(PDROS.bcid());
890  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found the subheader, setting bcid to: " << PDROS.bcid() << endmsg;
891  }
892  }
893 
894  if (recField == 'P') {
895  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found the prefooter" << endmsg;
896  // v.setStatus(currentWord&0x0fff );
897  v.setStatus(PDROS.status());
898 
899  if (currentWord & 0x0fff) {
900  if (msgLvl(MSG::VERBOSE))
901  msg(MSG::VERBOSE) << "Pad Busy status not zero ! value: " << MSG::hex << (currentWord & 0x0fff) << MSG::dec
902  << endmsg;
903  }
904  }
905 
906  if (recField == 'F') {
907  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Pad Footer " << endmsg;
908  v.setErrorCode(PDROS.errorCode());
909  if (msgLvl(MSG::VERBOSE) && PDROS.errorCode() != 0) {
910  msg(MSG::VERBOSE) << "Pad Error flag not zero ! value: " << MSG::hex << PDROS.errorCode() << MSG::dec << endmsg;
911  }
912 
913  // found the pad, bail out
914  if (foundPad) {
915  foundPad = false;
916  // std::cout << "found pad " << PadID << " sector " << sector << " " << sector%2 << std::endl;
917  // M.C. : CONTINUE TO SCAN TILL THE END of the ROB TO FIND LAST SectorLogic:
918  if (!(PadID > 3 && sector % 2 > 0)) { return StatusCode::SUCCESS; }
919  }
920  }
921 
922  isPadFooter ? isPADFragment = false : isPADFragment = true;
923 
924  if (msgLvl(MSG::VERBOSE)) {
925  msg(MSG::VERBOSE) << " current word " << MSG::hex << currentWord << MSG::dec << endmsg;
926 
927  msg(MSG::VERBOSE) << " ==isPADFragment= " << isPADFragment << endmsg;
928  msg(MSG::VERBOSE) << " calling pushword: " << MSG::hex << currentWord << MSG::dec << endmsg;
929  }
930 
931  int foundCM = 0;
932  foundCM = myRPC.pushWord(currentWord, 0, m_nobxs);
933 
934  if (foundCM == 1) {
935  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << myRPC.CMFragment() << endmsg;
936 
937  // If the pad is the good one, add the CMs to the container
938  if (foundPad) {
939  MatrixReadOut* matrix = myRPC.CMFragment();
940 
941  // std::cout << myRPC.CMFragment()<< std::endl;
942 
943  matrixROS = matrix->getHeader();
944  uint16_t cmaId = matrixROS.cmid();
945  uint16_t fel1id = matrixROS.fel1id();
946 
947  matrixROS = matrix->getSubHeader();
948  uint16_t febcid = matrixROS.febcid();
949 
950  if (msgLvl(MSG::VERBOSE))
951  msg(MSG::VERBOSE) << "Creating a new CM, cmaId=" << cmaId << " fel1id=" << fel1id << " febcid=" << febcid
952  << endmsg;
953 
954  // Create the new cm
955  RpcCoinMatrix* coinMatrix = new RpcCoinMatrix(padOfflineId, cmaId, fel1id, febcid);
956 
957  matrixROS = matrix->getFooter();
958  coinMatrix->setCRC(matrixROS.crc());
959 
960  // std::cout << matrix->numberOfBodyWords() << std::endl;
961 
962  // Loop on the hits and push them in the coin matrix
963  for (int i = 0; i < matrix->numberOfBodyWords(); ++i) {
964  matrixROS = matrix->getCMAHit(i);
965 
966  uint16_t bcid = matrixROS.bcid();
967  uint16_t time = matrixROS.time();
968  uint16_t ijk = matrixROS.ijk();
969 
970  RpcFiredChannel* firedChan = 0;
971 
972  if (ijk < 7) {
973  uint16_t channel = matrixROS.channel();
974  firedChan = new RpcFiredChannel(bcid, time, ijk, channel);
975 
976  ATH_MSG_VERBOSE("Adding a fired channel, bcid=" << bcid << " time="
977  << " ijk=" << ijk << " channel=" << channel);
978 
979  // add the fired channel to the matrix
980  coinMatrix->push_back(firedChan);
981  } else if (ijk == 7) {
982  uint16_t overlap = matrixROS.overlap();
983  uint16_t threshold = matrixROS.threshold();
984  firedChan = new RpcFiredChannel(bcid, time, ijk, threshold, overlap);
985 
986  ATH_MSG_VERBOSE("Adding a fired channel, bcid=" << bcid << " time="
987  << " ijk=" << ijk << " overlap=" << overlap
988  << " threshold=" << threshold);
989 
990  // add the fired channel to the matrix
991  coinMatrix->push_back(firedChan);
992  }
993  }
994 
995  v.push_back(coinMatrix);
996 
997  } // end of the matrix decoding
998 
999  (myRPC.CMFragment())->reset(m_nobxs);
1000 
1001  } // end of the pad decoding
1002  }
1003  }
1004  ATH_MSG_VERBOSE("Required Pad NOT FOUND in this ROB");
1005  // m_bench.point(2);
1006  return StatusCode::SUCCESS;
1007  }

◆ fillCollection_v302new()

StatusCode Muon::RpcROD_Decoder::fillCollection_v302new ( BS  data,
const uint32_t  data_size,
RpcPad v,
const uint32_t &  sourceId,
RpcSectorLogicContainer ,
const bool &   
) const
private

◆ fillCollections()

StatusCode Muon::RpcROD_Decoder::fillCollections ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag,
RpcPadContainer rdoIdc,
const std::vector< IdentifierHash > &  collections,
RpcSectorLogicContainer RPC_SECTORLOGIC,
const bool &  decodeSL 
) const
inlineoverride

Definition at line 304 of file RpcROD_Decoder.h.

306  {
307  try {
308  robFrag.check();
309  } catch (eformat::Issue& ex) {
310  ATH_MSG_VERBOSE(ex.what());
311  return StatusCode::FAILURE; // error in fragment
312  }
313 
314  if (RPC_SECTORLOGIC == nullptr) { ATH_MSG_DEBUG("RPC_SECTORLOGIC is null, so we will skip decoding the sector logic information"); }
315 
316  // get the pointer to the data
317  BS data;
318  robFrag.rod_data(data);
319 
320  // here decide the version of the decoding to be called
321  uint32_t version = robFrag.rod_version();
322  uint32_t sourceId = robFrag.source_id();
323  uint32_t rod_sourceId = robFrag.rod_source_id();
324  uint16_t subDetector = (sourceId & 0xff0000) >> 16;
325 
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);
329 
330  // chose the right decoding routine
331  bool isSimulated = (data[0] == 0xee1234ee) ? true : false;
332  int type = 0;
333 
334  if (((version & 0x03000000) == 0x03000000) && (data[2] != 0x00) && ((data[0] & 0xffff0000) == 0)) {
335  type = 1;
336  ATH_MSG_VERBOSE("choosing fillCollection_v300");
337  } else if (version == 0x2400000 || isSimulated) {
338  type = 0;
339  ATH_MSG_VERBOSE("choosing fillCollection_v240");
340  } else if (((version & 0x03000000) == 0x03000000) &&
341  ((data[0] & 0xffff0000) != 0)) // this is the current data format - 2011 May 13
342  {
343  type = 2;
344  ATH_MSG_VERBOSE("choosing fillCollection_v302");
345  ATH_MSG_VERBOSE("with decodeSL when decoding from ROB " << decodeSL); // Only meaningful for this function
346  }
347 
348  // for the time being use the old decoding schema .... to be optimized
349 
350  StatusCode cnv_sc;
351 
352  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
353  const RpcCablingCondData* rpcCabling{*cablingCondData};
354 
355  // here optimize decoding of ROB fragment (for data only type==2)
356  if (type == 2) {
357  std::map<Identifier, RpcPad*> mapOfCollections;
358  // Request to update to range-based for-loop
359  for (const IdentifierHash& it : collections) {
360  // Normally, we would get a write handle and put a lock, but we do not process the decoding in this loop
361  // Therefore, we just query the cache via the container and process the hashes which have not been decoded yet
362  // Note that this means different threads may decode the same data if processing simultaneously
363  // However, only one will be written to the cache using the lock
364 
365  bool alreadyPresent = rdoIdc.tryAddFromCache(it);
366 
367  if (alreadyPresent) {
368  ATH_MSG_DEBUG("RPC RDO collection already exist with collection hash = " << static_cast<unsigned int>(it)
369  << " converting is skipped!");
370  } else {
371  ATH_MSG_DEBUG("Created new Pad Collection Hash ID = " << static_cast<unsigned int>(it));
372 
373  // create new collection - I should be doing this with unique_ptr but it requires changing downstream functions
374  RpcPad* coll = new RpcPad(rpcCabling->identifier(it), it);
375  mapOfCollections[coll->identify()] = coll;
376 
377  } // endif collection not found in the container
378  } // end loop over vector of hash id
379 
380  if (mapOfCollections.empty()) {
381  ATH_MSG_VERBOSE("mapOfCollections is empty; fillCollectionsFromRob_v302 will not be called");
382  cnv_sc = StatusCode::SUCCESS;
383  return cnv_sc;
384  }
385 
386  // RpcPadCollections not decoded and in container are identified and passed explicitly to decoder
387  cnv_sc = fillCollectionsFromRob_v302(data, robFrag.rod_ndata(), mapOfCollections, rod_sourceId, RPC_SECTORLOGIC, decodeSL);
388  if (cnv_sc != StatusCode::SUCCESS) {
389  if (cnv_sc == StatusCode::RECOVERABLE) {
390  ATH_MSG_DEBUG("Decoding errors found ");
391  } else
392  return cnv_sc; // exit if failure
393  }
394 
395  // All un-decoded collections were decoded successfully, so they are passed back to the IDC
396  // Request to update to range-based for-loop
397  for (const std::map<Identifier, RpcPad*>::value_type& it : mapOfCollections) {
398  // Get the WriteHandle for this hash but we need to then check if it has already been decoded and
399  // added to the event cache for this hash in a different view
400  RpcPadContainer::IDC_WriteHandle lock = rdoIdc.getWriteHandle((it.second)->identifyHash());
401 
402  if (lock.alreadyPresent()) {
403  ATH_MSG_DEBUG("RpcPad collection with hash " << (int)(it.second)->identifyHash()
404  << " was already decoded in a parallel view");
405  } else {
406  // Take the pointer and pass ownership to unique_ptr and pass to the IDC_WriteHandle
407  StatusCode status_lock = lock.addOrDelete(std::unique_ptr<RpcPad>(it.second));
408 
409  if (status_lock != StatusCode::SUCCESS) {
410  ATH_MSG_ERROR("Failed to add RPC PAD collection to container with hash " << (int)(it.second)->identifyHash());
411  } else {
412  ATH_MSG_DEBUG("Adding RpcPad collection with hash " << (int)(it.second)->identifyHash()
413  << " to the RpcPad Container | size = " << (it.second)->size());
414  }
415  }
416  }
417  return cnv_sc;
418  } // endif (type==2)
419 
420  // Request to update to range-based for-loop
421  for (const IdentifierHash& it : collections) {
422  // IDC_WriteHandle
424 
425  if (lock.alreadyPresent()) {
426  ATH_MSG_DEBUG("RPC RDO collection already exist with collection hash = " << static_cast<unsigned int>(it)
427  << " converting is skipped!");
428  } else {
429  ATH_MSG_VERBOSE(" Created new Pad Collection Hash ID = " << static_cast<unsigned int>(it));
430 
431  // create new collection - I should be doing this with unique_ptr but it requires changing downstream functions
432  RpcPad* coll = new RpcPad(rpcCabling->identifier(it), it);
433 
434  // convert collection - note case3 will never be used due to statement above
435  switch (type) {
436  case 0: cnv_sc = fillCollection_v240(data, robFrag.rod_ndata(), *coll); break;
437  case 1: cnv_sc = fillCollection_v300(data, robFrag.rod_ndata(), *coll, subDetector, RPC_SECTORLOGIC); break;
438  case 2: cnv_sc = fillCollection_v302(data, robFrag.rod_ndata(), *coll, sourceId, RPC_SECTORLOGIC); break;
439  default: cnv_sc = fillCollection_v240(data, robFrag.rod_ndata(), *coll); break;
440  }
441 
442  if (cnv_sc.isFailure()) { ATH_MSG_VERBOSE("Error into the RPC fillCollections decoding"); }
443 
444  // Here need to implement writing for all the other fill methods
445  // Take the pointer and pass ownership to unique_ptr and pass to the IDC_WriteHandle
446  StatusCode status_lock = lock.addOrDelete(std::unique_ptr<RpcPad>(coll));
447 
448  // add collection into IDC
449  if (status_lock != StatusCode::SUCCESS) {
450  ATH_MSG_ERROR("Failed to add RPC PAD collection to container");
451  // report the error condition
452  } else
453  ATH_MSG_DEBUG("Adding RpcPad collection with hash " << (int)(it)
454  << " to the RpcPad Container | size = " << coll->size());
455  }
456  }
457  return cnv_sc;
458  } // end fillCollections

◆ fillCollectionsFromRob_v302()

StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302 ( BS  data,
const uint32_t  data_size,
std::map< Identifier, RpcPad * > &  vmap,
const uint32_t &  sourceId,
RpcSectorLogicContainer ,
const bool &  decodeSL 
) const
private

◆ finalize()

StatusCode Muon::RpcROD_Decoder::finalize ( )
overridevirtual

Definition at line 43 of file RpcROD_Decoder.cxx.

43  {
44  //==LBTAG print format failure final statistics
46  return StatusCode::SUCCESS;
47 }

◆ get16bits()

std::vector< uint16_t > Muon::RpcROD_Decoder::get16bits ( BS  data,
const int  size,
const int  nHeader,
const int  nFooter 
) const
inlineprivate

Definition at line 1726 of file RpcROD_Decoder.h.

1726  {
1727  uint32_t mask = 0x0000FFFF;
1728  uint32_t pos[2] = {0, 16};
1729 
1730  std::vector<uint16_t> result;
1731 
1732  for (int i = nHeader; i < (size - nFooter); i++) {
1733  for (uint32_t j = 0; j < 2; j++) {
1734  uint32_t vshift = v32[i] >> pos[j];
1735  uint16_t fragment = (uint16_t)(vshift & mask);
1736  result.push_back(fragment);
1737  }
1738  }
1739  return result;
1740  }

◆ get16bits_v301()

std::vector< uint16_t > Muon::RpcROD_Decoder::get16bits_v301 ( BS  data,
const int  size,
const int  nHeader,
const int  nFooter 
) const
inlineprivate

Definition at line 1710 of file RpcROD_Decoder.h.

1710  {
1711  uint32_t mask = 0x0000FFFF;
1712  uint32_t pos[2] = {16, 0};
1713 
1714  std::vector<uint16_t> result;
1715 
1716  for (int i = nHeader; i < (size - nFooter); i++) {
1717  for (uint32_t j = 0; j < 2; j++) {
1718  uint32_t vshift = v32[i] >> pos[j];
1719  uint16_t fragment = (uint16_t)(vshift & mask);
1720  result.push_back(fragment);
1721  }
1722  }
1723  return result;
1724  }

◆ initialize()

StatusCode Muon::RpcROD_Decoder::initialize ( )
overridevirtual

Definition at line 23 of file RpcROD_Decoder.cxx.

23  {
24  ATH_CHECK(m_idHelperSvc.retrieve());
25 
27 
28  if (m_specialROBNumber > 0) { ATH_MSG_DEBUG("Setting the special ROB Number to: 0x" << MSG::hex << m_specialROBNumber << MSG::dec); }
29 
30  //==LBTAG initialize vector and variables for format failure check
31  for (int i = 0; i < 13; i++) m_RPCcheckfail[i] = 0;
32  m_printerror = 0;
33  if(m_nobxs>8){
34  //The RPC simulation uses many arrays that assume maximum 8 BCs are readout
35  //See TrigT1/TrigT1RPChardware/Matrix.h for example
36  ATH_MSG_ERROR("Readout of more than 8 BCs is not supported by the simulation");
37  return StatusCode::FAILURE;
38  }
39 
40  return StatusCode::SUCCESS;
41 }

◆ isSector13Data()

bool Muon::RpcROD_Decoder::isSector13Data ( ) const
inline

Definition at line 62 of file RpcROD_Decoder.h.

62 { return m_sector13Data; }

◆ printcheckformat()

void Muon::RpcROD_Decoder::printcheckformat ( ) const
inlineprivate

Definition at line 281 of file RpcROD_Decoder.h.

281  {
282  // ===================================
283  // Print check ROB fragment statistics
284  // ===================================
285  MsgStream log(Athena::getMessageSvc(), "RpcROD_Decoder::printcheckformat");
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;
302  }

◆ specialROBNumber()

int Muon::RpcROD_Decoder::specialROBNumber ( ) const
inline

Definition at line 60 of file RpcROD_Decoder.h.

60 { return m_specialROBNumber; }

Member Data Documentation

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::RpcROD_Decoder::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 98 of file RpcROD_Decoder.h.

◆ m_maxprinterror

IntegerProperty Muon::RpcROD_Decoder::m_maxprinterror
private

Definition at line 89 of file RpcROD_Decoder.h.

◆ m_nobxs

Gaudi::Property<int> Muon::RpcROD_Decoder::m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
private

Definition at line 94 of file RpcROD_Decoder.h.

◆ m_printerror

int Muon::RpcROD_Decoder::m_printerror = 0
private

Definition at line 87 of file RpcROD_Decoder.h.

◆ m_RPCcheckfail

std::atomic_int Muon::RpcROD_Decoder::m_RPCcheckfail[13] {}
mutableprivate

Definition at line 88 of file RpcROD_Decoder.h.

◆ m_rpcReadKey

SG::ReadCondHandleKey<RpcCablingCondData> Muon::RpcROD_Decoder::m_rpcReadKey {this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
private

Definition at line 100 of file RpcROD_Decoder.h.

◆ m_sector13Data

BooleanProperty Muon::RpcROD_Decoder::m_sector13Data
private

Definition at line 105 of file RpcROD_Decoder.h.

◆ m_specialROBNumber

IntegerProperty Muon::RpcROD_Decoder::m_specialROBNumber
private

Definition at line 103 of file RpcROD_Decoder.h.


The documentation for this class was generated from the following files:
RXReadOutStructure::status
ubit16 status()
Definition: RXReadOutStructure.h:34
SectorLogicRXReadOutStructure::crc
ubit16 crc() const
Definition: SectorLogicRXReadOutStructure.h:69
PadReadOutStructure::errorCode
ubit16 errorCode() const
Definition: PadReadOutStructure.h:34
SectorLogicRXReadOutStructure::inputOuterPlane
ubit16 inputOuterPlane() const
Definition: SectorLogicRXReadOutStructure.h:59
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
RpcPad::identify
Identifier identify() const
Definition: RpcPad.h:100
MatrixReadOutStructure::febcid
ubit16 febcid()
Definition: MatrixReadOutStructure.h:32
SectorLogicReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: SectorLogicReadOutStructure.cxx:39
MatrixReadOutStructure::channel
ubit16 channel()
Definition: MatrixReadOutStructure.h:36
MatrixReadOutStructure::ijk
ubit16 ijk()
Definition: MatrixReadOutStructure.h:35
get_generator_info.result
result
Definition: get_generator_info.py:21
SectorLogicRXReadOutStructure::isFooter
bool isFooter()
Definition: SectorLogicRXReadOutStructure.cxx:154
MatrixReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: MatrixReadOutStructure.cxx:111
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
SectorLogicRXReadOutStructure::inputOverlapPhi
ubit16 inputOverlapPhi() const
Definition: SectorLogicRXReadOutStructure.h:58
IdentifiableContainerMT::getWriteHandle
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
Definition: IdentifiableContainerMT.h:248
PadReadOutStructure
Definition: PadReadOutStructure.h:13
RpcSectorLogic
Definition: RpcSectorLogic.h:20
RpcSLTriggerHit
Definition: RpcSLTriggerHit.h:16
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
MatrixReadOutStructure::crc
ubit16 crc()
Definition: MatrixReadOutStructure.h:40
SectorLogicReadOut
Definition: SectorLogicReadOut.h:17
Issue
Configuration Issue
Definition: PscIssues.h:31
Muon::RpcROD_Decoder::m_maxprinterror
IntegerProperty m_maxprinterror
Definition: RpcROD_Decoder.h:89
SectorLogicRXReadOutStructure::isHeader
bool isHeader()
Definition: SectorLogicRXReadOutStructure.cxx:110
SectorLogicRXReadOut
Definition: SectorLogicRXReadOut.h:17
RpcPad
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
Definition: MuonEventAthenaPoolTPCnv.cxx:146
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SectorLogicRXReadOutStructure::isSubHeader
bool isSubHeader()
Definition: SectorLogicRXReadOutStructure.cxx:117
SectorLogicRXReadOutStructure::outputThreshold
ubit16 outputThreshold(int nCand) const
Definition: SectorLogicRXReadOutStructure.h:63
Muon::RpcROD_Decoder::fillCollectionsFromRob_v302
StatusCode fillCollectionsFromRob_v302(BS data, const uint32_t data_size, std::map< Identifier, RpcPad * > &vmap, const uint32_t &sourceId, RpcSectorLogicContainer *, const bool &decodeSL) const
SectorLogicReadOut::padTriggerRate
float padTriggerRate(ubit16 padAddress)
Definition: SectorLogicReadOut.cxx:182
PadReadOutStructure::isPreFooter
bool isPreFooter()
Definition: PadReadOutStructure.cxx:182
DataModelTestDataCommonDict::xa
std::vector< DMTest::B > xa
Definition: DataModelTestDataCommonDict.h:54
SectorLogicRXReadOutStructure::slid
ubit16 slid() const
Definition: SectorLogicRXReadOutStructure.h:44
SectorLogicReadOut::numberOfCounterWords
ubit16 numberOfCounterWords()
Definition: SectorLogicReadOut.h:30
SectorLogicRXReadOutStructure::inputTriggerBcid
ubit16 inputTriggerBcid() const
Definition: SectorLogicRXReadOutStructure.h:54
IdentifiableContainerMT::IDC_WriteHandle::alreadyPresent
bool alreadyPresent()
Definition: IdentifiableContainerMT.h:59
MatrixReadOutStructure::overlap
ubit16 overlap()
Definition: MatrixReadOutStructure.h:38
MatrixReadOutStructure::fel1id
ubit16 fel1id()
Definition: MatrixReadOutStructure.h:31
MatrixReadOutStructure::cmid
ubit16 cmid()
Definition: MatrixReadOutStructure.h:30
SectorLogicRXReadOutStructure
Definition: SectorLogicRXReadOutStructure.h:13
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::RpcROD_Decoder::m_printerror
int m_printerror
Definition: RpcROD_Decoder.h:87
Muon::RpcROD_Decoder::get16bits_v301
std::vector< uint16_t > get16bits_v301(BS data, const int size, const int nHeader, const int nFooter) const
Definition: RpcROD_Decoder.h:1710
RpcCoinMatrix
Definition: RpcCoinMatrix.h:20
SectorLogicRXReadOutStructure::hasMoreThan2TriggerCand
ubit16 hasMoreThan2TriggerCand() const
Definition: SectorLogicRXReadOutStructure.h:66
Muon::RpcROD_Decoder::get16bits
std::vector< uint16_t > get16bits(BS data, const int size, const int nHeader, const int nFooter) const
Definition: RpcROD_Decoder.h:1726
SectorLogicRXReadOutStructure::status
ubit16 status() const
Definition: SectorLogicRXReadOutStructure.h:68
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
RpcFiredChannel
Definition: RpcFiredChannel.h:20
SectorLogicReadOutStructure::isFooter
bool isFooter()
Definition: SectorLogicReadOutStructure.cxx:74
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
RPCRODDecode::CMFragment
MatrixReadOut * CMFragment()
Definition: RPCRODDecode.h:21
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
RpcSectorLogic::addCounter
void addCounter(const uint16_t counter)
Set methods.
Definition: RpcSectorLogic.cxx:7
Muon::RpcROD_Decoder::m_rpcReadKey
SG::ReadCondHandleKey< RpcCablingCondData > m_rpcReadKey
Definition: RpcROD_Decoder.h:100
RpcCablingCondData
Definition: RpcCablingCondData.h:21
SectorLogicRXReadOutStructure::inputThreshold
ubit16 inputThreshold() const
Definition: SectorLogicRXReadOutStructure.h:55
Muon::RpcROD_Decoder::fillCollection_v300
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)
Definition: RpcROD_Decoder.h:1012
SectorLogicRXReadOutStructure::isOutputBody
bool isOutputBody()
Definition: SectorLogicRXReadOutStructure.cxx:146
TRT::Hit::side
@ side
Definition: HitInfo.h:83
RPCRODDecode::SLFragment
SectorLogicReadOut * SLFragment()
Definition: RPCRODDecode.h:22
SectorLogicRXReadOutStructure::isOutputHeader
bool isOutputHeader()
Definition: SectorLogicRXReadOutStructure.cxx:131
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Muon::RpcROD_Decoder::m_RPCcheckfail
std::atomic_int m_RPCcheckfail[13]
Definition: RpcROD_Decoder.h:88
MatrixReadOut
Definition: MatrixReadOut.h:18
SectorLogicRXReadOutStructure::isInputHeader
bool isInputHeader()
Definition: SectorLogicRXReadOutStructure.cxx:124
RXReadOutStructure::errorCode
ubit16 errorCode()
Definition: RXReadOutStructure.h:35
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
PadReadOutStructure::status
ubit16 status() const
Definition: PadReadOutStructure.h:33
SectorLogicRXReadOutStructure::outputRowinBcid
ubit16 outputRowinBcid() const
Definition: SectorLogicRXReadOutStructure.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SectorLogicReadOutStructure::isHeader
bool isHeader()
Definition: SectorLogicReadOutStructure.cxx:66
RPCRODStructure::getSourceIDSubdetectorID
ubit16 getSourceIDSubdetectorID()
Definition: RPCRODStructure.h:24
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
SectorLogicRXReadOutStructure::fel1id
ubit16 fel1id() const
Definition: SectorLogicRXReadOutStructure.h:45
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
Muon::RpcROD_Decoder::BS
OFFLINE_FRAGMENTS_NAMESPACE::PointerType BS
Definition: RpcROD_Decoder.h:65
PadReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: PadReadOutStructure.cxx:118
lumiFormat.i
int i
Definition: lumiFormat.py:85
SectorLogicReadOut::readSLCounterCurrent
ubit16 readSLCounterCurrent()
Definition: SectorLogicReadOut.cxx:139
Muon::RpcROD_Decoder::m_nobxs
Gaudi::Property< int > m_nobxs
Definition: RpcROD_Decoder.h:94
SectorLogicRXReadOutStructure::outputOverlap
ubit16 outputOverlap(int nCand) const
Definition: SectorLogicRXReadOutStructure.h:65
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IdentifiableContainerMT::tryAddFromCache
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...
Definition: IdentifiableContainerMT.h:331
PadReadOutStructure::isHeader
bool isHeader()
Definition: PadReadOutStructure.cxx:166
SectorLogicReadOut::opl
ubit16 opl(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:220
Muon::RpcROD_Decoder::m_sector13Data
BooleanProperty m_sector13Data
Definition: RpcROD_Decoder.h:105
IdentifiableContainerMT::IDC_WriteHandle
Definition: IdentifiableContainerMT.h:34
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::RpcROD_Decoder::fillCollection_v240
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
Definition: RpcROD_Decoder.h:1427
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SectorLogicRXReadOut::numberOfInputWords
uint16_t numberOfInputWords()
Definition: SectorLogicRXReadOut.h:27
Muon::RpcROD_Decoder::m_specialROBNumber
IntegerProperty m_specialROBNumber
Definition: RpcROD_Decoder.h:103
SectorLogicRXReadOutStructure::inputOverlapEta
ubit16 inputOverlapEta() const
Definition: SectorLogicRXReadOutStructure.h:57
RPCRXRODDecode
Definition: RPCRXRODDecode.h:13
SectorLogicRXReadOutStructure::slbcid
ubit16 slbcid() const
Definition: SectorLogicRXReadOutStructure.h:47
RPCRODDecode
Definition: RPCRODDecode.h:12
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
plotBeamSpotCompare.xd
xd
Definition: plotBeamSpotCompare.py:220
SectorLogicRXReadOutStructure::nTriggerCand
ubit16 nTriggerCand() const
Definition: SectorLogicRXReadOutStructure.h:61
RXReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: RXReadOutStructure.cxx:78
RpcCoinMatrix::setCRC
void setCRC(ubit16 crc)
Definition: RpcCoinMatrix.h:75
SectorLogicRXReadOutStructure::inputRowinBcid
ubit16 inputRowinBcid() const
Definition: SectorLogicRXReadOutStructure.h:49
RPCRODStructure
Definition: RPCRODStructure.h:16
SectorLogicRXReadOutStructure::inputRoi
ubit16 inputRoi() const
Definition: SectorLogicRXReadOutStructure.h:56
Muon::ensure_more_data
bool ensure_more_data(int index, int size, MsgStream &log, bool &printMessage, const std::string &message)
Definition: RpcROD_Decoder.h:35
Muon::RpcROD_Decoder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: RpcROD_Decoder.h:98
SectorLogicRXReadOutStructure::isInputBody
bool isInputBody()
Definition: SectorLogicRXReadOutStructure.cxx:138
SectorLogicReadOut::checkFragment
bool checkFragment()
Definition: SectorLogicReadOut.cxx:285
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PadReadOutStructure::l1id
ubit16 l1id() const
Definition: PadReadOutStructure.h:35
SectorLogicRXReadOutStructure::outputTriggerBcid
ubit16 outputTriggerBcid(int) const
Definition: SectorLogicRXReadOutStructure.h:62
MatrixReadOutStructure
Definition: MatrixReadOutStructure.h:13
Muon::RpcROD_Decoder::printcheckformat
void printcheckformat() const
Definition: RpcROD_Decoder.h:281
SectorLogicReadOut::oveta
ubit16 oveta(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:238
threshold
Definition: chainparser.cxx:74
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
RpcPad
Definition: RpcPad.h:21
RpcSectorLogic::setHasMoreThan2TriggerCand
void setHasMoreThan2TriggerCand(const bool a)
Definition: RpcSectorLogic.h:50
DataModelTestDataCommonDict::xb
DMTest::CView::Pers_t xb
Definition: DataModelTestDataCommonDict.h:55
MatrixReadOutStructure::time
ubit16 time()
Definition: MatrixReadOutStructure.h:34
SectorLogicReadOut::ovphi
ubit16 ovphi(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:229
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
IdentifiableContainerMT::IDC_WriteHandle::addOrDelete
StatusCode addOrDelete(std::unique_ptr< T > ptr)
Definition: IdentifiableContainerMT.h:53
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.PyAthena.v
v
Definition: PyAthena.py:154
get_generator_info.version
version
Definition: get_generator_info.py:33
RPCRODStructure::getSourceIDRODID
ubit16 getSourceIDRODID()
Definition: RPCRODStructure.h:25
RpcSLTriggerHit::setIsInput
void setIsInput(bool isInput)
Definition: RpcSLTriggerHit.h:61
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
RpcCoinMatrix
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcCoinMatrix
Definition: MuonEventAthenaPoolTPCnv.cxx:134
SectorLogicReadOutStructure
Definition: SectorLogicReadOutStructure.h:11
RpcSectorLogicContainer::findSector
bool findSector(const uint16_t sectorId, const uint16_t side=0) const
Check if the sector has already been decoded.
Definition: RpcSectorLogicContainer.cxx:13
RpcSectorLogic::addTriggerRate
void addTriggerRate(const double trig)
Definition: RpcSectorLogic.h:49
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
RpcSectorLogicContainer::setSector
bool setSector(uint16_t sectorId, const uint16_t side=0)
Flag the sector as already decoded.
Definition: RpcSectorLogicContainer.cxx:18
SectorLogicReadOut::bcid
ubit16 bcid(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:256
RPCRXRODDecode::CMFragment
MatrixReadOut * CMFragment()
Definition: RPCRXRODDecode.h:22
PadReadOutStructure::padid
ubit16 padid() const
Definition: PadReadOutStructure.h:32
RPCRODDecode::pushWord
int pushWord(const ubit16 inword, uint NOBXS)
Definition: RPCRODDecode.cxx:86
SectorLogicReadOut::cmadd
ubit16 cmadd(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:202
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PadReadOutStructure::isSubHeader
bool isSubHeader()
Definition: PadReadOutStructure.cxx:174
RXReadOutStructure
Definition: RXReadOutStructure.h:14
SectorLogicRXReadOut::readSLHitCurrent
uint16_t readSLHitCurrent()
Definition: SectorLogicRXReadOut.cxx:107
CxxUtils::reset
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.
Definition: bitmask.h:251
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
RPCRXRODDecode::pushWord
int pushWord(const ubit16 inword, uint NOBXS)
Definition: RPCRXRODDecode.cxx:87
SectorLogicRXReadOutStructure::isOutputDecoded
bool isOutputDecoded()
Definition: SectorLogicRXReadOutStructure.h:72
RPCRODStructure::decodeSourceID
void decodeSourceID(RODword sourceID)
Definition: RPCRODStructure.cxx:49
RXReadOutStructure::isFooter
bool isFooter()
Definition: RXReadOutStructure.cxx:71
MatrixReadOutStructure::threshold
ubit16 threshold()
Definition: MatrixReadOutStructure.h:37
merge.status
status
Definition: merge.py:17
SectorLogicRXReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: SectorLogicRXReadOutStructure.cxx:39
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
RXReadOutStructure::RXid
ubit16 RXid()
Definition: RXReadOutStructure.h:33
RPCRXRODDecode::SLFragment
SectorLogicRXReadOut * SLFragment()
Definition: RPCRXRODDecode.h:23
PadReadOutStructure::isFooter
bool isFooter()
Definition: PadReadOutStructure.cxx:190
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
SectorLogicRXReadOutStructure::outputRoi
ubit16 outputRoi(int nCand) const
Definition: SectorLogicRXReadOutStructure.h:64
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
test_pyathena.counter
counter
Definition: test_pyathena.py:15
SectorLogicRXReadOutStructure::inputPadId
ubit16 inputPadId() const
Definition: SectorLogicRXReadOutStructure.h:50
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
MatrixReadOutStructure::bcid
ubit16 bcid()
Definition: MatrixReadOutStructure.h:33
RXReadOutStructure::isHeader
bool isHeader()
Definition: RXReadOutStructure.cxx:64
SectorLogicReadOut::ptid
ubit16 ptid(ubit16 indexLink, ubit16 indexGate)
Definition: SectorLogicReadOut.cxx:211
Trk::previous
@ previous
Definition: BinningData.h:32
PadReadOutStructure::bcid
ubit16 bcid() const
Definition: PadReadOutStructure.h:36
Muon::RpcROD_Decoder::fillCollection_v302
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...
Definition: RpcROD_Decoder.h:465
Identifier
Definition: IdentifierFieldParser.cxx:14