Local loop indicies in analogDetector (#709)

* making ix and iy local variables in analogDetector
This commit is contained in:
Erik Fröjdh
2023-05-03 09:18:09 +02:00
committed by GitHub
parent 80fc7eb220
commit 61f290441e
2 changed files with 49 additions and 54 deletions

View File

@ -233,8 +233,8 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
//cout << "add to common mode?" << endl;
addToCommonMode(data);
}
for (iy = ymin; iy < ymax; ++iy) {
for (ix = xmin; ix < xmax; ++ix) {
for (int iy = ymin; iy < ymax; ++iy) {
for (int ix = xmin; ix < xmax; ++ix) {
if (det->isGood(ix, iy)) {
val = subtractPedestal(data, ix, iy, cm);
@ -252,8 +252,8 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
}
}
for (iy = ymin; iy < ymax; ++iy) {
for (ix = xmin; ix < xmax; ++ix) {
for (int iy = ymin; iy < ymax; ++iy) {
for (int ix = xmin; ix < xmax; ++ix) {
if (det->isGood(ix, iy)) {
eventMask[iy][ix] = PEDESTAL;
@ -404,8 +404,8 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
double *val = new double[ny * nx];
for (iy = ymin; iy < ymax; ++iy) {
for (ix = xmin; ix < xmax; ++ix) {
for (int iy = ymin; iy < ymax; ++iy) {
for (int ix = xmin; ix < xmax; ++ix) {
if (det->isGood(ix, iy) == 0)
continue;