Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PixelData.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PixelData.cxx
1 // @file PixelData.cxx
2 // @brief Implementation for transient data of single pixel and set of pixels from current chip
3 // @sa <O2/Detectors/ITSMFT/common/reconstruction/src/PixelData.cxx>
4 // <d44292025>
5 
7 #include <sstream>
8 
9 using namespace mvtx;
10 
11 //________________________________________________________________________________
13 {
14  // print chip data
15  printf("Chip %d | %4lu hits\n", mChipID, mPixels.size());
16  for (std::size_t i = 0; i < mPixels.size(); i++)
17  {
18  printf("#%4ld C:%4d R: %3d\n", i, mPixels[i].getCol(), mPixels[i].getRow());
19  }
20 }
21 
22 //________________________________________________________________________________
24 {
25  // if possible, extract more detailed info about the error
26  if ( pos == int(ChipStat::RepeatingPixel) )
27  {
28  std::stringstream ss;
29  ss << ": " << (mErrorInfo & 0xffff) << "/" << ((mErrorInfo >> 16) & 0xffff);
30  return ss.str();
31  }
32  if (pos == int(ChipStat::UnknownWord))
33  {
34  std::string rbuf = ": 0x<";
35  int nc = getNBytesInRawBuff();
36  for (int i = 0; i < nc; i++)
37  {
38  std::stringstream ss;
39  ss << (i ? " " : "") << std::hex << (int)getRawErrBuff()[i];
40  }
41  rbuf += '>';
42  return rbuf;
43  }
44  return {};
45 }