More logical file loop. Results unchanged.
This commit is contained in:
+18
-12
@@ -181,17 +181,28 @@ int main(int argc, char* argv[]) {
|
||||
cout << pedestalObject->pedestalOfChannel(0) << endl;
|
||||
cout << pedestalObject->rmsOfChannel(0) << endl;
|
||||
pedestalObject->pedestalClear();
|
||||
thisfile->close();
|
||||
|
||||
int j = 0;
|
||||
int f = 1;
|
||||
int f_max = 0;
|
||||
int nfiles = 0;
|
||||
if (module_str == "032" || module_str == "021" || module_str == "022") {
|
||||
f_max = 3;
|
||||
nfiles = 2;
|
||||
} else if (module_str == "006" || module_str == "008" || module_str == "044") {
|
||||
f_max = 4;
|
||||
nfiles = 3;
|
||||
}
|
||||
|
||||
while (f < f_max) {
|
||||
|
||||
for (int filei = 0; filei < nfiles; filei++) {
|
||||
|
||||
sprintf(savename,"%s/%s_%%6.6d.dat", data_loc.c_str(), data_file.c_str());
|
||||
thisfile->open((char*)savename, filei);
|
||||
|
||||
if (filei == 0) {
|
||||
for (int k = 0; k < (640*3); k++) {
|
||||
thisfile->readNextFrame();
|
||||
frame_counter++;
|
||||
}
|
||||
}
|
||||
|
||||
while (thisfile->readNextFrame()) {
|
||||
frame_counter++;
|
||||
j++;
|
||||
@@ -353,16 +364,11 @@ int main(int argc, char* argv[]) {
|
||||
adc_avg_g2->Reset();
|
||||
adcmap_avg_g2->Reset();
|
||||
}
|
||||
|
||||
} // end of while
|
||||
|
||||
thisfile->close();
|
||||
sprintf(savename,"%s/%s_%%6.6d.dat", data_loc.c_str(), data_file.c_str());
|
||||
thisfile->open((char*)savename, f);
|
||||
f++;
|
||||
|
||||
} // end of file while
|
||||
thisfile->close();
|
||||
} // end of files
|
||||
|
||||
for (int i = 0; i < NCH; i++) {
|
||||
delete gain_histos[i];
|
||||
|
||||
Reference in New Issue
Block a user