diff --git a/JFMC_BadPixels.cpp b/JFMC_BadPixels.cpp index 4d079ea..84a31ca 100644 --- a/JFMC_BadPixels.cpp +++ b/JFMC_BadPixels.cpp @@ -4,6 +4,7 @@ #include "../sls_detector_calibration/jungfrauCommonFunctions.h" #include +#include #include "TCanvas.h" #include "TFile.h" @@ -30,14 +31,12 @@ int main(int argc, char* argv[]) { for (int j = 0; j < 300; j++) { - // first check if a gain map exists - fstream infile; - sprintf(savename,"data/M%3.3d/gainMaps_M%3.3d.bin", j, j); - infile.open((char*)savename, ios::in | ios::binary); - if (not infile.is_open()) { + // check if directory exists + sprintf(savename,"data/M%3.3d", j); + DIR* dir = opendir(savename); + if (not dir) { continue; } - infile.close(); int this_hg0_missing = 0; int this_hg0_crazy = 0;