28 bits.copy( cpt , 2080);
29 for(
unsigned int i = 0 ;
i < bits.size();
i++)
30 bits_[
i] = (
unsigned char)cpt[
i];
31 }
catch(std::bad_cast){
33 std::cout <<
"Error casting variable." << std::endl;
43 for(
int i=0;
i<(int)
sizeof(
bits_);
i++)
60 for (
int i=0;
i<52;
i++){
74 for(
int j=0;
j<80;
j++){
76 unsigned char tmp=toupper(data[
j])-48;
83 bits_[
i*40+(j+1)/2-1]=byte;
104 for (
int i=0;
i<52;
i++)
111 unsigned char byte=0;
112 for(
int j=0;
j<80;
j++)
114 unsigned char tmp=toupper(data[
j])-48;
120 bits_[
i*40+(j+1)/2-1]=byte;
138 in.read((
char*)
bits_,2080);
153 for(
unsigned int i=0;
i<2080;
i++){
169 for(
unsigned int col=0;col<52;col++){
171 if (col<10) out <<
"0";
173 for (
int row=0;row<80;row++){
174 out << std::hex<<std::uppercase<<
trim(col,row)<<std::dec;
183 unsigned int tmp=
bits_[col*40+row/2];
184 if (row%2==0) tmp/=16;
193 unsigned int mask=0xf0;
198 unsigned int tmp=
bits_[col*40+row/2];
199 bits_[col*40+row/2]=(tmp&mask)|trim;
208 s <<
"Dumping ROC masks" <<std::endl;
210 for(
int i=0;
i<52;
i++){
212 for(
int j=0;
j<40;
j++){
213 unsigned char bitmask=15*16;
214 for(
int k=0;
k<2;
k++){
215 unsigned int tmp=mask.
bits_[i*40+
j]&bitmask;
217 s << std::hex << tmp << std::dec;
232 std::string mthn =
"[PixelROCTrimBits::writeXML()]\t\t\t\t" ;
237 *out <<
" <DATA>" << std::endl ;
238 *out <<
" <ROC_NAME>" <<
rocid_.
rocname() <<
"</ROC_NAME>" << std::endl ;
239 *out <<
" <TRIM_BITS>" << encoded <<
"</TRIM_BITS>" << std::endl ;
240 *out <<
" </DATA>" << std::endl ;
241 *out <<
" " << std::endl ;
int read(PixelROCName rocid, std::string in)
void setROCTrimBits(PixelROCName rocid, std::string bits)
#define base64_decode(in, inlen, out, outlen)
void writeBinary(std::ofstream &out) const
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
int readBinary(PixelROCName rocid, std::ifstream &in)
unsigned int trim(unsigned int col, unsigned int row) const
std::string rocname() const
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::vector< std::vector< double > > tmp
void setTrim(unsigned int col, unsigned int row, unsigned int trim)
char data[epos_bytes_allocation]
unsigned char bits_[2080]
void writeASCII(std::ofstream &out) const