From f9f485c99e4e943892fcd885049210f3a5eec21d Mon Sep 17 00:00:00 2001 From: Heymes Julian Brice Dominique Date: Thu, 20 Oct 2022 11:07:44 +0200 Subject: [PATCH] moench04CtbZmq10GbData.h aoff guess (l. 115 or 116) --- .../dataStructures/moench04CtbZmq10GbData.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h b/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h index 38a618df3..4a2ad2286 100644 --- a/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h +++ b/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h @@ -5,6 +5,8 @@ #include "slsDetectorData.h" #include "sls/sls_detector_defs.h" +#define CTB + using namespace std; class moench04CtbZmq10GbData : public slsDetectorData { @@ -17,6 +19,9 @@ class moench04CtbZmq10GbData : public slsDetectorData { const int dSamples; int off; + // Single point of definition if we need to customize + using header = sls::defs::sls_receiver_header; + public: /** Implements the slsReceiverData structure for the moench02 prototype read @@ -28,7 +33,7 @@ class moench04CtbZmq10GbData : public slsDetectorData { // slsDetectorData(400, 400, nas*2*32+nds*8), aSamples(nas), // dSamples(nds), nadc(32), sc_width(25), sc_height(200) { - moench04CtbZmq10GbData(int nas = 5000, int nds = 0) + moench04CtbZmq10GbData(int nas = 5000, int nds = 0, int oo = 2 * 2) : slsDetectorData(400, 400, #ifdef RAWDATA sizeof(slsDetectorDefs::sls_receiver_header) + @@ -36,7 +41,7 @@ class moench04CtbZmq10GbData : public slsDetectorData { ((nas > 0) && (nds > 0) ? max(nas, nds) * (32 * 2 + 8) : nas * 32 * 2 + nds * 8)), - nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds) { + nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds), off(oo) { #ifdef RAWDATA off=sizeof(slsDetectorDefs::sls_receiver_header); #endif @@ -107,7 +112,8 @@ class moench04CtbZmq10GbData : public slsDetectorData { int getGain(char *data, int x, int y) { - int aoff=aSamples*2*32; + // int aoff=aSamples*2*32; + int aoff=off+aSamples*2*32; int irow; int isc = x / sc_width; int icol = x % sc_width;