22 std::string mthn =
"[PixelROCMaskBits::setROCMaskBits()]\t\t\t ";
26 for (
unsigned int i = 0;
i < bits.size();
i++) {
27 bits_[
i] =
static_cast<unsigned char>(cpt[
i]);
50 for (
int i = 0;
i < 52;
i++) {
61 unsigned char byte = 0;
63 for (
int j = 0;
j < 80;
j++) {
67 if ((
j + 1) % 8 == 0) {
69 bits_[
i * 10 + (
j + 1) / 8 - 1] = byte;
85 for (
int i = 0;
i < 52;
i++) {
91 unsigned char byte = 0;
92 for (
int j = 0;
j < 80;
j++) {
95 if ((
j + 1) % 8 == 0) {
97 bits_[
i * 10 + (
j + 1) / 8 - 1] = byte;
111 in.read((
char*)
bits_, 520);
121 for (
unsigned int i = 0;
i < 520;
i++) {
130 for (
unsigned int col = 0;
col < 52;
col++) {
135 for (
int row = 0; row < 80; row++) {
136 out <<
mask(col, row);
144 unsigned int tmp =
bits_[col * 10 + row / 8];
147 tmp = tmp >> (row % 8);
156 assert(mask == 0 || mask == 1);
158 unsigned int bit = 1 << (row % 8);
160 bits_[col * 10 + row / 8] =
bits_[col * 10 + row / 8] | bit;
162 bits_[col * 10 + row / 8] =
bits_[col * 10 + row / 8] & (0xff ^ bit);
167 s <<
"Dumping ROC masks" << std::endl;
169 for (
int i = 0;
i < 52;
i++) {
170 s <<
"Col" <<
i <<
":";
171 for (
int j = 0;
j < 10;
j++) {
172 unsigned char bitmask = 1;
173 for (
int k = 0;
k < 8;
k++) {
174 if (mask.
bits_[i * 10 +
j] & bitmask) {
190 std::string mthn =
"[PixelROCMaskBits::writeXML()]\t\t\t\t";
194 *out <<
" <DATA>" << std::endl;
195 *out <<
" <ROC_NAME>" <<
rocid_.
rocname() <<
"</ROC_NAME>" << std::endl;
196 *out <<
" <KILL_MASK>" << encoded <<
"</KILL_MASK>" << std::endl;
197 *out <<
" </DATA>" << std::endl;
198 *out <<
" " << std::endl;
void setROCMaskBits(PixelROCName &rocid, std::string bits)
int read(const PixelROCName &rocid, std::string in)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
std::string rocname() const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
std::string base64_encode(unsigned char const *, unsigned int len)
void writeASCII(std::ofstream &out) const
void setMask(unsigned int col, unsigned int row, unsigned int mask)
char data[epos_bytes_allocation]
unsigned int mask(unsigned int col, unsigned int row) const
void writeXML(std::ofstream *out) const
void writeBinary(std::ofstream &out) const
int readBinary(const PixelROCName &rocid, std::ifstream &in)