File indexing completed on 2025-08-05 08:20:06
0001
0002
0003
0004
0005
0006
0007 #include "PixelData.h"
0008
0009 #include <sstream>
0010
0011 using namespace mvtx;
0012
0013
0014 void ChipPixelData::print() const
0015 {
0016
0017 printf("Chip %d | %4lu hits\n", mChipID, mPixels.size());
0018 for (std::size_t i = 0; i < mPixels.size(); i++)
0019 {
0020 printf("#%4ld C:%4d R: %3d\n", i, mPixels[i].getCol(), mPixels[i].getRow());
0021 }
0022 }
0023
0024
0025 std::string ChipPixelData::getErrorDetails(int pos) const
0026 {
0027
0028 if (pos == int(ChipStat::RepeatingPixel))
0029 {
0030 std::stringstream ss;
0031 ss << ": " << (mErrorInfo & 0xffff) << "/" << ((mErrorInfo >> 16) & 0xffff);
0032 return ss.str();
0033 }
0034 if (pos == int(ChipStat::UnknownWord))
0035 {
0036 std::string rbuf = ": 0x<";
0037 int nc = getNBytesInRawBuff();
0038 for (int i = 0; i < nc; i++)
0039 {
0040 std::stringstream ss;
0041 ss << (i ? " " : "") << std::hex << (int) getRawErrBuff()[i];
0042 }
0043 rbuf += '>';
0044 return rbuf;
0045 }
0046 return {};
0047 }