From 98c0bd163e85f00d3d780844febb8a1177531f22 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Fri, 7 Mar 2014 12:07:40 +0000 Subject: [PATCH] included without root writing git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@45 113b152e-814d-439b-b186-022a431db7b5 --- slsDetectorCalibration/gotthardModuleData.h | 35 ++++++++++--------- .../gotthardShortModuleData.h | 29 ++++++++------- slsDetectorCalibration/singlePhotonDetector.h | 10 ++++-- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/slsDetectorCalibration/gotthardModuleData.h b/slsDetectorCalibration/gotthardModuleData.h index bd1d8280a..3f674af57 100644 --- a/slsDetectorCalibration/gotthardModuleData.h +++ b/slsDetectorCalibration/gotthardModuleData.h @@ -4,10 +4,7 @@ -#define X_PIXELS 1280 -#define Y_PIXELS 1 -#define NPACKETS 2 -#define BUFFERSIZE 1286 + #define FRAMEMASK 0xFFFFFFFE #define PACKETMASK 1 @@ -28,7 +25,7 @@ public: */ - gotthardModuleData(double c=0): slsReceiverData(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c) { + gotthardModuleData(double c=0): slsReceiverData(xpixels, ypixels, npackets, buffersize), xtalk(c) { uint16_t **dMask; int **dMap; @@ -36,23 +33,23 @@ public: int initial_offset = 2; int offset = initial_offset; - dMask=new uint16_t*[Y_PIXELS]; - dMap=new int*[Y_PIXELS]; - for (int i = 0; i < Y_PIXELS; i++) { - dMap[i] = new int[X_PIXELS]; - dMask[i] = new uint16_t[X_PIXELS]; + dMask=new uint16_t*[ypixels]; + dMap=new int*[ypixels]; + for (int i = 0; i < ypixels; i++) { + dMap[i] = new int[xpixels]; + dMask[i] = new uint16_t[xpixels]; } - for(ix=0; ix(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c){ + gotthardShortModuleData(double c=0): slsReceiverData(xpixels, ypixels, npackets, buffersize), xtalk(c){ uint16_t **dMask; int **dMap; int ix, iy; int offset = 2; - dMask=new uint16_t*[Y_PIXELS]; - dMap=new int*[Y_PIXELS]; - for (int i = 0; i < Y_PIXELS; i++) { - dMap[i] = new int[X_PIXELS]; - dMask[i] = new uint16_t[X_PIXELS]; + dMask=new uint16_t*[ypixels]; + dMap=new int*[ypixels]; + for (int i = 0; i < ypixels; i++) { + dMap[i] = new int[xpixels]; + dMask[i] = new uint16_t[xpixels]; } - for(ix=0; ix @@ -92,6 +92,8 @@ class singlePhotonDetector { setClusterSize(csize); }; + + /** destructor. Deletes the cluster structure and the pdestalSubtraction array */ @@ -324,7 +326,7 @@ class singlePhotonDetector { \returns event mask enum for the given pixel */ eventType getEventMask(int ic, int ir=0){return eventMask[ir][ic];}; - + #ifdef MYROOT1 /** generates a tree and maps the branches @@ -349,6 +351,9 @@ class singlePhotonDetector { // tall->Branch("rms",&(cluster->rms),"rms/D"); return tall; }; +#else + /** write cluster to filer*/ + void writeCluster(FILE* myFile){cluster->write(myFile);}; #endif @@ -373,7 +378,6 @@ class singlePhotonDetector { double tot; /**< sum of the 3x3 cluster */ double quadTot; /**< sum of the maximum 2x2cluster */ - };