diff --git a/RELEASE.txt b/RELEASE.txt index cb8aeeb5fe..4ecfa4000e 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,4 @@ -SLS Detector Package Major Release 7.0.3 released on 13.11.2023 +SLS Detector Package Major Release 7.0.3 released on 14.11.2023 =============================================================== This document describes the differences between v7.0.3 and v7.0.2 @@ -113,7 +113,12 @@ This document describes the differences between v7.0.3 and v7.0.2 Previously, it crashed when nframes > 0. Fixed. - * [Moench] Moench interpolation issues fixed. + * [Moench] Interpolation issues fixed. + + + * [Moench] When receiver in discard_partial mode and gets an empty frame, + it sends a zmq packet with header and no data. This is handled in post + processing as a temporary solution. diff --git a/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h b/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h index 427115b439..1a2a4af749 100644 --- a/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h +++ b/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h @@ -42,7 +42,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData { int sc_width; int sc_height; const int nSamples; - + int headerSize; double ghost[200][25]; // Single point of definition if we need to customize @@ -62,7 +62,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData { moench03T1ReceiverDataNew(int ns = 5000) : slsDetectorData(400, 400, ns * 2 * 32 + sizeof(header)), nSamples(ns) { - + headerSize=112; int nadc = 32; int sc_width = 25; int sc_height = 200; @@ -250,13 +250,22 @@ class moench03T1ReceiverDataNew : public slsDetectorData { virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np, char *data) { np = 0; - if (filebin.is_open()) { - if (filebin.read(data, dataSize)) { - ff = getFrameNumber(data); - np = getPacketNumber(data); - return data; - } - } + if (filebin.is_open()) { + + if (filebin.read(data, headerSize)) { + ff = getFrameNumber(data); + np = getPacketNumber(data); + if (np>0) + filebin.read(data+headerSize, dataSize-headerSize); + return data; + } + /* if (filebin.read(data, dataSize)) { */ + /* ff = getFrameNumber(data); */ + /* np = getPacketNumber(data); */ + /* return data; */ + /* } */ + } + return nullptr; }