Corrected mistake for compiling moench04 with digital bits

This commit is contained in:
bergamaschi 2022-10-25 09:55:11 +02:00
parent 2696b95014
commit 4f21ad5122
3 changed files with 25 additions and 22 deletions

View File

@ -35,7 +35,7 @@ target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess) list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess)
add_executable(moench04RawDataProcessDGS moenchRawDataProcess.cpp) add_executable(moench04RawDataProcessDGS moenchRawDataProcess.cpp)
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04_DGS MOENCH04) target_compile_definitions(moench04RawDataProcessDGS PRIVATE MOENCH04_DGS MOENCH04)
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcessDGS) list(APPEND MOENCH_EXECUTABLES moench04RawDataProcessDGS)
#interpolation stuff #interpolation stuff

View File

@ -74,7 +74,7 @@ int main(int argc, char *argv[]) {
#ifdef MOENCH04 #ifdef MOENCH04
#ifndef MOENCH04_DGS #ifndef MOENCH04_DGS
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(); moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,0);
cout << "MOENCH04!" << endl; cout << "MOENCH04!" << endl;
#endif #endif
@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
mt->popFree(buff); mt->popFree(buff);
ifr++; ifr++;
if (ifr % 100 == 0) if (ifr % 100 == 0)
cout << ifr << " " << ff << endl; cout << ifr << " " << ff << endl;
if (nframes > 0) { if (nframes > 0) {
if (ifr % nframes == 0) { if (ifr % nframes == 0) {
@ -361,8 +361,10 @@ int main(int argc, char *argv[]) {
ifile++; ifile++;
} }
} }
} else } else {
cout << ifr << " " << ff << " " << np << endl; cout << "bp " << ifr << " " << ff << " " << np << endl;
//break;
}
ff = -1; ff = -1;
} }
cout << "--" << endl; cout << "--" << endl;

View File

@ -429,29 +429,30 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1; for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1;
ic++) { ic++) {
if ((iy + ir) >= 0 && (iy + ir) < ny && if ( (iy + ir) >= 0 && (iy + ir) < ny &&
(ix + ic) >= 0 && (ix + ic) < nx) { (ix + ic) >= 0 && (ix + ic) < nx) {
if ((iy + ir) >= iy && (ix + ic) >= ix ) { if ((iy + ir) > iy && (ix + ic) > ix ) {
val[(iy + ir) * nx + ix + ic] =
val[(iy + ir) * nx + ix + ic] =
subtractPedestal(data, ix + ic, iy + ir, cm); subtractPedestal(data, ix + ic, iy + ir, cm);
} }
v = &(val[(iy + ir) * nx + ix + ic]); v = &(val[(iy + ir) * nx + ix + ic]);
tot += *v; tot += *v;
if (ir <= 0 && ic <= 0) if (ir <= 0 && ic <= 0)
bl += *v; bl += *v;
if (ir <= 0 && ic >= 0) if (ir <= 0 && ic >= 0)
br += *v; br += *v;
if (ir >= 0 && ic <= 0) if (ir >= 0 && ic <= 0)
tl += *v; tl += *v;
if (ir >= 0 && ic >= 0) if (ir >= 0 && ic >= 0)
tr += *v; tr += *v;
if (*v > max) //{ if (*v > max) //{
max = *v; max = *v;
//} //}
} }
} }
} }