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