change in ifdef eigerreciver

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@763 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2014-03-11 09:33:14 +00:00
parent c74f4787cf
commit bba0f46b58
3 changed files with 13 additions and 13 deletions

View File

@ -30,7 +30,7 @@ using namespace std;
slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerRxr(NULL),
#endif
myDetectorType(det),
@ -101,7 +101,7 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
packetIndexMask = MOENCH_PACKET_INDEX_MASK;
}
else if(myDetectorType == EIGER){
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerRxr = new eigerReceiver();
#endif
}
@ -219,7 +219,7 @@ uint32_t slsReceiverFunctionList::getAcquisitionIndex(){
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
int32_t slsReceiverFunctionList::setNumberOfFrames(int32_t fnum){
if(fnum >= 0)
@ -244,13 +244,13 @@ int32_t slsReceiverFunctionList::setDynamicRange(int32_t dr){
char* slsReceiverFunctionList::setFileName(char c[]){
if(strlen(c)){
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerRxr->setFileName(c);
#else
strcpy(fileName,c);
#endif
}
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
return eigerRxr->getFileName();
#else
return getFileName();
@ -264,7 +264,7 @@ char* slsReceiverFunctionList::setFilePath(char c[]){
//check if filepath exists
struct stat st;
if(stat(c,&st) == 0){
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerRxr->setFileName(c);
#else
strcpy(filePath,c);
@ -274,7 +274,7 @@ char* slsReceiverFunctionList::setFilePath(char c[]){
cout<<"FilePath does not exist:"<<filePath<<endl;
}
}
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
return eigerRxr->getFilePath();
#else
return getFilePath();
@ -293,13 +293,13 @@ int slsReceiverFunctionList::setFileIndex(int i){
int slsReceiverFunctionList::setEnableFileWrite(int i){
if(i!=-1){
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerRxr->setEnableFileWrite(i);
#else
enableFileWrite=i;
#endif
}
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
return eigerRxr->getEnableFileWrite();
#else
return enableFileWrite;

View File

@ -57,7 +57,7 @@ public:
*/
void setEthernetInterface(char* c);
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
/** set frame number if a positive number
*/
int32_t setNumberOfFrames(int32_t fnum);
@ -326,7 +326,7 @@ private:
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
eigerReceiver eigerRxr;
#endif

View File

@ -1452,7 +1452,7 @@ cout<<"index[0]"<<index[0]<<" index[1]:"<<index[1]<<endl;
else{
if(index[0] == slsDetectorDefs::FRAME_PERIOD)
retval=slsReceiverList->setAcquisitionPeriod(index[1]);
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
else
retval=slsReceiverList->setNumberOfFrames(index[1]);
#endif
@ -1462,7 +1462,7 @@ cout<<"index[0]"<<index[0]<<" index[1]:"<<index[1]<<endl;
if(ret!=FAIL){
if(index[0] == slsDetectorDefs::FRAME_PERIOD)
cout << "acquisition period:" << retval << endl;
#ifdef EIGER_RECEIVER
#ifdef EIGER_RECEIVER_H
cout << "frame number:" << retval << endl;
#endif
}else