diff --git a/slsDetectorCalibration/moench03ReadData.C b/slsDetectorCalibration/moench03ReadData.C index 886d9621f..badfada0d 100644 --- a/slsDetectorCalibration/moench03ReadData.C +++ b/slsDetectorCalibration/moench03ReadData.C @@ -56,13 +56,66 @@ TH2F *readImage(ifstream &filebin, int dsize=5000*32) { } -TH2F *readImage(char *fname) { +TH2F *readImage(char *fname, int iframe=0, TH2F *hped=NULL) { ifstream filebin; filebin.open((const char *)(fname), ios::in | ios::binary); TH2F *h2=readImage(filebin); + for (int i=0; iSetBinContent(ix+1, iy+1,filter->getPedestal(ix,iy)); + } + } + + } + return h2; + +} + /** Loops over data file to find single photons, fills the tree (and writes it to file, althoug the root file should be opened before) and creates 1x1, 2x2, 3x3 cluster histograms with ADCu on the x axis, channel number (160*x+y) on the y axis.