diff --git a/slsDetectorSoftware/eigerDetectorServer/Beb.c b/slsDetectorSoftware/eigerDetectorServer/Beb.c index e77a5efc9..71e7a9d00 100644 --- a/slsDetectorSoftware/eigerDetectorServer/Beb.c +++ b/slsDetectorSoftware/eigerDetectorServer/Beb.c @@ -11,7 +11,7 @@ #include #include - +#include #include "xfs_types.h" @@ -89,7 +89,7 @@ void BebInfo_Print(struct BebInfo* bebInfo){ } -void Beb_Beb(int arg1){ +void Beb_Beb(){ Beb_send_ndata = 0; Beb_send_buffer_size = 1026; @@ -137,14 +137,32 @@ void Beb_Beb(int arg1){ Beb_SetByteOrder(); -/* - ll_beb_new_memory = &ll_beb_new_memory_local; - Local_LocalLinkInterface(ll_beb_new_memory); - if(!Local_InitNewMemory(ll_beb_new_memory,XPAR_PLB_LL_NEW_MEMORY, arg1)) - printf("New Memory FAIL\n"); - else - printf("New Memory OK\n"); -*/ +} + + + +void Beb_GetModuleCopnfiguration(int* master, int* top){ + *top = 0; + *master = 0; + //mapping new memory to read master top module configuration + ll_beb_new_memory = &ll_beb_new_memory_local; + Local_LocalLinkInterface(ll_beb_new_memory); + int ret = Local_GetModuleConfiguration(ll_beb_new_memory,XPAR_PLB_GPIO_SYS_BASEADDR, MODULE_CONFIGURATION); + if(!ret) + printf("Module Configuration FAIL\n"); + else{ + printf("Module Configuration OK\n"); + printf("Beb: value =0x%x\n",ret); + if(ret&0xf){ + *top = 1; + // printf("Beb.c: TOP\n\n\n\n"); + }//else printf("Beb.c: BOTTOM\n\n\n\n"); + + if(ret&0x200){ + *master = 1; + // printf("Beb.c: MASTER\n\n\n\n"); + }//else printf("Beb.c: SLAVE\n\n\n\n"); + } } diff --git a/slsDetectorSoftware/eigerDetectorServer/Beb.h b/slsDetectorSoftware/eigerDetectorServer/Beb.h index 86c36b0e5..86a97c9d7 100644 --- a/slsDetectorSoftware/eigerDetectorServer/Beb.h +++ b/slsDetectorSoftware/eigerDetectorServer/Beb.h @@ -40,8 +40,6 @@ struct BebInfo{ - - void Beb_ClearBebInfos(); int Beb_InitBebInfos(); int Beb_ReadSetUpFromFile(char* file_name); @@ -67,9 +65,7 @@ struct BebInfo{ int Beb_SetByteOrder(); - - - void Beb_Beb(int arg1); + void Beb_Beb(); int Beb_SetBebSrcHeaderInfos(unsigned int beb_number, int ten_gig, char* src_mac, char* src_ip, unsigned int src_port); diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index c7cace647..b8b6ff4bd 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -53,9 +53,9 @@ unsigned int Feb_Control_trimbit_size; unsigned int* Feb_Control_last_downloaded_trimbits; -int Feb_Control_current_mod; +int Feb_Control_module_number; int Feb_Control_current_index; -int Feb_Control_am_i_master; + void Module_Module(struct Module* mod,unsigned int number, unsigned int address_top){ unsigned int i; @@ -151,124 +151,96 @@ int Feb_Control_IsBottomModule(){ int Feb_Control_GetModuleNumber(){ - return Feb_Control_current_mod; + return Feb_Control_module_number; } void Feb_Control_FebControl(){ - Feb_Control_staticBits=Feb_Control_acquireNReadoutMode=Feb_Control_triggerMode=Feb_Control_externalEnableMode=Feb_Control_subFrameMode=0; - Feb_Control_trimbit_size=263680; Feb_Control_last_downloaded_trimbits = malloc(Feb_Control_trimbit_size * sizeof(int)); - -/* - printf("\nDefault Settings:\n"); - Feb_Control_nimages = 1; - Feb_Control_exposure_time_in_sec = 1; - Feb_Control_exposure_period_in_sec = 0; - Feb_Control_SetTestModeVariable(0); - //SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15); - //SetRateCorrection(0); //deactivate rate correction - Feb_Control_SetDynamicRange(16); - Feb_Control_SetPhotonEnergy(8000); - Feb_Control_SetReadoutMode(0); - Feb_Control_SetReadoutSpeed(0); - Feb_Control_SetTriggerMode(0,1); - Feb_Control_SetExternalEnableMode(0,1); - printf("\n\n"); - - Feb_Control_Init(); -*/ - - - - /* - unsigned int reg_nums[1]; - unsigned int reg_vals[1]; - reg_nums[0]=DAQ_REG_CHIP_CMDS; - reg_vals[0]=(0|Feb_Control_acquireNReadoutMode|Feb_Control_triggerMode|Feb_Control_externalEnableMode|Feb_Control_subFrameMode); - - if(!Feb_Interface_WriteRegisters(Feb_Control_AddressToAll(),1,reg_nums,reg_vals,0,0)){ - printf("Trouble setting them up as slaves\n");; - } - - */ - - + moduleSize = 0; } -void Feb_Control_ClearModules(){ - unsigned int i; - //for(i=0;i /*class LocalLinkInterface: public HardwareIO{ //*/ @@ -35,7 +36,7 @@ struct LocalLinkInterface{ int Local_Test(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buffer); void Local_LocalLinkInterface(struct LocalLinkInterface* ll); - int Local_InitNewMemory (struct LocalLinkInterface* ll,unsigned int addr, int ifg); + int Local_GetModuleConfiguration (struct LocalLinkInterface* ll, u_int32_t baseaddr, u_int32_t offset); /* int FiFoReset(unsigned int numb); diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer index e1ffbab48..5abcad5af 100755 Binary files a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer and b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer differ diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index 0ff446401..0648b116b 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -56,118 +56,121 @@ int dst_requested[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 int default_dac_values[16] = {0,2480,3300,1400,4000,2556,1000,1000,4000,1000,1000,1000,1000,200,2000,1550}; -enum masterFlags masterMode=NO_MASTER; -int bottom = 0; -//enum masterFlags trialMasterMode=NO_MASTER; +enum masterFlags masterMode=IS_SLAVE; +int top = 0; +int master = 0; + int initDetector(){ - int imod,i,n; - n = getNModBoard(1); + int imod,i,n; + n = getNModBoard(1); - printf("This is the EIGER Server of revision %llx\n", getDetectorId(DETECTOR_SOFTWARE_VERSION)); + printf("This is the EIGER Server of revision %llx\n", getDetectorId(DETECTOR_SOFTWARE_VERSION)); - //#ifdef VERBOSE - printf("Board is for %d half modules\n",n); - //#endif + //#ifdef VERBOSE + printf("Board is for %d half modules\n",n); + //#endif - detectorModules=malloc(n*sizeof(sls_detector_module)); - detectorChips=malloc(n*NCHIP*sizeof(int)); + //Allocation of memory + detectorModules=malloc(n*sizeof(sls_detector_module)); + detectorChips=malloc(n*NCHIP*sizeof(int)); - detectorChans=malloc(n*NCHIP*NCHAN*sizeof(int)); - detectorDacs=malloc(n*NDAC*sizeof(dacs_t)); - detectorAdcs=malloc(n*NADC*sizeof(dacs_t)); + detectorChans=malloc(n*NCHIP*NCHAN*sizeof(int)); + detectorDacs=malloc(n*NDAC*sizeof(dacs_t)); + detectorAdcs=malloc(n*NADC*sizeof(dacs_t)); #ifdef VERBOSE - printf("modules from 0x%x to 0x%x\n",detectorModules, detectorModules+n); - printf("chips from 0x%x to 0x%x\n",detectorChips, detectorChips+n*NCHIP); - printf("chans from 0x%x to 0x%x\n",detectorChans, detectorChans+n*NCHIP*NCHAN); - printf("dacs from 0x%x to 0x%x\n",detectorDacs, detectorDacs+n*NDAC); - printf("adcs from 0x%x to 0x%x\n",detectorAdcs, detectorAdcs+n*NADC); + printf("modules from 0x%x to 0x%x\n",detectorModules, detectorModules+n); + printf("chips from 0x%x to 0x%x\n",detectorChips, detectorChips+n*NCHIP); + printf("chans from 0x%x to 0x%x\n",detectorChans, detectorChans+n*NCHIP*NCHAN); + printf("dacs from 0x%x to 0x%x\n",detectorDacs, detectorDacs+n*NDAC); + printf("adcs from 0x%x to 0x%x\n",detectorAdcs, detectorAdcs+n*NADC); #endif - for (imod=0; imoddacs=detectorDacs+imod*NDAC; - (detectorModules+imod)->adcs=detectorAdcs+imod*NADC; - (detectorModules+imod)->chipregs=detectorChips+imod*NCHIP; - (detectorModules+imod)->chanregs=detectorChans+imod*NCHIP*NCHAN; - (detectorModules+imod)->ndac=NDAC; - (detectorModules+imod)->nadc=NADC; - (detectorModules+imod)->nchip=NCHIP; - (detectorModules+imod)->nchan=NCHIP*NCHAN; - (detectorModules+imod)->module=imod; - (detectorModules+imod)->gain=0; - (detectorModules+imod)->offset=0; - (detectorModules+imod)->reg=0; - /* initialize registers, dacs, retrieve sn, adc values etc */ - } - thisSettings = STANDARD;/**UNITIALIZED*/ - /*sChan=noneSelected; + for (imod=0; imoddacs=detectorDacs+imod*NDAC; + (detectorModules+imod)->adcs=detectorAdcs+imod*NADC; + (detectorModules+imod)->chipregs=detectorChips+imod*NCHIP; + (detectorModules+imod)->chanregs=detectorChans+imod*NCHIP*NCHAN; + (detectorModules+imod)->ndac=NDAC; + (detectorModules+imod)->nadc=NADC; + (detectorModules+imod)->nchip=NCHIP; + (detectorModules+imod)->nchan=NCHIP*NCHAN; + (detectorModules+imod)->module=imod; + (detectorModules+imod)->gain=0; + (detectorModules+imod)->offset=0; + (detectorModules+imod)->reg=0; + /* initialize registers, dacs, retrieve sn, adc values etc */ + } + thisSettings = STANDARD;/**UNITIALIZED*/ + /*sChan=noneSelected; sChip=noneSelected; sMod=noneSelected; sDac=noneSelected; sAdc=noneSelected; -*/ + */ - Feb_Interface_FebInterface(); - Feb_Control_FebControl(); - Feb_Control_Init(); - printf("FEb control constructor done\n"); - Beb_Beb(-1); - printf("BEB constructor done\n"); + //Feb and Beb Initializations + getModuleConfiguration(); + Feb_Interface_FebInterface(); + Feb_Control_FebControl(); + Feb_Control_Init(master,top); + printf("FEB Initialization done\n"); + Beb_Beb(); + printf("BEB Initialization done\n"); - //get dac values - int retval[2]; + //Get dac values + int retval[2]; for(i=0;i<(detectorModules)->ndac;i++) setDAC((enum detDacIndex)i,default_dac_values[i],(detectorModules)->module,0,retval); - /* initialize dynamic range etc. */ - - - //set number of frames to 1 - setTimer(FRAME_NUMBER,1); - setTimer(ACQUISITION_TIME,1E9); - setTimer(FRAME_PERIOD,1E9); - setDynamicRange(16); - setThresholdEnergy(8000,0); - setReadOutFlags(PARALLEL); - setSpeed(0,1);//clk_devider,half speed - setHighVolage(150,0); - setIODelay(675,0); - setTiming(AUTO_TIMING); - //setMaster(GET_MASTER); - int enable[2] = {0,1}; - setExternalGating(enable);//disable external gating - - Feb_Control_SetTestModeVariable(0); - - Feb_Control_CheckSetup(); - - //top or bottom - bottom = Feb_Control_IsBottomModule(); - /*if(getDetectorNumber()==0xbeb031) - bottom = 0; - else bottom = 1; -*/ - if(bottom) - printf("BOTTOM ***************\n"); - else - printf("TOP ***************\n"); - - - //if(getDetectorNumber()==0xbeb031){ - // printf("************** master ********************\n"); - // trialMasterMode = IS_MASTER; - //Feb_Control_Set_Master(); - // } - //else printf("************** slave ********************\n"); - - - - - return 1; + //setting default measurement parameters + setTimer(FRAME_NUMBER,1); + setTimer(ACQUISITION_TIME,1E9); + setTimer(FRAME_PERIOD,1E9); + setDynamicRange(16); + setThresholdEnergy(8000,0); + setReadOutFlags(PARALLEL); + setSpeed(0,1);//clk_devider,half speed + setHighVolage(150,0); + setIODelay(675,0); + setTiming(AUTO_TIMING); + //SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15); + //SetRateCorrection(0); //deactivate rate correction + int enable[2] = {0,1}; + setExternalGating(enable);//disable external gating + Feb_Control_SetTestModeVariable(0); + Feb_Control_CheckSetup(); + printf("\n"); + return 1; } +int initDetectorStop(){ + getModuleConfiguration(); + Feb_Interface_FebInterface(); + Feb_Control_Init(master,top); + printf("FEB Initialization done\n"); + /* Beb_Beb(-1); + printf("BEB constructor done\n");*/ + + printf("\n"); + return 1; +} + + + +void getModuleConfiguration(){ + int *m=&master; + int *t=⊤ + Beb_GetModuleCopnfiguration(m,t); + if(top) printf("*************** TOP ***************\n"); + else printf("*************** BOTTOM ***************\n"); + if(master) printf("*************** MASTER ***************\n"); + else printf("*************** SLAVE ***************\n"); +} + + int setNMod(int nm, enum dimension dim){ return 1; @@ -183,7 +186,7 @@ int getNModBoard(enum dimension arg){ int64_t getModuleId(enum idMode arg, int imod){ -/**/ + /**/ return -1; } @@ -215,16 +218,16 @@ int64_t getDetectorId(enum idMode arg){ int getDetectorNumber(){ int res=0; - char hostname[100]; - if (gethostname(hostname, sizeof hostname) == 0) - puts(hostname); - else - perror("gethostname"); - sscanf(hostname,"%x",&res); - return res; + char hostname[100]; + if (gethostname(hostname, sizeof hostname) == 0) + puts(hostname); + else + perror("gethostname"); + sscanf(hostname,"%x",&res); + return res; -/* + /* char output[255]=""; int res=0; FILE* sysFile = popen("hostname", "r"); @@ -232,18 +235,18 @@ int getDetectorNumber(){ pclose(sysFile); sscanf(output,"%x",&res); return res; -*/ + */ /* int res=0; char hostname[100] = "beb000"; sscanf(hostname,"%x",&res); return res; - */ + */ } u_int64_t getDetectorMAC() { - /* + /* char output[255],mac[255]=""; u_int64_t res=0; FILE* sysFile = popen("ifconfig eth0 | grep HWaddr | cut -d \" \" -f 11", "r"); @@ -259,8 +262,8 @@ u_int64_t getDetectorMAC() { sscanf(mac,"%llx",&res); printf("mac:%llx\n",res); return res; - */ - return 0; + */ + return 0; } int moduleTest( enum digitalTestMode arg, int imod){ @@ -379,9 +382,9 @@ int enableTenGigabitEthernet(int val){ int setModule(sls_detector_module myMod){ int retval[2]; -//#ifdef VERBOSE + //#ifdef VERBOSE printf("Setting module with settings %d\n",myMod.reg); -//#endif + //#endif int i; for(i=0;i= 0) EigerSetNumberOfExposures((unsigned int)val); return EigerGetNumberOfExposures(); @@ -648,9 +649,9 @@ int64_t setTimer(enum timerIndex ind, int64_t val){ if(Feb_Control_SetNExposures((unsigned int)val*eiger_nexposures)){ eiger_ncycles = val; //SetDestinationParameters(EigerGetNumberOfExposures()*EigerGetNumberOfCycles()); - on_dst = 0; - int i; - for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested + on_dst = 0; + int i; + for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested nimages_per_request = eiger_nexposures * eiger_ncycles; } }return eiger_ncycles; @@ -678,12 +679,12 @@ int setDynamicRange(int dr){ if(Feb_Control_SetDynamicRange(dr)){ //EigerSetBitMode(dr); - on_dst = 0; - int i; - for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested - if(Beb_SetUpTransferParameters(dr)) - eiger_dynamicrange = dr; - else printf("ERROR:Could not set bit mode in the back end\n"); + on_dst = 0; + int i; + for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested + if(Beb_SetUpTransferParameters(dr)) + eiger_dynamicrange = dr; + else printf("ERROR:Could not set bit mode in the back end\n"); } } //make sure back end and front end have the same bit mode @@ -714,7 +715,7 @@ enum readOutFlags setReadOutFlags(enum readOutFlags val){ default:ret=-1; break; } - return ret; + return ret; } @@ -748,17 +749,17 @@ int configureMAC(int ipad, long long int macad, long long int detectormacadd, in sprintf(src_ip,"%d.%d.%d.%d",(detipad>>24)&0xff,(detipad>>16)&0xff,(detipad>>8)&0xff,(detipad)&0xff); sprintf(dst_ip,"%d.%d.%d.%d",(ipad>>24)&0xff,(ipad>>16)&0xff,(ipad>>8)&0xff,(ipad)&0xff); sprintf(src_mac,"%02x:%02x:%02x:%02x:%02x:%02x",(unsigned int)((detectormacadd>>40)&0xFF), - (unsigned int)((detectormacadd>>32)&0xFF), - (unsigned int)((detectormacadd>>24)&0xFF), - (unsigned int)((detectormacadd>>16)&0xFF), - (unsigned int)((detectormacadd>>8)&0xFF), - (unsigned int)((detectormacadd>>0)&0xFF)); + (unsigned int)((detectormacadd>>32)&0xFF), + (unsigned int)((detectormacadd>>24)&0xFF), + (unsigned int)((detectormacadd>>16)&0xFF), + (unsigned int)((detectormacadd>>8)&0xFF), + (unsigned int)((detectormacadd>>0)&0xFF)); sprintf(dst_mac,"%02x:%02x:%02x:%02x:%02x:%02x",(unsigned int)((macad>>40)&0xFF), - (unsigned int)((macad>>32)&0xFF), - (unsigned int)((macad>>24)&0xFF), - (unsigned int)((macad>>16)&0xFF), - (unsigned int)((macad>>8)&0xFF), - (unsigned int)((macad>>0)&0xFF)); + (unsigned int)((macad>>32)&0xFF), + (unsigned int)((macad>>24)&0xFF), + (unsigned int)((macad>>16)&0xFF), + (unsigned int)((macad>>8)&0xFF), + (unsigned int)((macad>>0)&0xFF)); printf("src_port:%d\n",src_port); printf("src_ip:%s\n",src_ip); @@ -775,27 +776,27 @@ int configureMAC(int ipad, long long int macad, long long int detectormacadd, in int i=0; /* for(i=0;i<32;i++){/** modified for Aldo*/ - if(Beb_SetBebSrcHeaderInfos(beb_num,send_to_ten_gig,src_mac,src_ip,src_port) && - Beb_SetUpUDPHeader(beb_num,send_to_ten_gig,header_number+i,dst_mac,dst_ip, dst_port)) - printf("set up left ok\n"); - else return -1; - /*}*/ + if(Beb_SetBebSrcHeaderInfos(beb_num,send_to_ten_gig,src_mac,src_ip,src_port) && + Beb_SetUpUDPHeader(beb_num,send_to_ten_gig,header_number+i,dst_mac,dst_ip, dst_port)) + printf("set up left ok\n"); + else return -1; + /*}*/ header_number = 32; dst_port = udpport2; printf("dst_port:%d\n\n",dst_port); - /*for(i=0;i<32;i++){*//** modified for Aldo*/ - if(Beb_SetBebSrcHeaderInfos(beb_num,send_to_ten_gig,src_mac,src_ip,src_port) && - Beb_SetUpUDPHeader(beb_num,send_to_ten_gig,header_number+i,dst_mac,dst_ip, dst_port)) - printf("set up right ok\n\n"); - else return -1; + /*for(i=0;i<32;i++){*//** modified for Aldo*/ + if(Beb_SetBebSrcHeaderInfos(beb_num,send_to_ten_gig,src_mac,src_ip,src_port) && + Beb_SetUpUDPHeader(beb_num,send_to_ten_gig,header_number+i,dst_mac,dst_ip, dst_port)) + printf("set up right ok\n\n"); + else return -1; /*}*/ - on_dst = 0; + on_dst = 0; - for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested - nimages_per_request=eiger_nexposures * eiger_ncycles; + for(i=0;i<32;i++) dst_requested[i] = 0; //clear dst requested + nimages_per_request=eiger_nexposures * eiger_ncycles; return 0; } @@ -947,8 +948,8 @@ enum externalCommunicationMode setTiming( enum externalCommunicationMode arg){ void setExternalGating(int enable[]){ if(enable>=0){ Feb_Control_SetExternalEnableMode(enable[0], enable[1]);//enable = 0 or 1, polarity = 0 or 1 , where 1 is positive - eiger_extgating = enable[0]; - eiger_extgatingpolarity = enable[1]; + eiger_extgating = enable[0]; + eiger_extgatingpolarity = enable[1]; } enable[0] = eiger_extgating; enable[1] = eiger_extgatingpolarity; diff --git a/slsDetectorSoftware/eigerDetectorServer/xparameters.h b/slsDetectorSoftware/eigerDetectorServer/xparameters.h index 06eed3092..b6ef24bcc 100644 --- a/slsDetectorSoftware/eigerDetectorServer/xparameters.h +++ b/slsDetectorSoftware/eigerDetectorServer/xparameters.h @@ -49,6 +49,8 @@ XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_BASEADDR #define XPAR_PLB_GPIO_SYS_BASEADDR 0xD1000000 #define XPAR_PLB_GPIO_SYS_HIGHADDR 0xD100FFFF +/* Master Slave Top Bottom Definition */ +#define MODULE_CONFIGURATION 0x84 /* Definitions for peripheral PLB_GPIO_TEST */ #define XPAR_PLB_GPIO_TEST_BASEADDR 0xD1010000 @@ -60,7 +62,7 @@ XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_BASEADDR #define XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_HIGHADDR 0xC410FFFF /* Definitions for a new memory */ -#define XPAR_PLB_LL_NEW_MEMORY 0xC4200000 +//#define XPAR_PLB_LL_NEW_MEMORY 0xD1000000//0xD1000084//0xC4200000 /* Definitions for peripheral PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT */ diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index bcd2e7a54..a04b6e03d 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -4542,7 +4542,7 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){ return NULL; } - int n; + int n,complete=OK; int i,k,offsetX, offsetY, maxX, maxY; double dr; int* retval=new int[nel]; int *retdet, *p=retval; @@ -4560,42 +4560,45 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){ retdet=detectors[id]->readFrameFromReceiver(fName,fIndex); if(detectors[id]->getErrorMask()) setErrorMask(getErrorMask()|(1<getDataBytes(); - - if(getDetectorsType() == EIGER){ - //cout << "fname:"<getMaxNumberOfChannels()<<" n:"<getMaxNumberOfChannels(); - //cout << "dr:"<getMaxNumberOfChannels(X)*dr);//bit mode - //cout << "k:"<offsetY[id] + detectors[id]->getMaxNumberOfChannels(Y))) * maxX)*dr);//bit mode - offsetX = (int)(thisMultiDetector->offsetX[id]*dr); - //cout << "offsetY"<getDataBytes(); + if(getDetectorsType() == EIGER){ + //cout << "fname:"<getMaxNumberOfChannels()<<" n:"<getMaxNumberOfChannels(); + //cout << "dr:"<getMaxNumberOfChannels(X)*dr);//bit mode + //cout << "k:"<offsetY[id] + detectors[id]->getMaxNumberOfChannels(Y))) * maxX)*dr);//bit mode + offsetX = (int)(thisMultiDetector->offsetX[id]*dr); + //cout << "offsetY"<= 0) { +#ifdef VERY_VERY_DEBUG + cout<<"GOT data"<