diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3e309fbcb..917ca8cca 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,7 +23,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_USE_TESTS=ON -DSLS_USE_HDF5=ON -DSLS_USE_GUI=ON + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSLS_USE_TESTS=ON -DSLS_USE_HDF5=ON -DSLS_USE_GUI=ON -DSLS_USE_MOENCH=ON - name: Build # Build your program with the given configuration diff --git a/slsDetectorCalibration/analogDetector.h b/slsDetectorCalibration/analogDetector.h index 6f6af9d09..129f25879 100644 --- a/slsDetectorCalibration/analogDetector.h +++ b/slsDetectorCalibration/analogDetector.h @@ -220,7 +220,7 @@ template class analogDetector { clone. Must be virtual! \returns a clone of the original analog detector */ - virtual analogDetector *Clone() { return new analogDetector(this); } + virtual analogDetector *Clone() = 0; /** Gives an id to the structure. For debugging purposes in case of @@ -1097,8 +1097,7 @@ template class analogDetector { return thr; }; - virtual int setClusterSize(int n = -1) { - }; + virtual int setClusterSize(int n = -1) = 0; /** gets threshold value for conversion into number of photons diff --git a/slsDetectorCalibration/interpolations/eta2InterpolationBase.h b/slsDetectorCalibration/interpolations/eta2InterpolationBase.h index 92f4cb3f2..58e1962c4 100644 --- a/slsDetectorCalibration/interpolations/eta2InterpolationBase.h +++ b/slsDetectorCalibration/interpolations/eta2InterpolationBase.h @@ -23,7 +23,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase { /* if (etamin>=etamax) { */ /* etamin=-1; */ /* etamax=2; */ - /* // cout << ":" <= nbetaX) { - cout << "x?" << ex << endl; + std::cout << "x?" << ex << std::endl; ex = nbetaX - 1; } if (ey < 0) { - cout << "y*" << ey << " " << nbetaY << endl; + std::cout << "y*" << ey << " " << nbetaY << std::endl; ey = 0; } if (ey >= nbetaY) { - cout << "y?" << ey << " " << nbetaY << endl; + std::cout << "y?" << ey << " " << nbetaY << std::endl; ey = nbetaY - 1; } @@ -236,7 +236,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase { // calcMyEta(totquad,quad,cl,etax, etay); calcEta(totquad, cc, etax, etay); - // cout <<"******"<< etax << " " << etay << endl; + // std::cout <<"******"<< etax << " " << etay << std::endl; return addToFlatFieldDistribution(etax, etay); } @@ -270,16 +270,16 @@ class eta2InterpolationBase : public virtual etaInterpolationBase { /* cc[0][1] = cl[yoff * 3 + xoff + 1]; */ /* cc[1][1] = cl[(yoff + 1) * 3 + xoff + 1]; */ - /* /\* cout << cl[0] << " " << cl[1] << " " << cl[2] << endl; *\/ */ - /* /\* cout << cl[3] << " " << cl[4] << " " << cl[5] << endl; *\/ */ - /* /\* cout << cl[6] << " " << cl[7] << " " << cl[8] << endl; *\/ */ - /* /\* cout <<"******"< 0) hintcorr[ibx + iby * nSubPixelsX * nPixelsX] = hint[ibx + iby * nSubPixelsX * nPixelsX] * diff --git a/slsDetectorCalibration/interpolations/etaInterpolationBase.h b/slsDetectorCalibration/interpolations/etaInterpolationBase.h index 89b2d34de..ec30b4f24 100644 --- a/slsDetectorCalibration/interpolations/etaInterpolationBase.h +++ b/slsDetectorCalibration/interpolations/etaInterpolationBase.h @@ -21,14 +21,14 @@ class etaInterpolationBase : public slsInterpolation { double emax = 0) : slsInterpolation(nx, ny, ns, nsy), hhx(NULL), hhy(NULL), heta(NULL), nbetaX(nb), nbetaY(nby), etamin(emin), etamax(emax) { - // cout << "eb " << nb << " " << emin << " " << emax << endl; - // cout << nb << " " << etamin << " " << etamax << endl; + // std::cout << "eb " << nb << " " << emin << " " << emax << std::endl; + // std::cout << nb << " " << etamin << " " << etamax << std::endl; if (nbetaX <= 0) { - // cout << "aaa:" <= etamax) { @@ -145,9 +145,9 @@ class etaInterpolationBase : public slsInterpolation { uint32_t nny; float *gm = ReadFromTiff(imgname, nnx, nny); /* if (nnx!=nny) { */ - /* cout << "different number of bins in x " << nnx << " and y " << - * nny<< " !"<< endl; */ - /* cout << "Aborting read"<< endl; */ + /* std::cout << "different number of bins in x " << nnx << " and y " << + * nny<< " !"<< std::endl; */ + /* std::cout << "Aborting read"<< std::endl; */ /* return 0; */ /* } */ nbetaX = nnx; @@ -254,12 +254,12 @@ class etaInterpolationBase : public slsInterpolation { if (ibx >= 0 && ibx < nSubPixelsX && iby >= 0 && iby < nSubPixelsY) { // - // if (ibx>0 && iby>0) cout << ibx << " " << iby << " " << ii << - // endl; + // if (ibx>0 && iby>0) std::cout << ibx << " " << iby << " " << ii << + // std::endl; ftest[ibx + iby * nSubPixelsX] += heta[ii]; } else - cout << "Bad interpolation " << ii << " " << ibx << " " << iby - << endl; + std::cout << "Bad interpolation " << ii << " " << ibx << " " << iby + << std::endl; } sprintf(tit, "/scratch/ftest_%d.tiff", ind); @@ -282,7 +282,7 @@ class etaInterpolationBase : public slsInterpolation { } sprintf(tit, "/scratch/eta_bad_%d.tiff", ind); WriteToTiff(etah, tit, nbetaX, nbetaY); - // cout << "Index: " << ind << "\t Bad bins: "<< nbad << endl; + // std::cout << "Index: " << ind << "\t Bad bins: "<< nbad << std::endl; // int ibx=0, iby=0; delete[] ftest; @@ -330,9 +330,9 @@ class etaInterpolationBase : public slsInterpolation { } } - // cout << endl << endl; + // std::cout << std::endl << std::endl; for (ipy = 0; ipy < nSubPixelsY; ipy++) { - cout.width(5); + std::cout.width(5); // flat_y[ipy]=p_tot_y[ipy];//avg/nSubPixels; for (ipx = 0; ipx < nSubPixelsX; ipx++) { @@ -353,19 +353,19 @@ class etaInterpolationBase : public slsInterpolation { //" "; } - /* cout << "** " << setprecision(4) << flat_y[ipy]; */ - // cout << "\n"; + /* std::cout << "** " << setprecision(4) << flat_y[ipy]; */ + // std::cout << "\n"; } - /* cout << "**" << endl; cout.width(5); */ + /* std::cout << "**" << std::endl; std::cout.width(5); */ /* for (ipx=0; ipx= 0 && etay <= 1) @@ -90,7 +90,7 @@ class etaInterpolationPosXY : public virtual etaInterpolationBase { for (int ibx = 0; ibx < nbetaX; ibx++) { etax = etamin + ibx * etastepX; - // cout << etax << endl; + // std::cout << etax << std::endl; if (etax >= 0 && etax <= 1) hx[ibx] = heta[ibx + ib * nbetaX]; else { @@ -178,7 +178,7 @@ class eta2InterpolationPosXY : public virtual eta2InterpolationBase, : etaInterpolationBase(nx, ny, ns, nsy, nb, nby, emin, emax), eta2InterpolationBase(nx, ny, ns, nsy, nb, nby, emin, emax), etaInterpolationPosXY(nx, ny, ns, nsy, nb, nby, emin, emax){ - // cout << "e2pxy " << nb << " " << emin << " " << emax << endl; + // std::cout << "e2pxy " << nb << " " << emin << " " << emax << std::endl; }; eta2InterpolationPosXY(eta2InterpolationPosXY *orig) @@ -198,8 +198,8 @@ class eta3InterpolationPosXY : public virtual eta3InterpolationBase, : etaInterpolationBase(nx, ny, ns, nsy, nb, nby, emin, emax), eta3InterpolationBase(nx, ny, ns, nsy, nb, nby, emin, emax), etaInterpolationPosXY(nx, ny, ns, nsy, nb, nby, emin, emax){ - // cout << "e3pxy " << nbeta << " " << etamin << " " << etamax - // << " " << nSubPixels<< endl; + // std::cout << "e3pxy " << nbeta << " " << etamin << " " << etamax + // << " " << nSubPixels<< std::endl; }; eta3InterpolationPosXY(eta3InterpolationPosXY *orig)