mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-17 11:31:30 +01:00
Ctbgui det (#58)
* WIP * WIP * WIP * WIP * WIP * WIP * defs added * ctb gui: tengiga bug fix * WIP * WIP
This commit is contained in:
@@ -45,7 +45,7 @@ class mythen3_01_jctbData : public slsDetectorData<short unsigned int> {
|
||||
|
||||
virtual short unsigned int* mythen03_frame(char *ptr, int dr=24, int nch=64*3, int off=5) {
|
||||
// off=0;
|
||||
int iarg;
|
||||
//int iarg;
|
||||
int64_t word, *wp;
|
||||
short unsigned int* val=new short unsigned int[nch];
|
||||
int bit[64];
|
||||
|
||||
@@ -49,7 +49,7 @@ class mythen3_02_jctbData : public mythen3_01_jctbData {
|
||||
|
||||
virtual short unsigned int* mythen03_frame(char *ptr, int dr=24, int nch=64*3, int off=5) {
|
||||
// off=0;
|
||||
int iarg;
|
||||
//int iarg;
|
||||
int64_t word, *wp;
|
||||
short unsigned int* val=new short unsigned int[nch];
|
||||
int bit[64];
|
||||
@@ -57,7 +57,7 @@ class mythen3_02_jctbData : public mythen3_01_jctbData {
|
||||
int ioff=0;
|
||||
int idr=0;
|
||||
int ib=0;
|
||||
int ich=0;
|
||||
//int ich=0;
|
||||
int ii=0;
|
||||
int iw=0;
|
||||
bit[0]=17;//19;
|
||||
|
||||
@@ -8,9 +8,9 @@ class deserializer : public slsDetectorData<int> {
|
||||
public:
|
||||
|
||||
|
||||
deserializer( std::vector <int> dbl, int nch=64*3,int dr=24, int off=2): slsDetectorData<int>(nch,1,nch*dr*8+off*8,NULL,NULL,NULL), dbitlist(dbl), dynamicRange(dr), serialOffset(off), frameNumber(0), numberOfCounters(nch) {};
|
||||
deserializer( std::vector <int> dbl, int nch=64*3,int dr=24, int off=2): slsDetectorData<int>(nch,1,nch*dr*8+off*8,NULL,NULL,NULL), dynamicRange(dr), serialOffset(off), frameNumber(0), numberOfCounters(nch), dbitlist(dbl) {};
|
||||
|
||||
deserializer( std::vector <int> dbl, int nch,int dr, int off, int ds): slsDetectorData<int>(nch,1,ds,NULL,NULL,NULL), dbitlist(dbl), dynamicRange(dr), serialOffset(off), frameNumber(0), numberOfCounters(nch) {};
|
||||
deserializer( std::vector <int> dbl, int nch,int dr, int off, int ds): slsDetectorData<int>(nch,1,ds,NULL,NULL,NULL), dynamicRange(dr), serialOffset(off), frameNumber(0), numberOfCounters(nch), dbitlist(dbl) {};
|
||||
|
||||
virtual void getPixel(int ip, int &x, int &y) {x=-1; y=-1;};
|
||||
|
||||
@@ -51,7 +51,7 @@ class deserializer : public slsDetectorData<int> {
|
||||
|
||||
static int* deserializeAll(char *ptr, std::vector <int> dbl, int dr=24, int nch=64*3, int off=5) {
|
||||
// off=0;
|
||||
int iarg;
|
||||
//int iarg;
|
||||
int64_t word, *wp;
|
||||
int* val=new int[nch];
|
||||
int ioff=0;
|
||||
@@ -107,10 +107,10 @@ class deserializer : public slsDetectorData<int> {
|
||||
|
||||
static int* deserializeList(char *ptr, std::vector <int> dbl, int dr=24, int nch=64*3, int off=5) {
|
||||
// off=0;
|
||||
int iarg;
|
||||
int64_t word;
|
||||
//int iarg;
|
||||
// int64_t word;
|
||||
int* val=new int[nch];
|
||||
int ioff=0;
|
||||
//int ioff=0;
|
||||
int idr=0;
|
||||
int ib=0;
|
||||
int iw=0;
|
||||
@@ -129,7 +129,7 @@ class deserializer : public slsDetectorData<int> {
|
||||
ib=0;
|
||||
ich=0;
|
||||
for (const auto &bit : dbl) {
|
||||
ioff=off;
|
||||
//ioff=off;
|
||||
idr=0;
|
||||
for (iw=0; iw<(nch*dr/nb)/8; iw++) {
|
||||
val[ich]|=(*dval)<<idr;
|
||||
|
||||
@@ -29,7 +29,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
|
||||
*/
|
||||
//moench04CtbZmq10GbData(int nas=5000, int nds=0): slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas), dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
||||
moench04CtbZmq10GbData(int nas=5000, int nds=0): slsDetectorData<uint16_t>(400, 400, (nas > 0) && (nds>0) ? max(nas,nds)*(32*2+8) : nas*32*2+nds*8), aSamples(nas), dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
||||
moench04CtbZmq10GbData(int nas=5000, int nds=0): slsDetectorData<uint16_t>(400, 400, (nas > 0) && (nds>0) ? max(nas,nds)*(32*2+8) : nas*32*2+nds*8), nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds) {
|
||||
|
||||
/* int ds; */
|
||||
/* if (nas && nds) */
|
||||
@@ -46,13 +46,13 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
|
||||
int row, col;
|
||||
|
||||
int isample;
|
||||
//int isample;
|
||||
int iadc;
|
||||
int ix, iy;
|
||||
// int ix, iy;
|
||||
|
||||
int npackets=40;
|
||||
// int npackets=40;
|
||||
int i;
|
||||
int adc4(0);
|
||||
//int adc4(0);
|
||||
|
||||
for (int is=0; is<aSamples; is++) {
|
||||
|
||||
@@ -115,7 +115,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
}
|
||||
|
||||
int getGain(char *data, int x, int y) {
|
||||
int aoff=aSamples*2*32;
|
||||
// int aoff=aSamples*2*32;
|
||||
int irow;
|
||||
int isc=x/sc_width;
|
||||
int icol=x%sc_width;
|
||||
@@ -237,15 +237,15 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int& ff, int &np, char *data) {
|
||||
char *retval=0;
|
||||
int nd;
|
||||
int fnum = -1;
|
||||
// char *retval=0;
|
||||
// int nd;
|
||||
// int fnum = -1;
|
||||
np=0;
|
||||
int pn;
|
||||
//int pn;
|
||||
|
||||
// cout << dataSize << endl;
|
||||
if (ff>=0)
|
||||
fnum=ff;
|
||||
// fnum=ff;
|
||||
|
||||
if (filebin.is_open()) {
|
||||
if (filebin.read(data, dataSize) ){
|
||||
|
||||
@@ -28,20 +28,20 @@ class moench04CtbZmqData : public slsDetectorData<uint16_t> {
|
||||
\param c crosstalk parameter for the output buffer
|
||||
|
||||
*/
|
||||
moench04CtbZmqData(int nas=5000, int nds=0): slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas), dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
||||
moench04CtbZmqData(int nas=5000, int nds=0): slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds) {
|
||||
|
||||
|
||||
int adc_nr[32]={9, 8,11,10,13,12,15,14,1,0,3,2,5,4,7,6,23,22,21,20,19,18,17,16,31,30,29,28,27,26,25,24 };
|
||||
|
||||
int row, col;
|
||||
|
||||
int isample;
|
||||
//int isample;
|
||||
int iadc;
|
||||
int ix, iy;
|
||||
//int ix, iy;
|
||||
|
||||
int npackets=40;
|
||||
// int npackets=40;
|
||||
int i;
|
||||
int adc4(0);
|
||||
//int adc4(0);
|
||||
|
||||
for (int is=0; is<aSamples; is++) {
|
||||
|
||||
@@ -223,15 +223,15 @@ class moench04CtbZmqData : public slsDetectorData<uint16_t> {
|
||||
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int& ff, int &np, char *data) {
|
||||
char *retval=0;
|
||||
int nd;
|
||||
int fnum = -1;
|
||||
// char *retval=0;
|
||||
//int nd;
|
||||
//int fnum = -1;
|
||||
np=0;
|
||||
int pn;
|
||||
//int pn;
|
||||
|
||||
// cout << dataSize << endl;
|
||||
if (ff>=0)
|
||||
fnum=ff;
|
||||
// fnum=ff;
|
||||
|
||||
if (filebin.is_open()) {
|
||||
if (filebin.read(data, dataSize) ){
|
||||
|
||||
Reference in New Issue
Block a user