ATLAS Offline Software
SCT_RodEncoder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "SCT_RodEncoder.h"
6 
8 
10 #include "InDetIdentifier/SCT_ID.h"
14 
15 #include "Identifier/Identifier.h"
17 
18 namespace { // Anonymous namespace
19  int rodLinkFromOnlineID(const SCT_OnlineId onlineID)
20  {
21  const uint32_t fibre{onlineID.fibre()};
22  const int formatter{static_cast<int>((fibre/12) & 0x7)};
23  const int linkNum{static_cast<int>((fibre - (formatter*12)) & 0xF)};
24  const int rodLink{(formatter << 4) | linkNum};
25  return rodLink;
26  }
27  bool isOdd(const int someNumber)
28  {
29  return static_cast<bool>(someNumber & 1);
30  }
31 
32  bool isEven(const int someNumber)
33  {
34  return not isOdd(someNumber);
35  }
36 
37  bool swappedCable(const int moduleSide, const int linkNumber)
38  {
39  return isOdd(linkNumber) ? (moduleSide==0) : (moduleSide==1);
40  }
41 } // End of anonymous namespace
42 
43 // Constructor
44 
45 SCT_RodEncoder::SCT_RodEncoder(const std::string& type, const std::string& name,
46  const IInterface* parent) :
47  base_class(type, name, parent)
48 {
49 }
50 
51 // Initialize
52 
54 {
55  ATH_MSG_DEBUG("SCT_RodEncoder::initialize()");
56 
57  // Retrieve cabling tool
58  ATH_CHECK(m_cabling.retrieve());
59  ATH_MSG_DEBUG("Retrieved tool " << m_cabling);
60 
61  ATH_CHECK(detStore()->retrieve(m_sctID, "SCT_ID"));
62  ATH_CHECK(m_bsErrTool.retrieve());
63 
64  // See if strip numbers go from 0 to 767 or vice versa for all the wafers.
65  // swapPhiReadoutDirection will not change during a run.
66  // Since this is access to SiDetectorElement during initialization,
67  // condition object of SiDetectorElementCollection is not accessible.
68  // SCT_DetectorManager has to be used.
69  const InDetDD::SCT_DetectorManager* sctDetManager{nullptr};
70  ATH_CHECK(detStore()->retrieve(sctDetManager, "SCT"));
71 
72  const InDetDD::SiDetectorElementCollection* sctDetElementColl{sctDetManager->getDetectorElementCollection()};
73  for (const InDetDD::SiDetectorElement* sctDetElement : *sctDetElementColl) {
74  if (sctDetElement->swapPhiReadoutDirection()) {
75  m_swapModuleID.insert(sctDetElement->identify());
76  }
77  }
78 
79  return StatusCode::SUCCESS;
80 }
81 
82 // Finalize
83 
85 {
86  return StatusCode::SUCCESS;
87 }
88 
89 // fillROD method
90 
91 void SCT_RodEncoder::fillROD(std::vector<uint32_t>& vec32Data, const uint32_t& robID,
92  const std::vector<const SCT_RDORawData*>& vecRDOs) const
93 {
94  // Retrieve errors from SCT_ByteStreamErrorsSvc
95  const EventContext& ctx{Gaudi::Hive::currentContext()};
96  const std::set<IdentifierHash> timeOutErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::TimeOutError,ctx)};
97  const std::set<IdentifierHash> lvl1IDErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::LVL1IDError,ctx)};
98  const std::set<IdentifierHash> bcIDErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::BCIDError,ctx)};
99  const std::set<IdentifierHash> preambleErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::PreambleError,ctx)};
100  const std::set<IdentifierHash> formatterErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::FormatterError,ctx)};
101  const std::set<IdentifierHash> trailerErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::TrailerError,ctx)};
102  const std::set<IdentifierHash> headerTrailerErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::HeaderTrailerLimitError,ctx)};
103  const std::set<IdentifierHash> trailerOverflowErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::TrailerOverflowError,ctx)};
104  const std::set<IdentifierHash> abcdErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::ABCDError,ctx)};
105  const std::set<IdentifierHash> rawErrors{m_bsErrTool->getErrorSet(SCT_ByteStreamErrors::RawError,ctx)};
106 
107  std::vector<uint16_t> vec16Data;
108 
109  // Loop over errors here - just add headers (w/ errors), trailers (w/errors), and raw and abcd errors
110  addHeadersWithErrors(robID, &timeOutErrors, TIMEOUT_ERR, vec16Data);
111  addHeadersWithErrors(robID, &lvl1IDErrors, L1_ERR, vec16Data);
112  addHeadersWithErrors(robID, &bcIDErrors, BCID_ERR, vec16Data);
113  addHeadersWithErrors(robID, &preambleErrors, PREAMBLE_ERR, vec16Data);
114  addHeadersWithErrors(robID, &formatterErrors, FORMATTER_ERR, vec16Data);
115 
116  addTrailersWithErrors(robID, &trailerErrors, TRAILER_ERR, vec16Data);
117  addTrailersWithErrors(robID, &headerTrailerErrors, HEADER_TRAILER_ERR, vec16Data);
118  addTrailersWithErrors(robID, &trailerOverflowErrors, TRAILER_OVFLW_ERR, vec16Data);
119 
120  addSpecificErrors(robID, &abcdErrors, ABCD_ERR, vec16Data);
121  addSpecificErrors(robID, &rawErrors, RAWDATA_ERR, vec16Data);
122 
123  std::vector<bool> vec_isDuplicated(vecRDOs.size(), false);
124 
125  // Loop over RDOs to check for duplicates and fill vec_isDuplicated vector
126  for (unsigned int iRDO1{0}; iRDO1<vecRDOs.size(); iRDO1++) {
127  const SCT_RDORawData* rdo1{vecRDOs.at(iRDO1)};
128  if (rdo1 == nullptr) {
129  ATH_MSG_ERROR("RDO pointer is nullptr. skipping this hit.");
130  vec_isDuplicated.at(iRDO1) = true;
131  continue;
132  }
133 
134  // Check if there is another RDO with the same first strip
135  for (unsigned int iRDO2{0}; iRDO2<iRDO1; iRDO2++) {
136  const SCT_RDORawData* rdo2{vecRDOs.at(iRDO2)};
137  if (vec_isDuplicated.at(iRDO2)) continue;
138 
139  if (rdo1->identify() == rdo2->identify()) {
140  // Keep RDO with larger cluster size. If cluster sizes are the same, keep the first one.
141  if (rdo1->getGroupSize() >= rdo2->getGroupSize()) {
142  vec_isDuplicated.at(iRDO2) = true;
143  }
144  else {
145  vec_isDuplicated.at(iRDO1) = true;
146  }
147  break;
148  }
149  }
150  }
151 
152  std::vector<int> vecTimeBins;
153  int strip{0};
154  int timeBin{0};
155  int groupSize{0};
156 
157  uint32_t lastHeader{0};
158  bool firstInROD{true};
159  uint16_t lastTrailer{0};
160 
161  // Loop over RDOs to decode to 16 bit words
162  for (unsigned int iRDO{0}; iRDO<vecRDOs.size(); iRDO++) {
163  const SCT_RDORawData* rdo{vecRDOs.at(iRDO)};
164  if (vec_isDuplicated.at(iRDO)) continue;
165 
166  const uint16_t header{this->getHeaderUsingRDO(rdo)};
167  if (header != lastHeader) {
168  if (not firstInROD) {
169  vec16Data.push_back(lastTrailer);
170  }
171  firstInROD = false;
172  vec16Data.push_back(header);
173  lastHeader = header;
174  lastTrailer = getTrailer(0);
175  }
176  if (m_condensed.value()) { // Condensed mode
177  strip = getStrip(rdo);
178  groupSize = rdo->getGroupSize();
179  if (groupSize == 1) { // For single hit
180  const int constGroupSize{1};
181  const int constStrip{strip};
182  encodeData(vecTimeBins, vec16Data, rdo, constGroupSize, constStrip);
183  }
184  // Sim RDO could have groupe size > 1, then they are split 2 by 2 to built the condensed BS data.
185  else { // Encoding in condensed BS paired data from groupe size > 1.
186  const int chipFirst{strip/128};
187  const int chipLast{(strip+groupSize-1)/128};
188 
189  for (int chip{chipFirst}; chip<=chipLast; chip++) {
190  int tmpGroupSize = 0;
191  if (chipFirst == chipLast) tmpGroupSize = groupSize; // In case of one chip
192  else if (chip == chipLast) tmpGroupSize = strip+groupSize-chip*128; // In case of last chip
193  else if (chip == chipFirst) tmpGroupSize = (chip+1)*128-strip; // In case of first chip
194  else tmpGroupSize = 128; // In case of middle chip
195  const int tmpStrip1{chip==chipFirst ? strip : 128*chip};
196 
197  const int numPairedRDO{tmpGroupSize/2};
198  for (int i =0; i<numPairedRDO; i++) {
199  const int constGroupSize{2};
200  const int constStrip{tmpStrip1+ (2*i)};
201  encodeData(vecTimeBins, vec16Data, rdo, constGroupSize, constStrip);
202  }
203  if ((tmpGroupSize != 0) and isOdd(tmpGroupSize)) {// The last hit from a cluster with odd group size
204  const int constGroupSize{1};
205  const int constStrip{tmpStrip1+ (tmpGroupSize - 1)};
206  encodeData(vecTimeBins, vec16Data, rdo, constGroupSize, constStrip);
207  }
208  }
209  }
210 
211  } // End of Condensed mode
212 
213  else { // Expanded mode
214  vecTimeBins.clear();
215  const SCT_RDORawData* rdo{vecRDOs.at(iRDO)};
216  strip = getStrip(rdo);
217  timeBin = getTimeBin(rdo);
218  groupSize = rdo->getGroupSize();
219 
220  for (int t{0}; t < groupSize; t++) {
221  vecTimeBins.push_back(timeBin);
222  strip++;
223  }
224  const int constStrip{getStrip(rdo)};
225  const int constGroupSize{rdo->getGroupSize()};
226  encodeData(vecTimeBins, vec16Data, rdo, constGroupSize, constStrip);
227 
228  } // End of Expanded mode
229  } // End of RDO decode loop
230 
231  if ((not firstInROD) and (lastTrailer != 0)) {
232  vec16Data.push_back(lastTrailer);
233  }
234 
235  // 16 bits TO 32 bits and pack into 32 bit vectors
236  packFragments(vec16Data,vec32Data);
237 
238  return;
239 }
240 
241 // encodeData method
242 
243 void SCT_RodEncoder::encodeData(const std::vector<int>& vecTimeBins, std::vector<uint16_t>& vec16Words,
244  const SCT_RDORawData* rdo, const int& groupSize, const int& strip) const
245 {
246  const int encodedSide{side(rdo) << 14};
247 
248  const Identifier idColl{offlineID(rdo)};
249  int tmpStrip{strip};
250  if (m_swapModuleID.find(idColl) != m_swapModuleID.end()) { // Check if the strip has to be swapped (swap phi readout direction)
251  tmpStrip= 767 - tmpStrip;
252  tmpStrip= tmpStrip-(groupSize-1);
253  }
254 
255  const int chipNum{((tmpStrip/128) & 0x7) << 11};
256  const int clustBaseAddr{((tmpStrip-(chipNum*128)) & 0x7F) << 4};
257 
258  int timeBin{0};
259  int firstHitErr{0 << 2};
260  int secondHitErr{0 << 3};
261 
262  const SCT3_RawData* rdoCosmic{dynamic_cast<const SCT3_RawData*>(rdo)};
263  if (rdoCosmic != nullptr) {
264  timeBin = getTimeBin(rdoCosmic);
265  firstHitErr = ((rdoCosmic)->FirstHitError()) << 2;
266  secondHitErr = ((rdoCosmic)->SecondHitError()) << 3;
267  }
268 
269  if (m_condensed.value()) { // Condensed mode
270  if (groupSize == 1) { // For single hit
271  const uint16_t hitCondSingle{static_cast<uint16_t>(0x8000 | encodedSide | chipNum | clustBaseAddr | firstHitErr)};
272  vec16Words.push_back(hitCondSingle);
273  }
274  else if (groupSize == 2) { // For paired strip Hits
275  const uint16_t hitCondPaired{static_cast<uint16_t>(0x8001 | encodedSide | chipNum | clustBaseAddr | secondHitErr | firstHitErr)};
276  vec16Words.push_back(hitCondPaired);
277  }
278  } // End of Condensed mode
279 
280  else { // Expanded mode
281  const int numEven{static_cast<int>((vecTimeBins.size() - 1)/2)};
282 
283  // First hit
284  const uint16_t hitExpFirst{static_cast<uint16_t>(0x8000 | encodedSide | chipNum | clustBaseAddr | timeBin)};
285  vec16Words.push_back(hitExpFirst);
286 
287  // Even consecutive strips to the first one 1DDD 1st consec strip 1DDD 2nd consec strip
288  for (int i{1}; i<=numEven; i++) {
289  const uint16_t hitExpEven{static_cast<uint16_t>(0x8088 | ((vecTimeBins[(2*i-1)] & 0xF) << 4) | (vecTimeBins[2*i] & 0xF))};
290  vec16Words.push_back(hitExpEven);
291  }
292  // Last bin of the Odd next hits
293  if ((not vecTimeBins.empty()) and isEven(vecTimeBins.size())) {
294  const uint16_t hitExpLast{static_cast<uint16_t>(0x8008 | (vecTimeBins[vecTimeBins.size()-1] & 0xF))};
295  vec16Words.push_back(hitExpLast);
296  }
297  } // End of Expanded mode
298 
299  return;
300 }
301 
302 // packFragments function
303 
304 void SCT_RodEncoder::packFragments(std::vector<uint16_t>& vec16Words,
305  std::vector<uint32_t>& vec32Words) const
306 {
307  int num16Words{static_cast<int>(vec16Words.size())};
308  if (isOdd(num16Words)) {
309  // Just add an additional 16bit words to make even size v16 to in the 32 bits word 0x40004000
310  vec16Words.push_back(0x4000);
311  num16Words++;
312  }
313  // Now merge 2 consecutive 16 bit words in 32 bit words
314  const unsigned short int numWords{2};
315  const unsigned short int position[numWords]{0, 16};
316  unsigned short int arr16Words[numWords]{0, 0};
317  for (int i{0}; i<num16Words; i += numWords) {
318  arr16Words[i%numWords] = vec16Words[i+1];
319  arr16Words[(i+1)%numWords] = vec16Words[i];
320  const uint32_t uint32Word{set32Bits(arr16Words, position, numWords)};
321  vec32Words.push_back(uint32Word);
322 #ifdef SCT_DEBUG
323  ATH_MSG_INFO("SCT encoder -> PackFragments: Output rod 0x"<<std::hex<<uint32Word<<std::dec);
324 #endif
325  }
326 
327  return;
328 }
329 
330 // set32Bits function
331 
332 uint32_t SCT_RodEncoder::set32Bits(const unsigned short int* arr16Words,
333  const unsigned short int* position,
334  const unsigned short int& numWords) const
335 {
336  uint32_t uint32Word{0};
337  uint32_t pos{0};
338  uint32_t uint16Word{0};
339  for (uint16_t i{0}; i<numWords; i++) {
340  uint16Word = static_cast<uint32_t>(*(arr16Words+i));
341  pos = static_cast<uint32_t>(*(position+i));
342  uint32Word |= (uint16Word<<pos);
343  }
344  return uint32Word;
345 }
346 
347 // Get RDO info functions
348 
350 {
351  const Identifier rdoID{rdo->identify()};
352  return m_sctID->strip(rdoID);
353 }
354 
356 {
357  const Identifier rdoId{rdo->identify()};
358  return m_sctID->wafer_id(rdoId);
359 }
360 
362 {
363  const Identifier waferID{offlineID(rdo)};
364  const IdentifierHash offlineIDHash{m_sctID->wafer_hash(waferID)};
365  return static_cast<uint32_t>(m_cabling->getOnlineIdFromHash(offlineIDHash));
366 }
367 
369 {
370  return rodLinkFromOnlineID(onlineID(rdo));
371 }
372 
373 int SCT_RodEncoder::side(const SCT_RDORawData* rdo) const
374 {
375  const Identifier rdoID{rdo->identify()};
376  int sctSide{m_sctID->side(rdoID)};
377  // see if we need to swap sides due to cabling weirdness
378  const int linkNum{getRODLink(rdo) & 0xF};
379  if (swappedCable(sctSide,linkNum)) sctSide = 1-sctSide;
380  return sctSide;
381 }
382 
384 {
385  int timeBin{0};
386  const SCT3_RawData* rdoCosmic{dynamic_cast<const SCT3_RawData*>(rdo)};
387  if (rdoCosmic != nullptr) timeBin = rdoCosmic->getTimeBin();
388  return timeBin;
389 }
390 
391 // Get headers and trailer functions
392 
394 {
395  const int rodLink{getRODLink(rdo)};
396  const uint16_t linkHeader{static_cast<uint16_t>(0x2000 | (m_condensed.value() << 8) | rodLink)};
397  return linkHeader;
398 }
399 
400 uint16_t SCT_RodEncoder::getHeaderUsingHash(const IdentifierHash& linkHash, const int& errorWord) const
401 {
402  const int rodLink{rodLinkFromOnlineID(m_cabling->getOnlineIdFromHash(linkHash))};
403  const uint16_t linkHeader{static_cast<uint16_t>(0x2000 | errorWord | (m_condensed.value() << 8) | rodLink)};
404  return linkHeader;
405 }
406 
407 uint16_t SCT_RodEncoder::getTrailer(const int& errorWord) const
408 {
409  const uint16_t linkTrailer{static_cast<uint16_t>(0x4000 | errorWord)};
410  return linkTrailer;
411 }
412 
413 // Add errors functions
414 
415 void SCT_RodEncoder::addHeadersWithErrors(const uint32_t& robID, const std::set<IdentifierHash>* errors,
416  const ErrorWords& errType, std::vector<uint16_t>& vec16Data) const
417 {
418  for (const IdentifierHash& linkHash: *errors) {
419  const uint32_t errROBID{m_cabling->getRobIdFromHash(linkHash)};
420  if (errROBID == robID) {
421  const uint16_t header{getHeaderUsingHash(linkHash, errType)};
422  vec16Data.push_back(header);
423  const uint16_t trailer{getTrailer(NULL_TRAILER_ERR)};
424  vec16Data.push_back(trailer);
425  }
426  }
427 }
428 
429 //
430 void SCT_RodEncoder::addTrailersWithErrors(const uint32_t& robID, const std::set<IdentifierHash>* errors,
431  const ErrorWords& errType, std::vector<uint16_t>& vec16Data) const
432 {
433  for (const IdentifierHash& linkHash: *errors) {
434  const uint32_t errROBID{m_cabling->getRobIdFromHash(linkHash)};
435  if (errROBID == robID) {
437  const uint16_t trailer{getTrailer(errType)};
438  vec16Data.push_back(header);
439  vec16Data.push_back(trailer);
440  }
441  }
442 }
443 
444 void SCT_RodEncoder::addSpecificErrors(const uint32_t& robID, const std::set<IdentifierHash>* errors,
445  const ErrorWords& errType, std::vector<uint16_t>& vec16Data) const
446 {
447  for (const IdentifierHash& linkHash: *errors) {
448  const uint32_t errROBID{m_cabling->getRobIdFromHash(linkHash)};
449  if (errROBID == robID) {
451  const uint16_t trailer{getTrailer(NULL_TRAILER_ERR)};
452  vec16Data.push_back(header);
453  vec16Data.push_back(errType);
454  vec16Data.push_back(trailer);
455  }
456  }
457 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SCT_RodEncoder::NULL_TRAILER_ERR
@ NULL_TRAILER_ERR
Definition: SCT_RodEncoder.h:84
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
SCT_RodEncoder.h
SiliconTech::strip
@ strip
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
header
Definition: hcg.cxx:526
SCT_RodEncoder::TIMEOUT_ERR
@ TIMEOUT_ERR
Definition: SCT_RodEncoder.h:73
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SCT_RodEncoder::addSpecificErrors
void addSpecificErrors(const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const
Add specific errors for ROB to the vector of 16 bit words.
Definition: SCT_RodEncoder.cxx:444
SCT_OnlineId
Definition: SCT_OnlineId.h:22
SCT_RodEncoder::m_bsErrTool
ToolHandle< ISCT_ByteStreamErrorsTool > m_bsErrTool
Tool that keeps track of modules that give rise to errors in the bytestream.
Definition: SCT_RodEncoder.h:163
SCT_RodEncoder::offlineID
Identifier offlineID(const SCT_RDORawData *rdo) const
Get the offline Identifier from the RDO.
Definition: SCT_RodEncoder.cxx:355
SCT_RodEncoder::SCT_RodEncoder
SCT_RodEncoder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: SCT_RodEncoder.cxx:45
SCT_RodEncoder::getHeaderUsingHash
uint16_t getHeaderUsingHash(const IdentifierHash &linkHash, const int &errorWord) const
Get the 16-bit word for a header for a link with a ByteStream error.
Definition: SCT_RodEncoder.cxx:400
SCT_RodEncoder::ABCD_ERR
@ ABCD_ERR
Definition: SCT_RodEncoder.h:82
SCT_RDORawData
Definition: SCT_RDORawData.h:24
SCT_RodEncoder::addHeadersWithErrors
void addHeadersWithErrors(const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const
Add header with errors for ROB to the vector of 16 bit words.
Definition: SCT_RodEncoder.cxx:415
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SCT_RodEncoder::finalize
virtual StatusCode finalize() override
Finalize.
Definition: SCT_RodEncoder.cxx:84
SCT_RodEncoder::side
int side(const SCT_RDORawData *rdo) const
Get the side info from the RDO.
Definition: SCT_RodEncoder.cxx:373
SCT_RodEncoder::L1_ERR
@ L1_ERR
Definition: SCT_RodEncoder.h:74
SCT_RodEncoder::getStrip
int getStrip(const SCT_RDORawData *rdo) const
Get the strip number info from the RDO.
Definition: SCT_RodEncoder.cxx:349
SCT_RodEncoder::addTrailersWithErrors
void addTrailersWithErrors(const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const
Add trailers with errors for ROB to the vector of 16 bit words.
Definition: SCT_RodEncoder.cxx:430
SCT_RodEncoder::getHeaderUsingRDO
uint16_t getHeaderUsingRDO(const SCT_RDORawData *rdo) const
Get the 16-bit word for a header for a hit.
Definition: SCT_RodEncoder.cxx:393
SCT_RodEncoder::FORMATTER_ERR
@ FORMATTER_ERR
Definition: SCT_RodEncoder.h:77
SCT_RodEncoder::TRAILER_OVFLW_ERR
@ TRAILER_OVFLW_ERR
Definition: SCT_RodEncoder.h:81
SCT_RodEncoder::set32Bits
uint32_t set32Bits(const unsigned short int *arr16Words, const unsigned short int *position, const unsigned short int &numWords) const
@breif Method to set pairs of 16 bit words to a 32 bit word.
Definition: SCT_RodEncoder.cxx:332
SCT_RodEncoder::m_sctID
const SCT_ID * m_sctID
Identifier helper class for the SCT subdetector that creates compact Identifier objects and Identifie...
Definition: SCT_RodEncoder.h:176
SCT_RodEncoder::fillROD
virtual void fillROD(std::vector< uint32_t > &vec32Data, const uint32_t &robID, const std::vector< const SCT_RDORawData * > &vecRDOs) const override
Main Convert method.
Definition: SCT_RodEncoder.cxx:91
SCT_RodEncoder::HEADER_TRAILER_ERR
@ HEADER_TRAILER_ERR
Definition: SCT_RodEncoder.h:80
SCT_RodEncoder::m_cabling
ToolHandle< ISCT_CablingTool > m_cabling
Providing mappings of online and offline identifiers and also serial numbers.
Definition: SCT_RodEncoder.h:169
SCT_RodEncoder::encodeData
void encodeData(const std::vector< int > &vecTimeBins, std::vector< uint16_t > &vec16Words, const SCT_RDORawData *rdo, const int &groupSize, const int &strip) const
Method to encode RDO data to vector of 16 bin words.
Definition: SCT_RodEncoder.cxx:243
SCT_RodEncoder::packFragments
void packFragments(std::vector< uint16_t > &vec16Words, std::vector< uint32_t > &vec32Words) const
Method to pack vector of 16 bit words intto a vector of 32 bit words.
Definition: SCT_RodEncoder.cxx:304
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SCT_RodEncoder::getRODLink
int getRODLink(const SCT_RDORawData *rdo) const
Get the ROD link number info in the RDO header data.
Definition: SCT_RodEncoder.cxx:368
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT3_RawData
Definition: SCT3_RawData.h:24
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT3_RawData::getTimeBin
int getTimeBin() const
Definition: SCT3_RawData.h:92
SCT_RodEncoder::TRAILER_ERR
@ TRAILER_ERR
Definition: SCT_RodEncoder.h:78
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
SCT_RodEncoder::ErrorWords
ErrorWords
Definitions of enum error words to be retrived from SCT_ByteStreamErrorSvc in fillROD(....
Definition: SCT_RodEncoder.h:73
SCT_RodEncoder::PREAMBLE_ERR
@ PREAMBLE_ERR
Definition: SCT_RodEncoder.h:76
SCT_RDORawData.h
SCT_RodEncoder::onlineID
uint32_t onlineID(const SCT_RDORawData *rdo) const
Get the online Identifier from the RDO.
Definition: SCT_RodEncoder.cxx:361
TRTByteStreamErrors::BCIDError
@ BCIDError
Definition: ITRT_ByteStream_ConditionsSvc.h:19
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IdentifierHash.h
SCT_RodEncoder::m_swapModuleID
std::set< Identifier > m_swapModuleID
Swap Module identifier, set by SCTRawContByteStreamTool.
Definition: SCT_RodEncoder.h:185
vtune_athena.formatter
formatter
Definition: vtune_athena.py:19
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
SiDetectorElement.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SCT_RodEncoder::m_condensed
BooleanProperty m_condensed
Boolean used to determine if fillROD(...) should use Condensed or Expanded mode when decoding.
Definition: SCT_RodEncoder.h:179
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_RodEncoder::getTimeBin
int getTimeBin(const SCT_RDORawData *rdo) const
Get the time bin info from the RDO.
Definition: SCT_RodEncoder.cxx:383
SCT_OnlineId::fibre
std::uint32_t fibre() const
Return the fibre.
Definition: SCT_OnlineId.cxx:65
SCT_RodEncoder::initialize
virtual StatusCode initialize() override
Initialize.
Definition: SCT_RodEncoder.cxx:53
ISCT_CablingTool.h
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
SCT_RodEncoder::BCID_ERR
@ BCID_ERR
Definition: SCT_RodEncoder.h:75
SCT_RodEncoder::RAWDATA_ERR
@ RAWDATA_ERR
Definition: SCT_RodEncoder.h:83
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
SCT_DetectorManager.h
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
makeTOC.header
header
Definition: makeTOC.py:28
SCT_RodEncoder::NULL_HEADER_ERR
@ NULL_HEADER_ERR
Definition: SCT_RodEncoder.h:79
SCT_RodEncoder::getTrailer
uint16_t getTrailer(const int &errorWord) const
Get the 16-bit word for a trailer, with or without ByteStream errors.
Definition: SCT_RodEncoder.cxx:407
Identifier
Definition: IdentifierFieldParser.cxx:14