From 2a719390cb152d50144e11ee090a330a481f91fe Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Fri, 26 Jun 2015 16:32:10 +0200 Subject: [PATCH] adding script for gifs --- slsDetectorCalibration/PlotGifs.C | 194 ++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 slsDetectorCalibration/PlotGifs.C diff --git a/slsDetectorCalibration/PlotGifs.C b/slsDetectorCalibration/PlotGifs.C new file mode 100644 index 000000000..97c5ea713 --- /dev/null +++ b/slsDetectorCalibration/PlotGifs.C @@ -0,0 +1,194 @@ +#include "moench03ReadData.C" + + + +/************************************************************************/ +TH2F *readExactImage(char *fname, int iframe=0, int frperfile,TH2F *hped=NULL) { + ifstream filebin; + filebin.open((const char *)(fname), ios::in | ios::binary); + TH2F *h2=new TH2F("h2","",400,0,400,400,0,400); + int framen(0); + moench03CtbData *decoder=new moench03CtbData(); + char *buff=decoder->readNextFrame(filebin); + framen=decoder->getFrameNumber(buff); + + int counter(0); + + while(framen