added binary for moench04 and gain bits

This commit is contained in:
bergamaschi 2022-10-24 12:36:24 +02:00
parent 9232776577
commit 22b16de6b5
4 changed files with 21 additions and 11 deletions

View File

@ -208,7 +208,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
*/ */
int getFrameNumber(char *buff) { 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<uint16_t> {
*/ */
int getPacketNumber(char *buff) { 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 { char *readNextFrame(std::ifstream &filebin) override {

View File

@ -91,12 +91,8 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
} else { } else {
row = 200 + i / sc_width; row = 200 + i / sc_width;
} }
// if (nds > 0)
dataMap[row][col] = dataMap[row][col] =
((nadc ) * i + iadc) * 2 + off; //+16*(ip+1); ((nadc ) * i + iadc) * 2 + off;
//else
// dataMap[row][col] =
// (nadc * i + iadc) * 2 + off; //+16*(ip+1);
if (dataMap[row][col] < 0 || if (dataMap[row][col] < 0 ||
dataMap[row][col] >= aSamples * 2 * 32 + off) dataMap[row][col] >= aSamples * 2 * 32 + off)
cout << "Error: pointer " << dataMap[row][col] cout << "Error: pointer " << dataMap[row][col]

View File

@ -34,6 +34,10 @@ add_executable(moench04RawDataProcess moenchRawDataProcess.cpp)
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04) target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess) 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 #interpolation stuff
add_executable(moench03MakeEta moench03Interpolation.cpp) add_executable(moench03MakeEta moench03Interpolation.cpp)

View File

@ -62,20 +62,30 @@ int main(int argc, char *argv[]) {
int nped = 10000; int nped = 10000;
int cf = 0; int cf = 0;
int numberOfPackets=40;
#ifdef RECT #ifdef RECT
cout << "Should be rectangular but now it will crash! No data structure defined!" << endl; cout << "Should be rectangular but now it will crash! No data structure defined!" << endl;
#endif #endif
#ifndef MOENCH04 #ifndef MOENCH04
moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew(); moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew();
cout << "MOENCH03!" << endl; cout << "MOENCH03!" << endl;
#endif #endif
#ifdef MOENCH04 #ifdef MOENCH04
#ifndef MOENCH04_DGS
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(); moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData();
cout << "MOENCH04!" << endl; cout << "MOENCH04!" << endl;
#endif #endif
#ifdef MOENCH04_DGS
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,5000);
cout << "MOENCH04 DGS!" << endl;
numberOfPackets=45;
#endif
#endif
int nx = 400, ny = 400; int nx = 400, ny = 400;
@ -249,7 +259,7 @@ int main(int argc, char *argv[]) {
if (filebin.is_open()) { if (filebin.is_open()) {
ff = -1; ff = -1;
while (decoder->readNextFrame(filebin, ff, np, buff)) { while (decoder->readNextFrame(filebin, ff, np, buff)) {
if (np == 40) { if (np == numberOfPackets) {
mt->pushData(buff); mt->pushData(buff);
mt->nextThread(); mt->nextThread();
mt->popFree(buff); mt->popFree(buff);
@ -331,7 +341,7 @@ int main(int argc, char *argv[]) {
ff = -1; ff = -1;
ifr = 0; ifr = 0;
while (decoder->readNextFrame(filebin, ff, np, buff)) { while (decoder->readNextFrame(filebin, ff, np, buff)) {
if (np == 40) { if (np == numberOfPackets) {
// //push // //push
mt->pushData(buff); mt->pushData(buff);
// // //pop // // //pop