From 753ed306d913e2052376155c44f47640128588d3 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 10 Nov 2016 08:41:46 +0100 Subject: [PATCH] changes to include eiger in gui --- .../multiSlsDetector/multiSlsDetector.cpp | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 317e0fe6d..85ed9aee1 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5102,9 +5102,27 @@ void multiSlsDetector::startReceivingDataThread(){ int ithread = currentThreadIndex; //set current thread value index + //initializations + int numReadoutPerDetector = 1; + bool jungfrau = false; + int expectedsize = 1024*256;/**shouldnt work for other bit modes or anythign*/ + if(getDetectorsType() == EIGER){ + numReadoutPerDetector = 2; + expectedsize = 1024*256; + }else if(getDetectorsType() == JUNGFRAU){ + jungfrau = true; + expectedsize = 8192*128; + } + int singleDatabytes = detectors[ithread/numReadoutPerDetector]->getDataBytes(); + int nel=(singleDatabytes/numReadoutPerDetector)/sizeof(int); + int* image = new int[nel]; + int len,idet = 0; + singleframe[ithread]=NULL; + + char hostname[100] = "tcp://"; char rx_hostname[100]; - strcpy(rx_hostname, detectors[ithread]->getReceiver()); + strcpy(rx_hostname, detectors[ithread/numReadoutPerDetector]->getReceiver()); cout<<"rx_hostname:"<getDataBytes(); - int nel=(singleDatabytes/numReadoutPerDetector)/sizeof(int); - int* image = new int[nel]; - int len,idet = 0; - singleframe[ithread]=NULL; + threadStarted = true; //let calling function know thread started and obtained current