24 for (
unsigned int i = 0;
i <
bits.size();
i++)
25 bits_[
i] = static_cast<unsigned char>(cpt[
i]);
47 for (
int i = 0;
i < 52;
i++) {
58 unsigned char byte = 0;
60 for (
int j = 0;
j < 80;
j++) {
61 unsigned char tmp = toupper(
data[
j]) - 48;
67 if ((
j + 1) % 2 == 0) {
69 bits_[
i * 40 + (
j + 1) / 2 - 1] = byte;
84 for (
int i = 0;
i < 52;
i++) {
90 unsigned char byte = 0;
91 for (
int j = 0;
j < 80;
j++) {
92 unsigned char tmp = toupper(
data[
j]) - 48;
96 if ((
j + 1) % 2 == 0) {
98 bits_[
i * 40 + (
j + 1) / 2 - 1] = byte;
123 for (
unsigned int i = 0;
i < 2080;
i++) {
136 for (
unsigned int col = 0;
col < 52;
col++) {
141 for (
int row = 0; row < 80; row++) {
158 unsigned int mask = 0xf0;
168 s <<
"Dumping ROC masks" << std::endl;
170 for (
int i = 0;
i < 52;
i++) {
171 s <<
"Col" <<
i <<
": ";
172 for (
int j = 0;
j < 40;
j++) {
173 unsigned char bitmask = 15 * 16;
174 for (
int k = 0;
k < 2;
k++) {
175 unsigned int tmp =
mask.bits_[
i * 40 +
j] & bitmask;
190 std::string mthn =
"[PixelROCTrimBits::writeXML()]\t\t\t\t";
195 *
out <<
" <DATA>" << std::endl;
197 *
out <<
" <TRIM_BITS>" << encoded <<
"</TRIM_BITS>" << std::endl;
198 *
out <<
" </DATA>" << std::endl;
199 *
out <<
" " << std::endl;
int read(PixelROCName rocid, std::string in)
void writeBinary(std::ofstream &out) const
void setROCTrimBits(PixelROCName rocid, std::string bits)
#define base64_decode(in, inlen, out, outlen)
static void trim(std::string &s)
int readBinary(PixelROCName rocid, std::ifstream &in)
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
std::string base64_encode(unsigned char const *, unsigned int len)
void writeXML(std::ofstream *out) const
std::string rocname() const
void writeASCII(std::ofstream &out) const
void setTrim(unsigned int col, unsigned int row, unsigned int trim)
char data[epos_bytes_allocation]
unsigned char bits_[2080]
unsigned int trim(unsigned int col, unsigned int row) const