diff --git a/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h b/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h index 8da855c4e..427115b43 100644 --- a/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h +++ b/slsDetectorCalibration/dataStructures/moench03T1ReceiverDataNew.h @@ -208,7 +208,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData { */ int getFrameNumber(char *buff) { - return ((sls_receiver_header *)buff)->detHeader.frameNumber; + return ((sls::defs::sls_receiver_header *)buff)->detHeader.frameNumber; } /** @@ -221,7 +221,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData { */ int getPacketNumber(char *buff) { - return ((sls_receiver_header *)buff)->detHeader.packetNumber; + return ((sls::defs::sls_receiver_header *)buff)->detHeader.packetNumber; } char *readNextFrame(std::ifstream &filebin) override { diff --git a/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h b/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h index 093aa223d..699c6e80a 100644 --- a/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h +++ b/slsDetectorCalibration/dataStructures/moench04CtbZmq10GbData.h @@ -91,12 +91,8 @@ class moench04CtbZmq10GbData : public slsDetectorData { } else { row = 200 + i / sc_width; } - // if (nds > 0) - dataMap[row][col] = - ((nadc ) * i + iadc) * 2 + off; //+16*(ip+1); - //else - // dataMap[row][col] = - // (nadc * i + iadc) * 2 + off; //+16*(ip+1); + dataMap[row][col] = + ((nadc ) * i + iadc) * 2 + off; if (dataMap[row][col] < 0 || dataMap[row][col] >= aSamples * 2 * 32 + off) cout << "Error: pointer " << dataMap[row][col] diff --git a/slsDetectorCalibration/moenchExecutables/CMakeLists.txt b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt index f6327bad1..c293acea4 100644 --- a/slsDetectorCalibration/moenchExecutables/CMakeLists.txt +++ b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt @@ -34,6 +34,10 @@ add_executable(moench04RawDataProcess moenchRawDataProcess.cpp) target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04) list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess) +add_executable(moench04RawDataProcessDGS moenchRawDataProcess.cpp) +target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04_DGS MOENCH04) +list(APPEND MOENCH_EXECUTABLES moench04RawDataProcessDGS) + #interpolation stuff add_executable(moench03MakeEta moench03Interpolation.cpp) diff --git a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp index 5c29fd622..0845bfbbc 100644 --- a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp +++ b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp @@ -62,20 +62,30 @@ int main(int argc, char *argv[]) { int nped = 10000; int cf = 0; - + int numberOfPackets=40; #ifdef RECT cout << "Should be rectangular but now it will crash! No data structure defined!" << endl; #endif + #ifndef MOENCH04 moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew(); cout << "MOENCH03!" << endl; #endif #ifdef MOENCH04 +#ifndef MOENCH04_DGS moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(); cout << "MOENCH04!" << endl; #endif +#ifdef MOENCH04_DGS + moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,5000); + cout << "MOENCH04 DGS!" << endl; + numberOfPackets=45; +#endif + +#endif + int nx = 400, ny = 400; @@ -249,7 +259,7 @@ int main(int argc, char *argv[]) { if (filebin.is_open()) { ff = -1; while (decoder->readNextFrame(filebin, ff, np, buff)) { - if (np == 40) { + if (np == numberOfPackets) { mt->pushData(buff); mt->nextThread(); mt->popFree(buff); @@ -331,7 +341,7 @@ int main(int argc, char *argv[]) { ff = -1; ifr = 0; while (decoder->readNextFrame(filebin, ff, np, buff)) { - if (np == 40) { + if (np == numberOfPackets) { // //push mt->pushData(buff); // // //pop