From 05755617f4bd29a0bcc028d243644e502245ba5b Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Thu, 29 Jan 2015 11:20:24 +0100 Subject: [PATCH] possibility of reading images, pedestal etc. for moench03 implemented --- slsDetectorCalibration/moench03ReadData.C | 55 ++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) 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.