Now that gain filenames contain a date, better to check if the data directory exists.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <dirent.h>
|
||||
|
||||
#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;
|
||||
|
Reference in New Issue
Block a user