diff --git a/slsDetectorCalibration/dataStructures/imageZmq16bit.h b/slsDetectorCalibration/dataStructures/imageZmq16bit.h new file mode 100644 index 000000000..efba95bdf --- /dev/null +++ b/slsDetectorCalibration/dataStructures/imageZmq16bit.h @@ -0,0 +1,125 @@ +#ifndef IMAGEZMQ16BIT_H +#define IMAGEZMQ16BIT_H +#include "slsDetectorData.h" + + +class imageZmq16bit : public slsDetectorData { + + private: + + // int iframe; + public: + + + + + /** + Implements the slsReceiverData structure for the moench02 prototype read out by a module i.e. using the slsReceiver + (160x160 pixels, 40 packets 1286 large etc.) + \param c crosstalk parameter for the output buffer + + */ + // moench03T1ZmqDataNew(int ns=5000): slsDetectorData(400, 400, ns*32*2+sizeof(int)), nSamples(ns), offset(sizeof(int)), xtalk(0.00021) { + imageZmq16bit(int nnx=400, int nny=400): slsDetectorData(nnx, nny, 2*nnx*nny) { + cout << "* " << nx << " " << ny << endl; + int is=0; + for (int row=0; row=0) + // fnum=ff; + + if (filebin.is_open()) { + if (filebin.read(data, 2*nx*ny) ){ + // iframe++; + //ff=iframe; + return data; + } + } + return NULL; + + + + }; + + + + virtual char *findNextFrame(char *data, int &ndata, int dsize){ + if (dsize<2*nx*ny) ndata=dsize; + else ndata=2*nx*ny; + return data; + + } + + + + + + + // virtual int setFrameNumber(int ff){iframe=ff}; + + + + + + + + + + +int getPacketNumber(int x, int y) {return 0;}; + +}; + + + + +#endif diff --git a/slsDetectorCalibration/dataStructures/imageZmq32bit.h b/slsDetectorCalibration/dataStructures/imageZmq32bit.h new file mode 100644 index 000000000..7217c09d6 --- /dev/null +++ b/slsDetectorCalibration/dataStructures/imageZmq32bit.h @@ -0,0 +1,125 @@ +#ifndef IMAGEZMQ32BIT_H +#define IMAGEZMQ32BIT_H +#include "slsDetectorData.h" + + +class imageZmq32bit : public slsDetectorData { + + private: + + // int iframe; + public: + + + + + /** + Implements the slsReceiverData structure for the moench02 prototype read out by a module i.e. using the slsReceiver + (160x160 pixels, 40 packets 1286 large etc.) + \param c crosstalk parameter for the output buffer + + */ + // moench03T1ZmqDataNew(int ns=5000): slsDetectorData(400, 400, ns*32*2+sizeof(int)), nSamples(ns), offset(sizeof(int)), xtalk(0.00021) { + imageZmq32bit(int nnx=400, int nny=400): slsDetectorData(nnx, nny, sizeof(uint32_t)*nnx*nny) { + cout << "* " << nx << " " << ny << endl; + int is=0; + for (int row=0; row=0) + // fnum=ff; + + if (filebin.is_open()) { + if (filebin.read(data, 2*nx*ny) ){ + // iframe++; + //ff=iframe; + return data; + } + } + return NULL; + + + + }; + + + + virtual char *findNextFrame(char *data, int &ndata, int dsize){ + if (dsize<2*nx*ny) ndata=dsize; + else ndata=2*nx*ny; + return data; + + } + + + + + + + // virtual int setFrameNumber(int ff){iframe=ff}; + + + + + + + + + + +int getPacketNumber(int x, int y) {return 0;}; + +}; + + + + +#endif