25 std::string mthn =
"[PixelROCMaskBits::setROCMaskBits()]\t\t\t " ;
28 bits.copy( cpt , 520);
29 for(
unsigned int i = 0 ;
i < bits.size();
i++)
31 bits_[
i] =
static_cast<unsigned char>(cpt[
i]);
56 for (
int i=0;
i<52;
i++){
70 for(
int j=0;j<80;j++){
72 if (data[j]==
'1') byte+=128;
76 bits_[
i*10+(j+1)/8-1]=byte;
98 for (
int i=0;
i<52;
i++)
105 unsigned char byte=0;
106 for(
int j=0;j<80;j++)
108 if (data[j]==
'1') byte+=128;
112 bits_[
i*10+(j+1)/8-1]=byte;
130 in.read((
char*)
bits_,520);
142 for(
unsigned int i=0;
i<520;
i++){
155 if (
col<10) out <<
"0";
157 for (
int row=0;row<80;row++){
158 out <<
mask(col,row);
168 unsigned int tmp=
bits_[col*10+row/8];
182 assert(mask==0||mask==1);
184 unsigned int bit=1<<(row%8);
185 if (mask)
bits_[col*10+row/8]=
bits_[col*10+row/8]|bit;
186 if (!mask)
bits_[col*10+row/8]=
bits_[col*10+row/8]&(0xff^bit);
193 s <<
"Dumping ROC masks" <<std::endl;
195 for(
int i=0;
i<52;
i++){
197 for(
int j=0;j<10;j++){
198 unsigned char bitmask=1;
199 for(
int k=0;
k<8;
k++){
200 if(mask.
bits_[i*10+j]&bitmask) {
220 std::string mthn =
"[PixelROCMaskBits::writeXML()]\t\t\t\t" ;
224 *out <<
" <DATA>" << std::endl ;
225 *out <<
" <ROC_NAME>" <<
rocid_.
rocname() <<
"</ROC_NAME>" << std::endl ;
226 *out <<
" <KILL_MASK>" << encoded <<
"</KILL_MASK>" << std::endl ;
227 *out <<
" </DATA>" << std::endl ;
228 *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)
std::vector< std::vector< double > > tmp
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)