mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
added binary for moench04 and gain bits
This commit is contained in:
parent
9232776577
commit
22b16de6b5
@ -208,7 +208,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
*/
|
||||
|
||||
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) {
|
||||
return ((sls_receiver_header *)buff)->detHeader.packetNumber;
|
||||
return ((sls::defs::sls_receiver_header *)buff)->detHeader.packetNumber;
|
||||
}
|
||||
|
||||
char *readNextFrame(std::ifstream &filebin) override {
|
||||
|
@ -91,12 +91,8 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
} 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]
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user