got rid of egier_reciver ifdef and reorganized the slreceiverfunctionlist

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@792 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2014-03-18 15:51:58 +00:00
parent f25e016f64
commit 1191fe5674
6 changed files with 329 additions and 266 deletions

View File

@ -12,7 +12,7 @@ INCLUDES?= -IcommonFiles -IslsDetector -IMySocketTCP -IusersFunctions -ImultiSls
CC=g++ CC=g++
SRC_CLNT= slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsReceiver/slsReceiverFunctionList.cpp slsReceiver/slsReceiver_funcs.cpp slsReceiver/slsReceiverUsers.cpp SRC_CLNT= slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsReceiver/slsReceiverFunctionList.cpp slsReceiver/slsReceiver_funcs.cpp slsReceiver/slsReceiverUsers.cpp slsReceiver/eigerReceiver.cpp
OBJS = $(SRC_CLNT:.cpp=.o) OBJS = $(SRC_CLNT:.cpp=.o)

View File

@ -1,5 +1,5 @@
CC = g++ CC = g++
CFLAGS += -DSLS_RECEIVER_FUNCTION_LIST -O3 #-DEIGER_RECEIVER CFLAGS += -DSLS_RECEIVER_FUNCTION_LIST -O3
CPPFLAGS = ${CFLAGS} # for MAC CPPFLAGS = ${CFLAGS} # for MAC
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++

View File

@ -1,8 +1,3 @@
//#ifndef EIGER_RECEIVER
//#define EIGER_RECEIVER
//#endif
#ifdef EIGER_RECEIVER
#ifndef EIGERRECEIVER_H #ifndef EIGERRECEIVER_H
#define EIGERRECEIVER_H #define EIGERRECEIVER_H
/*********************************************** /***********************************************
@ -199,5 +194,3 @@ private:
}; };
#endif /* #ifndef EIGERRECEIVER_H */ #endif /* #ifndef EIGERRECEIVER_H */
#endif /* #ifdef EIGER_RECEIVER */

View File

