+ if (sector < 36) { //inner sector [0;35]
+ if (row != 30) {
+ //the whole row is written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 0, 0, 0,
+ sector, subSector, row);
+ } else {
+ //only the pads in the range [37;48] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 37, 48, 1,
+ sector, subSector, row);
+ subSector = 1;
+ //only the pads outside the range [37;48] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 37, 48, 2,
+ sector, subSector, row);
+ }//end else
+
+ } else { //outer sector [36;71]
+ if (row == 54) subSector = 2;
+ if ((row != 27) && (row != 76)) {
+ buffer->WriteRowBinary(kThreshold, digrow, 0, 0, 0,
+ sector, subSector, row);
+ } else if (row == 27) {
+ //only the pads outside the range [43;46] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 43, 46, 2,
+ sector, subSector, row);
+ subSector = 1;
+ //only the pads in the range [43;46] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 43, 46, 1,
+ sector, subSector, row);
+ } else if (row == 76) {
+ //only the pads outside the range [33;88] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 33, 88, 2,
+ sector, subSector, row);
+ subSector = 3;
+ //only the pads in the range [33;88] are written into the output file
+ buffer->WriteRowBinary(kThreshold, digrow, 33, 88, 1,
+ sector, subSector, row);
+ }
+ }//end else
+ }//end for