cout << "Run Number: " << sf.run_number << endl;
#endif
- if (sf.frame_length != 0x25) {
- printf("The framelength should match 37 = 0x25\n");
- return -1;
+ // validity checks for M-26:
+ bool valid = true;
+ if (sf.row >= 576) valid = false;
+ if (sf.sensor_id >= 2) valid = false;
+ if (sf.bank >= 4) valid = false;
+ if (sf.frame_length != 0x25) valid = false;
+ if (! valid) {
+ cout << "Something is wrong with this frame:" << endl;
+ cout << "Frame length: " << sf.frame_length << endl;
+ cout << "Sensor ID: " << sf.sensor_id << endl;
+ cout << "Threshold: " << sf.threshold << endl;
+ cout << "Bank: " << sf.bank << endl;
+ cout << "Row: " << sf.row << endl;
+ cout << "Run Number: " << sf.run_number << endl;
+ return ix + sf.frame_length;
}
if (prev_threshold == 0xFFFF) prev_threshold = 0xFFFE; // prevent first save_tree() call
}
}
}
- ix += j;
- return ix;
+ return ix + j;
}
}
else
{
- pixelprob[i] = 0;
+ pixelprob[i] = 0.0;
}
}
scurveTree->Fill();