@ -30,9 +30,7 @@ using namespace std;
slsReceiverFunctionList::slsReceiverFunctionList(detectorType det): slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
#ifdef EIGER_RECEIVER_H
receiver(NULL), receiver(NULL),
#endif
myDetectorType(det), myDetectorType(det),
status(IDLE), status(IDLE),
udpSocket(NULL), udpSocket(NULL),
@ -90,6 +88,8 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
pRawDataReady(NULL){ pRawDataReady(NULL){
maxPacketsPerFile = MAX_FRAMES_PER_FILE * packetsPerFrame; maxPacketsPerFile = MAX_FRAMES_PER_FILE * packetsPerFrame;
//moench variables //moench variables
if(myDetectorType == MOENCH){ if(myDetectorType == MOENCH){
fifosize = MOENCH_FIFO_SIZE; fifosize = MOENCH_FIFO_SIZE;
@ -100,10 +100,9 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
frameIndexOffset = MOENCH_FRAME_INDEX_OFFSET; frameIndexOffset = MOENCH_FRAME_INDEX_OFFSET;
packetIndexMask = MOENCH_PACKET_INDEX_MASK; packetIndexMask = MOENCH_PACKET_INDEX_MASK;
} }
else if(myDetectorType == EIGER){ else if(myDetectorType == EIGER){
#ifdef EIGER_RECEIVER_H receiver = EigerReceiver::create();
receiver = new EigerReceiver::create();
#endif
} }
//variable initialization //variable initialization
@ -193,12 +192,21 @@ slsReceiverFunctionList::~slsReceiverFunctionList(){
void slsReceiverFunctionList::setEthernetInterface(char* c){
strcpy(eth,c);
}
/*Frame indices and numbers caught*/
bool slsReceiverFunctionList::getAcquistionStarted(){return acqStarted;};
bool slsReceiverFunctionList::getMeasurementStarted(){return measurementStarted;};
int slsReceiverFunctionList::getFramesCaught(){return (packetsCaught/packetsPerFrame);}
int slsReceiverFunctionList::getTotalFramesCaught(){return (totalPacketsCaught/packetsPerFrame);}
uint32_t slsReceiverFunctionList::getStartFrameIndex(){return startFrameIndex;}
uint32_t slsReceiverFunctionList::getFrameIndex(){ uint32_t slsReceiverFunctionList::getFrameIndex(){
if(!packetsCaught) if(!packetsCaught)
frameIndex=0; frameIndex=0;
@ -207,8 +215,6 @@ uint32_t slsReceiverFunctionList::getFrameIndex(){
return frameIndex; return frameIndex;
} }
uint32_t slsReceiverFunctionList::getAcquisitionIndex(){ uint32_t slsReceiverFunctionList::getAcquisitionIndex(){
if(!totalPacketsCaught) if(!totalPacketsCaught)
acquisitionIndex=0; acquisitionIndex=0;
@ -218,8 +224,134 @@ uint32_t slsReceiverFunctionList::getAcquisitionIndex(){
} }
void slsReceiverFunctionList::resetTotalFramesCaught(){
acqStarted = false;
startAcquisitionIndex = 0;
totalPacketsCaught = 0;
}
/*file parameters*/
char* slsReceiverFunctionList::getFilePath(){
return filePath;
}
char* slsReceiverFunctionList::setFilePath(char c[]){
if(strlen(c)){
//check if filepath exists
struct stat st;
if(stat(c,&st) == 0){
if(myDetectorType == EIGER)
receiver->setFileName(c);
else
strcpy(filePath,c);
}else{
strcpy(filePath,"");
cout<<"FilePath does not exist:"<<filePath<<endl;
}
}
if(myDetectorType == EIGER)
return receiver->getFilePath();
else
return getFilePath();
}
char* slsReceiverFunctionList::getFileName(){
return fileName;
}
char* slsReceiverFunctionList::setFileName(char c[]){
if(strlen(c)){
if(myDetectorType == EIGER)
receiver->setFileName(c);
else
strcpy(fileName,c);
}
if(myDetectorType == EIGER)
return receiver->getFileName();
else
return getFileName();
}
int slsReceiverFunctionList::getFileIndex(){
return fileIndex;
}
int slsReceiverFunctionList::setFileIndex(int i){
if(i>=0)
fileIndex = i;
return getFileIndex();
}
int slsReceiverFunctionList::setFrameIndexNeeded(int i){
frameIndexNeeded = i;
return frameIndexNeeded;
}
int slsReceiverFunctionList::setEnableFileWrite(int i){
if(i!=-1){
if(myDetectorType == EIGER)
receiver->setEnableFileWrite(i);
else
enableFileWrite=i;
}
if(myDetectorType == EIGER)
return receiver->getEnableFileWrite();
else
return enableFileWrite;
}
/*other parameters*/
slsDetectorDefs::runStatus slsReceiverFunctionList::getStatus(){
return status;
}
char* slsReceiverFunctionList::setDetectorHostname(char c[]){
if(strlen(c)){
char *c0 = receiver->getDetectorHostname();
if(c0== NULL)
receiver->initialize(c);
delete[] c0;
}
return receiver->getDetectorHostname();
}
void slsReceiverFunctionList::setEthernetInterface(char* c){
strcpy(eth,c);
}
void slsReceiverFunctionList::setUDPPortNo(int p){
server_port = p;
}
#ifdef EIGER_RECEIVER_H
int32_t slsReceiverFunctionList::setNumberOfFrames(int32_t fnum){ int32_t slsReceiverFunctionList::setNumberOfFrames(int32_t fnum){
if(fnum >= 0) if(fnum >= 0)
@ -240,92 +372,6 @@ int32_t slsReceiverFunctionList::setDynamicRange(int32_t dr){
} }
char* slsReceiverFunctionList::setDetectorHostname(char c[]){
if((strlen(c))&& (receiver->getDetectorHostname() == NULL))
receiver->initialize(c);
}
return receiver->getDetectorHostname();
}
#endif
char* slsReceiverFunctionList::setFileName(char c[]){
if(strlen(c)){
#ifdef EIGER_RECEIVER_H
receiver->setFileName(c);
#else
strcpy(fileName,c);
#endif
}
#ifdef EIGER_RECEIVER_H
return receiver->getFileName();
#else
return getFileName();
#endif
}
char* slsReceiverFunctionList::setFilePath(char c[]){
if(strlen(c)){
//check if filepath exists
struct stat st;
if(stat(c,&st) == 0){
#ifdef EIGER_RECEIVER_H
receiver->setFileName(c);
#else
strcpy(filePath,c);
#endif
}else{
strcpy(filePath,"");
cout<<"FilePath does not exist:"<<filePath<<endl;
}
}
#ifdef EIGER_RECEIVER_H
return receiver->getFilePath();
#else
return getFilePath();
#endif
}
int slsReceiverFunctionList::setFileIndex(int i){
if(i>=0)
fileIndex = i;
return getFileIndex();
}
int slsReceiverFunctionList::setEnableFileWrite(int i){
if(i!=-1){
#ifdef EIGER_RECEIVER_H
receiver->setEnableFileWrite(i);
#else
enableFileWrite=i;
#endif
}
#ifdef EIGER_RECEIVER_H
return receiver->getEnableFileWrite();
#else
return enableFileWrite;
#endif
}
void slsReceiverFunctionList::resetTotalFramesCaught(){
acqStarted = false;
startAcquisitionIndex = 0;
totalPacketsCaught = 0;
}
int slsReceiverFunctionList::setShortFrame(int i){ int slsReceiverFunctionList::setShortFrame(int i){
shortFrame=i; shortFrame=i;
@ -345,7 +391,6 @@ int slsReceiverFunctionList::setShortFrame(int i){
frameIndexOffset = GOTTHARD_FRAME_INDEX_OFFSET; frameIndexOffset = GOTTHARD_FRAME_INDEX_OFFSET;
} }
onePacketSize = bufferSize/packetsPerFrame; onePacketSize = bufferSize/packetsPerFrame;
deleteFilter(); deleteFilter();
@ -356,10 +401,6 @@ int slsReceiverFunctionList::setShortFrame(int i){
} }
int slsReceiverFunctionList::setNFrameToGui(int i){ int slsReceiverFunctionList::setNFrameToGui(int i){
if(i>=0){ if(i>=0){
nFrameToGui = i; nFrameToGui = i;
@ -370,7 +411,6 @@ int slsReceiverFunctionList::setNFrameToGui(int i){
int64_t slsReceiverFunctionList::setAcquisitionPeriod(int64_t index){ int64_t slsReceiverFunctionList::setAcquisitionPeriod(int64_t index){
if(index >= 0){ if(index >= 0){
if(index != acquisitionPeriod){ if(index != acquisitionPeriod){
@ -382,6 +422,7 @@ int64_t slsReceiverFunctionList::setAcquisitionPeriod(int64_t index){
} }
bool slsReceiverFunctionList::getDataCompression(){return dataCompression;}
int slsReceiverFunctionList::enableDataCompression(bool enable){ int slsReceiverFunctionList::enableDataCompression(bool enable){
cout << "Data compression "; cout << "Data compression ";
@ -420,6 +461,17 @@ int slsReceiverFunctionList::enableDataCompression(bool enable){
/*other functions*/
void slsReceiverFunctionList::deleteFilter(){ void slsReceiverFunctionList::deleteFilter(){
int i; int i;
cmSub=NULL; cmSub=NULL;
@ -437,7 +489,6 @@ void slsReceiverFunctionList::deleteFilter(){
} }
void slsReceiverFunctionList::setupFilter(){ void slsReceiverFunctionList::setupFilter(){
double hc = 0; double hc = 0;
double sigma = 5; double sigma = 5;
@ -472,63 +523,6 @@ void slsReceiverFunctionList::setupFilter(){
} }
void slsReceiverFunctionList::readFrame(char* c,char** raw){
//point to gui data
if (guiData == NULL)
guiData = latestData;
//copy data and filename
strcpy(c,guiFileName);
//could not get gui data
if(!guiDataReady){
*raw = NULL;
}
//data ready, set guidata to receive new data
else{
*raw = guiData;
guiData = NULL;
pthread_mutex_lock(&dataReadyMutex);
guiDataReady = 0;
pthread_mutex_unlock(&dataReadyMutex);
if((nFrameToGui) && (writerthreads_mask)){
//release after getting data
sem_post(&smp);
}
}
}
void slsReceiverFunctionList::copyFrameToGui(char* startbuf){
//random read when gui not ready
if((!nFrameToGui) && (!guiData)){
pthread_mutex_lock(&dataReadyMutex);
guiDataReady=0;
pthread_mutex_unlock(&dataReadyMutex);
}
//random read or nth frame read, gui needs data now
else{
//nth frame read, block current process if the guireader hasnt read it yet
if(nFrameToGui)
sem_wait(&smp);
pthread_mutex_lock(&dataReadyMutex);
guiDataReady=0;
//send the first one
memcpy(latestData,startbuf,bufferSize);
strcpy(guiFileName,savefilename);
guiDataReady=1;
pthread_mutex_unlock(&dataReadyMutex);
}
}
void slsReceiverFunctionList::setupFifoStructure(){ void slsReceiverFunctionList::setupFifoStructure(){
@ -611,6 +605,69 @@ void slsReceiverFunctionList::setupFifoStructure(){
/** acquisition functions */
void slsReceiverFunctionList::readFrame(char* c,char** raw){
//point to gui data
if (guiData == NULL)
guiData = latestData;
//copy data and filename
strcpy(c,guiFileName);
//could not get gui data
if(!guiDataReady){
*raw = NULL;
}
//data ready, set guidata to receive new data
else{
*raw = guiData;
guiData = NULL;
pthread_mutex_lock(&dataReadyMutex);
guiDataReady = 0;
pthread_mutex_unlock(&dataReadyMutex);
if((nFrameToGui) && (writerthreads_mask)){
//release after getting data
sem_post(&smp);
}
}
}
void slsReceiverFunctionList::copyFrameToGui(char* startbuf){
//random read when gui not ready
if((!nFrameToGui) && (!guiData)){
pthread_mutex_lock(&dataReadyMutex);
guiDataReady=0;
pthread_mutex_unlock(&dataReadyMutex);
}
//random read or nth frame read, gui needs data now
else{
//nth frame read, block current process if the guireader hasnt read it yet
if(nFrameToGui)
sem_wait(&smp);
pthread_mutex_lock(&dataReadyMutex);
guiDataReady=0;
//send the first one
memcpy(latestData,startbuf,bufferSize);
strcpy(guiFileName,savefilename);
guiDataReady=1;
pthread_mutex_unlock(&dataReadyMutex);
}
}
int slsReceiverFunctionList::createUDPSocket(){ int slsReceiverFunctionList::createUDPSocket(){
if(udpSocket) if(udpSocket)
udpSocket->ShutDownSocket(); udpSocket->ShutDownSocket();

View File

@ -12,11 +12,10 @@
#include "receiver_defs.h" #include "receiver_defs.h"
#include "genericSocket.h" #include "genericSocket.h"
#include "circularFifo.h" #include "circularFifo.h"
#include "singlePhotonDetector.h" #include "singlePhotonDetector.h"
#include "slsReceiverData.h" #include "slsReceiverData.h"
#include "moenchCommonMode.h" #include "moenchCommonMode.h"
#include "eigerReceiver.h"
#ifdef MYROOT1 #ifdef MYROOT1
#include <TTree.h> #include <TTree.h>
@ -47,92 +46,70 @@ public:
*/ */
virtual ~slsReceiverFunctionList(); virtual ~slsReceiverFunctionList();
//Frame indices and numbers caught
/** /**
* Set UDP Port Number * Returns current Frame Index Caught for an entire acquisition (including all scans)
*/ */
void setUDPPortNo(int p){server_port = p;}; uint32_t getAcquisitionIndex();
/** /**
* Set Ethernet Interface or IP to listen to * Returns if acquisition started
*/ */
void setEthernetInterface(char* c); bool getAcquistionStarted();
#ifdef EIGER_RECEIVER_H
/** set frame number if a positive number
*/
int32_t setNumberOfFrames(int32_t fnum);
/** set scan tag if its is a positive number
*/
int32_t setScanTag(int32_t stag);
/** set dynamic range if its is a positive number
*/
int32_t setDynamicRange(int32_t dr);
#endif
/**
* Returns status of receiver: idle, running or error
*/
runStatus getStatus(){ return status;};
/**
* Returns File Name
*/
char* getFileName(){return fileName;};
/**
* Returns File Path
*/
char* getFilePath(){return filePath;};
/**
* Returns File Index
*/
int getFileIndex(){return fileIndex;};
/** /**
* Returns Frames Caught for each real time acquisition (eg. for each scan) * Returns Frames Caught for each real time acquisition (eg. for each scan)
*/ */
int getFramesCaught(){return (packetsCaught/packetsPerFrame);}; int getFramesCaught();
/** /**
* Returns Total Frames Caught for an entire acquisition (including all scans) * Returns Total Frames Caught for an entire acquisition (including all scans)
*/ */
int getTotalFramesCaught(){return (totalPacketsCaught/packetsPerFrame);}; int getTotalFramesCaught();
/** /**
* Returns the frame index at start of each real time acquisition (eg. for each scan) * Returns the frame index at start of each real time acquisition (eg. for each scan)
*/ */
uint32_t getStartFrameIndex(){return startFrameIndex;}; uint32_t getStartFrameIndex();
/** /**
* Returns current Frame Index for each real time acquisition (eg. for each scan) * Returns current Frame Index for each real time acquisition (eg. for each scan)
*/ */
uint32_t getFrameIndex(); uint32_t getFrameIndex();
/**
* Returns current Frame Index Caught for an entire acquisition (including all scans)
*/
uint32_t getAcquisitionIndex();
/**
* Returns if acquisition started
*/
bool getAcquistionStarted(){return acqStarted;};
/** /**
* Returns if measurement started * Returns if measurement started
*/ */
bool getMeasurementStarted(){return measurementStarted;}; bool getMeasurementStarted();
/** /**
* Set detector hostname * Resets the Total Frames Caught
* @param c hostname * This is how the receiver differentiates between entire acquisitions
* Returns 0
*/ */
char* setDetectorHostname(char c[]); void resetTotalFramesCaught();
//file parameters
/**
* Returns File Path
*/
char* getFilePath();
/**
* Set File Path
* @param c file path
*/
char* setFilePath(char c[]);
/**
* Returns File Name
*/
char* getFileName();
/** /**
* Set File Name (without frame index, file index and extension) * Set File Name (without frame index, file index and extension)
@ -141,10 +118,9 @@ public:
char* setFileName(char c[]); char* setFileName(char c[]);
/** /**
* Set File Path * Returns File Index
* @param c file path
*/ */
char* setFilePath(char c[]); int getFileIndex();
/** /**
* Set File Index * Set File Index
@ -156,7 +132,7 @@ public:
* Set Frame Index Needed * Set Frame Index Needed
* @param i frame index needed * @param i frame index needed
*/ */
int setFrameIndexNeeded(int i){frameIndexNeeded = i; return frameIndexNeeded;}; int setFrameIndexNeeded(int i);
/** /**
* Set enable file write * Set enable file write
@ -165,12 +141,48 @@ public:
*/ */
int setEnableFileWrite(int i); int setEnableFileWrite(int i);
//other parameters
/** /**
* Resets the Total Frames Caught * Returns status of receiver: idle, running or error
* This is how the receiver differentiates between entire acquisitions
* Returns 0
*/ */
void resetTotalFramesCaught(); runStatus getStatus();
/**
* Set detector hostname
* @param c hostname
*/
char* setDetectorHostname(char c[]);
/**
* Set Ethernet Interface or IP to listen to
*/
void setEthernetInterface(char* c);
/**
* Set UDP Port Number
*/
void setUDPPortNo(int p);
/**
* set frame number if a positive number
*/
int32_t setNumberOfFrames(int32_t fnum);
/**
* set scan tag if its is a positive number
*/
int32_t setScanTag(int32_t stag);
/**
* set dynamic range if its is a positive number
*/
int32_t setDynamicRange(int32_t dr);
/** /**
* Set short frame * Set short frame
@ -188,19 +200,21 @@ public:
*/ */
int64_t setAcquisitionPeriod(int64_t index); int64_t setAcquisitionPeriod(int64_t index);
/** get data compression, by saving only hits
*/
bool getDataCompression();
/** enabl data compression, by saving only hits /** enabl data compression, by saving only hits
/returns if failed /returns if failed
*/ */
int enableDataCompression(bool enable); int enableDataCompression(bool enable);
/** get data compression, by saving only hits
*/
bool getDataCompression(){ return dataCompression;};
/** set status to transmitting and
* when fifo is empty later, sets status to run_finished
*/
void startReadout();
//other functions
/** /**
* Returns the buffer-current frame read by receiver * Returns the buffer-current frame read by receiver
@ -209,6 +223,12 @@ public:
*/ */
void readFrame(char* c,char** raw); void readFrame(char* c,char** raw);
/**
* Closes all files
* @param ithr thread index
*/
void closeFile(int ithr = -1);
/** /**
* Starts Receiver - starts to listen for packets * Starts Receiver - starts to listen for packets
* @param message is the error message if there is an error * @param message is the error message if there is an error
@ -222,11 +242,11 @@ public:
*/ */
int stopReceiver(); int stopReceiver();
/** /** set status to transmitting and
* Closes all files * when fifo is empty later, sets status to run_finished
* @param ithr thread index
*/ */
void closeFile(int ithr = -1); void startReadout();
private: private:
/** /**
@ -239,17 +259,17 @@ private:
*/ */
void setupFilter(); void setupFilter();
/**
* set up fifo according to the new numjobsperthread
*/
void setupFifoStructure ();
/** /**
* Copy frames to gui * Copy frames to gui
* uses semaphore for nth frame mode * uses semaphore for nth frame mode
*/ */
void copyFrameToGui(char* startbuf); void copyFrameToGui(char* startbuf);
/**
* set up fifo according to the new numjobsperthread
*/
void setupFifoStructure ();
/** /**
* creates udp socket * creates udp socket
* \returns if success or fail * \returns if success or fail
@ -332,10 +352,9 @@ private:
#ifdef EIGER_RECEIVER_H
EigerReceiver receiver;
#endif
/** Eiger Receiver */
EigerReceiver *receiver;
/** detector type */ /** detector type */
detectorType myDetectorType; detectorType myDetectorType;

View File

@ -1467,19 +1467,16 @@ int slsReceiverFuncs::set_timer() {
else{ else{
if(index[0] == slsDetectorDefs::FRAME_PERIOD) if(index[0] == slsDetectorDefs::FRAME_PERIOD)
retval=slsReceiverList->setAcquisitionPeriod(index[1]); retval=slsReceiverList->setAcquisitionPeriod(index[1]);
#ifdef EIGER_RECEIVER_H
else else
retval=slsReceiverList->setNumberOfFrames(index[1]); retval=slsReceiverList->setNumberOfFrames(index[1]);
#endif
} }
} }
#ifdef VERBOSE #ifdef VERBOSE
if(ret!=FAIL){ if(ret!=FAIL){
if(index[0] == slsDetectorDefs::FRAME_PERIOD) if(index[0] == slsDetectorDefs::FRAME_PERIOD)
cout << "acquisition period:" << retval << endl; cout << "acquisition period:" << retval << endl;
#ifdef EIGER_RECEIVER_H else
cout << "frame number:" << retval << endl; cout << "frame number:" << retval << endl;
#endif
}else }else
cout << mess << endl; cout << mess << endl;
#endif #endif
@ -1576,11 +1573,8 @@ int slsReceiverFuncs::set_detector_hostname() {
sprintf(mess,"Receiver locked by %s\n", socket->lastClientIP); sprintf(mess,"Receiver locked by %s\n", socket->lastClientIP);
ret=FAIL; ret=FAIL;
} }
#ifdef EIGER_RECEIVER_H
else else
strcpy(retval,slsReceiverList->setDetectorHostname(hostname)); strcpy(retval,slsReceiverList->setDetectorHostname(hostname));
#endif
} }
#ifdef VERBOSE #ifdef VERBOSE
if(ret!=FAIL) if(ret!=FAIL)
@ -1781,9 +1775,9 @@ int slsReceiverFuncs::send_update() {
//index //index
#ifdef SLS_RECEIVER_FUNCTION_LIST #ifdef SLS_RECEIVER_FUNCTION_LIST
#ifndef EIGER_RECEIVER if(myDetectorType != EIGER)
ind=slsReceiverList->getFileIndex(); ind=slsReceiverList->getFileIndex();
#endif
socket->SendDataOnly(&ind,sizeof(ind)); socket->SendDataOnly(&ind,sizeof(ind));
#endif #endif