From 172fa66b1f64dca73de99cc088a36f4eb2af0ef1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 18 Aug 2016 11:57:36 +0200 Subject: [PATCH 01/48] hotfix for memory leak in server --- slsDetectorSoftware/eigerDetectorServer/Beb.c | 243 +++++++++--------- slsDetectorSoftware/eigerDetectorServer/Beb.h | 9 +- .../eigerDetectorServer/FebRegisterDefs.h | 1 + ...eigerDetectorServerv2.0.5.14.0.1-beamline} | Bin 277374 -> 277442 bytes .../slsDetectorServer_funcs.c | 7 +- 5 files changed, 126 insertions(+), 134 deletions(-) rename slsDetectorSoftware/eigerDetectorServer/bin/{eigerDetectorServerv2.0.5.14.0 => eigerDetectorServerv2.0.5.14.0.1-beamline} (59%) diff --git a/slsDetectorSoftware/eigerDetectorServer/Beb.c b/slsDetectorSoftware/eigerDetectorServer/Beb.c index 106e72730b..a2a8824d6b 100644 --- a/slsDetectorSoftware/eigerDetectorServer/Beb.c +++ b/slsDetectorSoftware/eigerDetectorServer/Beb.c @@ -44,7 +44,7 @@ unsigned int* Beb_recv_data; short Beb_bit_mode; - + int BEB_MMAP_SIZE = 0x1000; void BebInfo_BebInfo(struct BebInfo* bebInfo, unsigned int beb_num){ @@ -144,20 +144,19 @@ void Beb_Beb(){ } - void Beb_GetModuleCopnfiguration(int* master, int* top){ *top = 0; *master = 0; //mapping new memory to read master top module configuration - u_int32_t baseaddr; + u_int32_t* csp0base=0; int ret; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0){ cprintf(BG_RED,"Module Configuration FAIL\n"); }else{ //read data - ret = Beb_Read32(baseaddr, MODULE_CONFIGURATION_MASK); + ret = Beb_Read32(csp0base, MODULE_CONFIGURATION_MASK); printf("Module Configuration OK\n"); printf("Beb: value =0x%x\n",ret); if(ret&TOP_BIT_MASK) @@ -165,24 +164,25 @@ void Beb_GetModuleCopnfiguration(int* master, int* top){ if(ret&MASTER_BIT_MASK) *master = 1; //close file pointer - Beb_close(fd); + Beb_close(fd,csp0base); } } /* do not work at the moment */ int Beb_SetMasterViaSoftware(){ //mapping new memory - u_int32_t baseaddr, value = 0, ret = 1; + u_int32_t* csp0base=0; + u_int32_t value = 0, ret = 1; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0) cprintf(BG_RED,"Set Master FAIL\n"); else{ - value = Beb_Read32(baseaddr, MASTERCONFIG_OFFSET); + value = Beb_Read32(csp0base, MASTERCONFIG_OFFSET); value|=MASTER_BIT; value|=OVERWRITE_HARDWARE_BIT; - int newval = Beb_Write32(baseaddr, MASTERCONFIG_OFFSET,value); + int newval = Beb_Write32(csp0base, MASTERCONFIG_OFFSET,value); if(newval!=value) cprintf(BG_RED,"Could not set Master via Software\n"); else @@ -191,7 +191,7 @@ int Beb_SetMasterViaSoftware(){ //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return ret; } @@ -199,17 +199,18 @@ int Beb_SetMasterViaSoftware(){ /* do not work at the moment */ int Beb_SetSlaveViaSoftware(){ //mapping new memory - u_int32_t baseaddr, value = 0, ret = 1; + u_int32_t* csp0base=0; + u_int32_t value = 0, ret = 1; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0) cprintf(BG_RED,"Set Slave FAIL\n"); else{ - value = Beb_Read32(baseaddr, MASTERCONFIG_OFFSET); + value = Beb_Read32(csp0base, MASTERCONFIG_OFFSET); value&=~MASTER_BIT; value|=OVERWRITE_HARDWARE_BIT; - int newval = Beb_Write32(baseaddr, MASTERCONFIG_OFFSET,value); + int newval = Beb_Write32(csp0base, MASTERCONFIG_OFFSET,value); if(newval!=value) cprintf(BG_RED,"Could not set Slave via Software\n"); else @@ -218,29 +219,30 @@ int Beb_SetSlaveViaSoftware(){ //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return ret; } int Beb_Activate(int enable){ //mapping new memory - u_int32_t baseaddr, value = 0, ret = -1; + u_int32_t* csp0base=0; + u_int32_t value = 0, ret = -1; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0) cprintf(BG_RED,"Deactivate FAIL\n"); else{ if(enable > -1){ - value = Beb_Read32(baseaddr, MASTERCONFIG_OFFSET); + value = Beb_Read32(csp0base, MASTERCONFIG_OFFSET); printf("Deactivate register value before:%d\n",value); if(enable) value&=~DEACTIVATE_BIT; else value|=DEACTIVATE_BIT; - int newval = Beb_Write32(baseaddr, MASTERCONFIG_OFFSET,value); + int newval = Beb_Write32(csp0base, MASTERCONFIG_OFFSET,value); if(newval!=value){ if(enable) cprintf(BG_RED,"Could not activate via Software\n"); @@ -249,7 +251,7 @@ int Beb_Activate(int enable){ } } - value = Beb_Read32(baseaddr, MASTERCONFIG_OFFSET); + value = Beb_Read32(csp0base, MASTERCONFIG_OFFSET); if(value&DEACTIVATE_BIT) ret = 0; else ret = 1; if(enable == -1){ @@ -262,7 +264,7 @@ int Beb_Activate(int enable){ } //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return ret; } @@ -270,7 +272,8 @@ int Beb_Activate(int enable){ int Beb_SetNetworkParameter(enum detNetworkParameter mode, int val){ //mapping new memory - u_int32_t baseaddr, valueread = 0; + u_int32_t* csp0base=0; + u_int32_t valueread = 0; u_int32_t offset = TXM_DELAY_LEFT_OFFSET; char modename[100] = ""; @@ -295,40 +298,40 @@ int Beb_SetNetworkParameter(enum detNetworkParameter mode, int val){ default: cprintf(BG_RED,"Unrecognized mode in network parameter: %d\n",mode); return -1; } //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0){ cprintf(BG_RED,"Could not read register to set network parameter. FAIL\n"); return -1; } else{ if(val > -1){ - valueread = Beb_Read32(baseaddr, offset); + valueread = Beb_Read32(csp0base, offset); //cprintf(BLUE, "%s value before:%d\n",modename,valueread); - Beb_Write32(baseaddr, offset,val); + Beb_Write32(csp0base, offset,val); cprintf(BLUE,"%s value:%d\n", modename,valueread); } - valueread = Beb_Read32(baseaddr, offset); + valueread = Beb_Read32(csp0base, offset); //cprintf(BLUE,"%s value:%d\n", modename,valueread); } //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return valueread; } - int Beb_ResetToHardwareSettings(){ //mapping new memory - u_int32_t baseaddr, value = 0, ret = 1; + u_int32_t* csp0base=0; + u_int32_t value = 0, ret = 1; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0) cprintf(BG_RED,"Reset to Hardware Settings FAIL\n"); else{ - value = Beb_Write32(baseaddr, MASTERCONFIG_OFFSET,0); + value = Beb_Write32(csp0base, MASTERCONFIG_OFFSET,0); if(value) cprintf(BG_RED,"Could not reset to hardware settings\n"); else @@ -337,7 +340,7 @@ int Beb_ResetToHardwareSettings(){ //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return ret; } @@ -346,21 +349,22 @@ int Beb_ResetToHardwareSettings(){ u_int32_t Beb_GetFirmwareRevision(){ //mapping new memory - u_int32_t baseaddr, value = 0; + u_int32_t* csp0base=0; + u_int32_t value = 0; //open file pointer - int fd = Beb_open(XPAR_VERSION,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_VERSION); if(fd < 0) cprintf(BG_RED,"Firmware Revision Read FAIL\n"); else{ - value = Beb_Read32(baseaddr, FIRMWARE_VERSION_OFFSET); + value = Beb_Read32(csp0base, FIRMWARE_VERSION_OFFSET); if(!value) cprintf(BG_RED,"Firmware Revision Number does not exist in this version\n"); } //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return value; } @@ -368,41 +372,42 @@ u_int32_t Beb_GetFirmwareRevision(){ u_int32_t Beb_GetFirmwareSoftwareAPIVersion(){ //mapping new memory - u_int32_t baseaddr, value = 0; + u_int32_t* csp0base=0; + u_int32_t value = 0; //open file pointer - int fd = Beb_open(XPAR_VERSION,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_VERSION); if(fd < 0) cprintf(BG_RED,"Firmware Software API Version Read FAIL\n"); else{ - value = Beb_Read32(baseaddr, FIRMWARESOFTWARE_API_OFFSET); + value = Beb_Read32(csp0base, FIRMWARESOFTWARE_API_OFFSET); if(!value) cprintf(BG_RED,"Firmware Software API Version does not exist in this version\n"); } //close file pointer if(fd > 0) - Beb_close(fd); + Beb_close(fd,csp0base); return value; } void Beb_ResetFrameNumber(){ //mapping new memory to read master top module configuration - u_int32_t baseaddr; + u_int32_t* csp0base=0; //open file pointer - int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_PLB_GPIO_SYS_BASEADDR); if(fd < 0){ cprintf(BG_RED,"Reset Frame Number FAIL\n"); }else{ //write a 1 - Beb_Write32(baseaddr, FRAME_NUM_RESET_OFFSET, 1); + Beb_Write32(csp0base, FRAME_NUM_RESET_OFFSET, 1); usleep(100000); //100ms //write a 0 - Beb_Write32(baseaddr, FRAME_NUM_RESET_OFFSET, 0); + Beb_Write32(csp0base, FRAME_NUM_RESET_OFFSET, 0); printf("Frame Number Reset OK\n"); //close file pointer - Beb_close(fd); + Beb_close(fd,csp0base); } } @@ -583,8 +588,7 @@ int Beb_SetByteOrder(){ int Beb_SetUpUDPHeader(unsigned int beb_number, int ten_gig, unsigned int header_number, char* dst_mac, char* dst_ip, unsigned int dst_port){ u_int32_t bram_phy_addr; - volatile u_int32_t* bram_ptr; - bram_ptr = NULL; + u_int32_t* csp0base=0; if (ten_gig) bram_phy_addr = 0xC6002000; else @@ -592,29 +596,22 @@ int Beb_SetUpUDPHeader(unsigned int beb_number, int ten_gig, unsigned int header if(!Beb_SetHeaderData(beb_number,ten_gig,dst_mac,dst_ip,dst_port)) return 0; - int fd = open("/dev/mem", O_RDWR | O_SYNC, 0); - if (fd == -1) - cprintf(BG_RED,"\nCan't find /dev/mem!\n"); - else{ -#ifdef VERBOSE - printf("/dev/mem opened\n"); -#endif - bram_ptr = mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, bram_phy_addr); - if (bram_ptr == MAP_FAILED) { - cprintf(BG_RED,"\nCan't map memmory area!!\n"); - fd = -1; - } -#ifdef VERBOSE - else printf("CSP0 mapped\n"); -#endif - } - memcpy(bram_ptr+header_number*16, &udp_header, sizeof(udp_header)); - close(fd); + + int fd = Beb_open(&csp0base,bram_phy_addr); + if(fd < 0){ + cprintf(BG_RED,"Set up UDP Header FAIL\n"); + }else{ + //read data + memcpy(csp0base+header_number*16, &udp_header, sizeof(udp_header)); + //close file pointer + Beb_close(fd,csp0base); + } return 1; } + //int Beb_SetUpUDPHeader(unsigned int beb_number, int ten_gig, unsigned int header_number, char* dst_mac, char* dst_ip, unsigned int dst_port){ // unsigned int i = 1;/*Beb_GetBebInfoIndex(beb_number);*/ // @@ -814,27 +811,27 @@ int Beb_SetUpTransferParameters(short the_bit_mode){ int Beb_StopAcquisition() { - u_int32_t baseaddr; + u_int32_t* csp0base=0; volatile u_int32_t valuel,valuer; //open file pointer - int fd = Beb_open(XPAR_CMD_GENERATOR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_CMD_GENERATOR); if(fd < 0){ cprintf(BG_RED,"Beb Stop Acquisition FAIL\n"); return 0; }else{ //find value - valuel = Beb_Read32(baseaddr, (LEFT_OFFSET+STOP_ACQ_OFFSET)); - valuer = Beb_Read32(baseaddr, (RIGHT_OFFSET+STOP_ACQ_OFFSET)); + valuel = Beb_Read32(csp0base, (LEFT_OFFSET+STOP_ACQ_OFFSET)); + valuer = Beb_Read32(csp0base, (RIGHT_OFFSET+STOP_ACQ_OFFSET)); //high - Beb_Write32(baseaddr, (LEFT_OFFSET + STOP_ACQ_OFFSET),(valuel|STOP_ACQ_BIT)); - Beb_Write32(baseaddr, (RIGHT_OFFSET + STOP_ACQ_OFFSET),(valuer|STOP_ACQ_BIT)); + Beb_Write32(csp0base, (LEFT_OFFSET + STOP_ACQ_OFFSET),(valuel|STOP_ACQ_BIT)); + Beb_Write32(csp0base, (RIGHT_OFFSET + STOP_ACQ_OFFSET),(valuer|STOP_ACQ_BIT)); //low - Beb_Write32(baseaddr, (LEFT_OFFSET + STOP_ACQ_OFFSET),(valuel&(~STOP_ACQ_BIT))); - Beb_Write32(baseaddr, (RIGHT_OFFSET + STOP_ACQ_OFFSET),(valuer&(~STOP_ACQ_BIT))); + Beb_Write32(csp0base, (LEFT_OFFSET + STOP_ACQ_OFFSET),(valuel&(~STOP_ACQ_BIT))); + Beb_Write32(csp0base, (RIGHT_OFFSET + STOP_ACQ_OFFSET),(valuer&(~STOP_ACQ_BIT))); printf("Beb Stop Acquisition OK\n"); //close file pointer - Beb_close(fd); + Beb_close(fd,csp0base); } return 1; } @@ -889,10 +886,10 @@ int Beb_RequestNImages(unsigned int beb_number, int ten_gig, unsigned int dst_nu u_int32_t right_port_value = 0x2000; - u_int32_t baseaddr; + u_int32_t* csp0base=0; volatile u_int32_t value; //open file pointer - int fd = Beb_open(XPAR_CMD_GENERATOR,&baseaddr); + int fd = Beb_open(&csp0base,XPAR_CMD_GENERATOR); if(fd < 0){ cprintf(BG_RED,"Beb Request N Images FAIL\n"); return 0; @@ -915,27 +912,27 @@ int Beb_RequestNImages(unsigned int beb_number, int ten_gig, unsigned int dst_nu //"0x20 << 8" is dst_number (0x00 for left, 0x20 for right) //Left - Beb_Write32(baseaddr, (LEFT_OFFSET + FIRST_CMD_PART1_OFFSET),0); - Beb_Write32(baseaddr, (LEFT_OFFSET + FIRST_CMD_PART2_OFFSET),send_header_command); - Beb_Write32(baseaddr, (LEFT_OFFSET + SECOND_CMD_PART1_OFFSET),0); - Beb_Write32(baseaddr, (LEFT_OFFSET + SECOND_CMD_PART2_OFFSET),send_frame_command); - value = Beb_Read32(baseaddr,(LEFT_OFFSET + TWO_REQUESTS_OFFSET)); - if(in_two_requests) Beb_Write32(baseaddr, (LEFT_OFFSET + TWO_REQUESTS_OFFSET),(value | TWO_REQUESTS_BIT)); - else Beb_Write32(baseaddr, (LEFT_OFFSET + TWO_REQUESTS_OFFSET),(value &~(TWO_REQUESTS_BIT))); + Beb_Write32(csp0base, (LEFT_OFFSET + FIRST_CMD_PART1_OFFSET),0); + Beb_Write32(csp0base, (LEFT_OFFSET + FIRST_CMD_PART2_OFFSET),send_header_command); + Beb_Write32(csp0base, (LEFT_OFFSET + SECOND_CMD_PART1_OFFSET),0); + Beb_Write32(csp0base, (LEFT_OFFSET + SECOND_CMD_PART2_OFFSET),send_frame_command); + value = Beb_Read32(csp0base,(LEFT_OFFSET + TWO_REQUESTS_OFFSET)); + if(in_two_requests) Beb_Write32(csp0base, (LEFT_OFFSET + TWO_REQUESTS_OFFSET),(value | TWO_REQUESTS_BIT)); + else Beb_Write32(csp0base, (LEFT_OFFSET + TWO_REQUESTS_OFFSET),(value &~(TWO_REQUESTS_BIT))); // Right - Beb_Write32(baseaddr, (RIGHT_OFFSET + FIRST_CMD_PART1_OFFSET),0); - Beb_Write32(baseaddr, (RIGHT_OFFSET + FIRST_CMD_PART2_OFFSET),send_header_command | right_port_value); - Beb_Write32(baseaddr, (RIGHT_OFFSET + SECOND_CMD_PART1_OFFSET),0); - Beb_Write32(baseaddr, (RIGHT_OFFSET + SECOND_CMD_PART2_OFFSET),send_frame_command | right_port_value); - value = Beb_Read32(baseaddr,(RIGHT_OFFSET + TWO_REQUESTS_OFFSET)); - if(in_two_requests) Beb_Write32(baseaddr, (RIGHT_OFFSET + TWO_REQUESTS_OFFSET),(value | TWO_REQUESTS_BIT)); - else Beb_Write32(baseaddr, (RIGHT_OFFSET + TWO_REQUESTS_OFFSET),(value &~(TWO_REQUESTS_BIT))); + Beb_Write32(csp0base, (RIGHT_OFFSET + FIRST_CMD_PART1_OFFSET),0); + Beb_Write32(csp0base, (RIGHT_OFFSET + FIRST_CMD_PART2_OFFSET),send_header_command | right_port_value); + Beb_Write32(csp0base, (RIGHT_OFFSET + SECOND_CMD_PART1_OFFSET),0); + Beb_Write32(csp0base, (RIGHT_OFFSET + SECOND_CMD_PART2_OFFSET),send_frame_command | right_port_value); + value = Beb_Read32(csp0base,(RIGHT_OFFSET + TWO_REQUESTS_OFFSET)); + if(in_two_requests) Beb_Write32(csp0base, (RIGHT_OFFSET + TWO_REQUESTS_OFFSET),(value | TWO_REQUESTS_BIT)); + else Beb_Write32(csp0base, (RIGHT_OFFSET + TWO_REQUESTS_OFFSET),(value &~(TWO_REQUESTS_BIT))); // Set number of frames - Beb_Write32(baseaddr, (LEFT_OFFSET + COMMAND_COUNTER_OFFSET), nimages*(2+in_two_requests)); - Beb_Write32(baseaddr, (RIGHT_OFFSET + COMMAND_COUNTER_OFFSET), nimages*(2+in_two_requests)); + Beb_Write32(csp0base, (LEFT_OFFSET + COMMAND_COUNTER_OFFSET), nimages*(2+in_two_requests)); + Beb_Write32(csp0base, (RIGHT_OFFSET + COMMAND_COUNTER_OFFSET), nimages*(2+in_two_requests)); #ifdef MARTIN for (i=0; i < 10; i++) @@ -943,7 +940,7 @@ int Beb_RequestNImages(unsigned int beb_number, int ten_gig, unsigned int dst_nu printf("%d\n",in_two_requests); #endif - Beb_close(fd); + Beb_close(fd,csp0base); #ifdef MARTIN printf("----Beb_RequestNImages----\n"); @@ -991,31 +988,22 @@ int Beb_Test(unsigned int beb_number){ // Temperature value is cropped and not well rounded int Beb_GetBebFPGATemp() { - int temperature=0; - volatile u_int32_t *ptr1; - int fd; - - fd = open("/dev/mem", O_RDWR | O_SYNC, 0); - if (fd == -1) - { - printf("\nCan't find /dev/mem!\n"); - return 0; - } - - u_int32_t CSP0BASE = (u_int32_t)mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, XPAR_SYSMON_0_BASEADDR ); - if (CSP0BASE == (u_int32_t)MAP_FAILED) - { - printf("\nCan't map memmory area!!\n"); - return 0; + u_int32_t* csp0base=0; + int temperature=0; + int ret; + //open file pointer + int fd = Beb_open(&csp0base,XPAR_SYSMON_0_BASEADDR); + if(fd < 0){ + cprintf(BG_RED,"Module Configuration FAIL\n"); + }else{ + //read data + ret = Beb_Read32(csp0base, FPGA_TEMP_OFFSET); + temperature = ((((float)(ret)/65536.0f)/0.00198421639f ) - 273.15f); // Static conversation, copied from xps sysmon standalone driver + //close file pointer + Beb_close(fd,csp0base); } - ptr1=(u_int32_t*)(CSP0BASE + 0x200); // temperature register in xps sysmon core is at 0x200 - close(fd); - - temperature = ((((float)(*ptr1)/65536.0f)/0.00198421639f ) - 273.15f); // Static conversation, copied from xps sysmon standalone driver - - return temperature; } @@ -1023,7 +1011,7 @@ int Beb_GetBebFPGATemp() -int Beb_open(u_int32_t baseaddr, u_int32_t* csp0base){ +int Beb_open(u_int32_t** csp0base, u_int32_t offset){ int fd = open("/dev/mem", O_RDWR | O_SYNC, 0); if (fd == -1) @@ -1032,33 +1020,34 @@ int Beb_open(u_int32_t baseaddr, u_int32_t* csp0base){ #ifdef VERBOSE printf("/dev/mem opened\n"); #endif - *csp0base = (u_int32_t)mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, baseaddr); - if (*csp0base == (u_int32_t)MAP_FAILED) { + *csp0base = (u_int32_t*)mmap(0, BEB_MMAP_SIZE, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, offset); + if (*csp0base == MAP_FAILED) { cprintf(BG_RED,"\nCan't map memmory area!!\n"); fd = -1; } #ifdef VERBOSE - else printf("CSP0 mapped\n"); + else printf("CSP0 mapped %p\n",(void*)*csp0base); #endif } return fd; } -u_int32_t Beb_Read32 (u_int32_t baseaddr, u_int32_t offset){ - volatile u_int32_t *ptr1; - ptr1=(u_int32_t*)(baseaddr + offset); - return *ptr1; +u_int32_t Beb_Read32 (u_int32_t* baseaddr, u_int32_t offset){ + volatile u_int32_t value; + value=* (u_int32_t*)(baseaddr + offset/(sizeof(u_int32_t))); + return value; } -u_int32_t Beb_Write32 (u_int32_t baseaddr, u_int32_t offset, u_int32_t data){ +u_int32_t Beb_Write32 (u_int32_t* baseaddr, u_int32_t offset, u_int32_t data){ volatile u_int32_t *ptr1; - ptr1=(u_int32_t*)(baseaddr + offset); + ptr1=(u_int32_t*)(baseaddr + offset/(sizeof(u_int32_t))); *ptr1 = data; return *ptr1; } -void Beb_close(int fd){ +void Beb_close(int fd,u_int32_t* csp0base){ if(fd >= 0) close(fd); + munmap(csp0base,BEB_MMAP_SIZE); } diff --git a/slsDetectorSoftware/eigerDetectorServer/Beb.h b/slsDetectorSoftware/eigerDetectorServer/Beb.h index e5ddedeb08..1c8efa5188 100644 --- a/slsDetectorSoftware/eigerDetectorServer/Beb.h +++ b/slsDetectorSoftware/eigerDetectorServer/Beb.h @@ -88,10 +88,11 @@ struct BebInfo{ int Beb_GetBebFPGATemp(); - int Beb_open(u_int32_t baseaddr, u_int32_t* csp0base); - u_int32_t Beb_Read32 (u_int32_t baseaddr, u_int32_t offset); - u_int32_t Beb_Write32 (u_int32_t baseaddr, u_int32_t offset, u_int32_t data); - void Beb_close(int fd); + int Beb_open(u_int32_t** csp0base, u_int32_t offset); + u_int32_t Beb_Read32 (u_int32_t* baseaddr, u_int32_t offset); + u_int32_t Beb_Write32 (u_int32_t* baseaddr, u_int32_t offset, u_int32_t data); + void Beb_close(int fd,u_int32_t* csp0base); + #endif diff --git a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h index f1cc52140a..7bfd919ff9 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h @@ -121,6 +121,7 @@ #define MASTER_BIT 0x1 #define OVERWRITE_HARDWARE_BIT 0x2 #define DEACTIVATE_BIT 0x4 +#define FPGA_TEMP_OFFSET 0x200 #define TXM_DELAY_LEFT_OFFSET 0x180 #define TXM_DELAY_RIGHT_OFFSET 0x1A0 diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.0.5.14.0 b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.0.5.14.0.1-beamline similarity index 59% rename from slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.0.5.14.0 rename to slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.0.5.14.0.1-beamline index b9b7cebb8a95d1e6ca063b8cb2e32d99afbbf564..71d0facee9f25665c67b01983c4b4c3d7e3d933f 100755 GIT binary patch delta 43795 zcmc${4SY?<_CLI5P7+C)utO4&*Aod6f)j#-goNNA2%?P&4n>0?2#q$HqoR!#O-vXn z2=x;8>TMJay&=LEgK=l^^@&y!DgXU|$| z)~s2xX3d(Hef;)|`u=~^k|2*$ilW3RhHKW+$Z2j{GZnfuvvhTkYo$VCek$EJ+T)x` z-;fV;A9W^-IywN}QcbjWnDaPd(TZ$%+{*e%yEw%H|;RInPCIeznH1^8cU z?Paa1bThML*DkD!Yb*A=>v9(4)`|@`_^>D3R5sB?J<@2&kHIvlf0|vRiqSo!9`IGJIspW z;j6vxt~lW0kwFtx!>)6R(%Vl!%ff991@3fr2~m96NyXi4*l?`y4Bc%FwcYJ*Rg{#i z0=Ds*Ss|`w+Bbw1KheW&NCrUltmcWfWGB1)M0dZ+!hiYa_WPI3R=BDmIk{Yk>1W$r z$%4JQke%G*LX9lj>*J99C54K+HB50Ad_m-!sHoIr8IlcVAuPkYVZ*=K@Pmeo2@TToI;3WhgHF3k-&Qz`X?=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`o~`}=XQR(%yWnIDgUyPScl@9}-Zjv_6>D!!}iV-y7YgDO_XZtGCszyqBB zpPo$!Z3-}6^(1pUAq}=zRebrFw;Oy=>FP{T=X$;!evL>C=lxTw8^f-Ksrclo(-Ep!BIepABH-4Rq*t?A%&T*G zq2s*f0q$<`FgR+}JVK8v!P?`RUT}H}<|x%oN>0(=5pO#Nf{#%(N5uSkHu?wD;ZMbz zwHk+fhZ%o0|3iT-Dm74BEM~$?@URo8tr7DcArG$EYA+CT&wg;b(ka5*+rTRoGj;E8 zL|%)wwpq;3MCe*0wG?I92Jkri_WWPlO2`Hf2pm{1=8t_aG^;`mkNcXT&sO{_&wc~b zYWYaLWr&AB{s5nSyHXq)5wD~bx~{IZpE2$uV5V|^{ZC{`$O|JN&OqWq@qcXNjk}2^ z(I{!p5VEjdNF=U6*l*5(#C76bMM{DQB)IX25%S<%k@zXU*6IQ4#FcnZyyBSOLE=vY z5-h*bjuZh3(ls^k3a49}l1b_y!?1~>3>K>d`-AV=oUU{9IxeM(I-xfyW-9;YG7L^s z%zj~3KQ+>)>wg_n;{lACP0BD2VZVWCb&Kua;=+KZ^rd2sw!lB6_>SO56yS53STv Date: Mon, 10 Oct 2016 08:17:34 +0200 Subject: [PATCH 02/48] fixed bug in gui that overwrites the individual sls file path values with the multi value --- slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index f902e24d70..d33ba18a56 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -4674,7 +4674,8 @@ string multiSlsDetector::checkReceiverOnline() { string multiSlsDetector::setFilePath(string s) { string ret="errorerror", ret1; - if(!s.empty()){ + //if the sls file paths are different, it should be realized by always using setfilepath even if string empty + //if(!s.empty()){ for (int idet=0; idetnumberOfDetectors; idet++) { if (detectors[idet]) { @@ -4688,7 +4689,7 @@ string multiSlsDetector::setFilePath(string s) { } } fileIO::setFilePath(ret); - } + //} return fileIO::getFilePath(); } From 64fd82f92c91eb19e981e644a22bdc3049c9192c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Mon, 10 Oct 2016 08:39:46 +0200 Subject: [PATCH 03/48] fixed bug in gui that overwrites the individual sls file path values with the multi value, included a febl and febr temp read --- .../commonFiles/sls_detector_defs.h | 2 ++ .../commonFiles/sls_detector_funcs.h | 1 - .../eigerDetectorServer/FebControl.c | 19 ++++++++++++++++++ .../eigerDetectorServer/FebControl.h | 5 ++++- .../eigerDetectorServer/FebRegisterDefs.h | 2 ++ ....0.14.0 => eigerDetectorServerv2.1.0.14.1} | Bin 277482 -> 277923 bytes .../slsDetectorFunctionList.c | 6 ++++++ .../slsDetectorServer_defs.h | 2 +- .../slsDetector/slsDetectorCommand.cpp | 17 ++++++++++++++++ .../slsDetectorServer_funcs.c | 12 ++++++++--- 10 files changed, 60 insertions(+), 6 deletions(-) rename slsDetectorSoftware/eigerDetectorServer/bin/{eigerDetectorServerv2.1.0.14.0 => eigerDetectorServerv2.1.0.14.1} (56%) diff --git a/slsDetectorSoftware/commonFiles/sls_detector_defs.h b/slsDetectorSoftware/commonFiles/sls_detector_defs.h index d4fce83e81..ddc7d62c6f 100755 --- a/slsDetectorSoftware/commonFiles/sls_detector_defs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_defs.h @@ -362,6 +362,8 @@ enum dacIndex { TEMPERATURE_DCDC, /**< temperature sensor (close to DCDC) */ TEMPERATURE_SODL, /**< temperature sensor (close to SODL) */ TEMPERATURE_SODR, /**< temperature sensor (close to SODR) */ + TEMPERATURE_FPGA2, /**< temperature sensor (fpga2 (eiger:febl) */ + TEMPERATURE_FPGA3, /**< temperature sensor (fpga3 (eiger:febr) */ V_POWER_A = 100, /**new chiptest board */ V_POWER_B = 101, /**new chiptest board */ V_POWER_C = 102, /**new chiptest board */ diff --git a/slsDetectorSoftware/commonFiles/sls_detector_funcs.h b/slsDetectorSoftware/commonFiles/sls_detector_funcs.h index 047f0c10b0..c4fa4cb66e 100644 --- a/slsDetectorSoftware/commonFiles/sls_detector_funcs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_funcs.h @@ -103,7 +103,6 @@ enum { F_SET_RATE_CORRECT, /** < set/reset rate correction tau */ F_GET_RATE_CORRECT, /** < get rate correction tau */ - F_ACTIVATE, /** < activate/deactivate readout */ F_SET_NETWORK_PARAMETER /**< set network parameters such as transmission delay, flow control */ /* Always append functions hereafter!!! */ diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index a07d6b2fbb..e9ee781f35 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -1968,3 +1968,22 @@ int Feb_Control_PrintCorrectedValues(){ return 1; } + +int Feb_Control_GetLeftFPGATemp(){ + unsigned int temperature=0; + Feb_Interface_ReadRegister(Module_GetTopLeftAddress (&modules[1]),FEB_REG_STATUS, &temperature); + temperature = temperature >> 16; + //division done in client to send int over network + return temperature; +} + +int Feb_Control_GetRightFPGATemp(){ + unsigned int temperature=0; + Feb_Interface_ReadRegister(Module_GetTopRightAddress (&modules[1]),FEB_REG_STATUS, &temperature); + temperature = temperature >> 16; + //division done in client to send int over network + return (int)temperature; +} + + + diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.h b/slsDetectorSoftware/eigerDetectorServer/FebControl.h index cb87558ad5..62ba70a174 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.h @@ -192,4 +192,7 @@ int Feb_Control_GetModuleNumber(); void Feb_Control_SetRateCorrectionVariable(int activate_rate_correction); int Feb_Control_PrintCorrectedValues(); -#endif + int Feb_Control_GetLeftFPGATemp(); + int Feb_Control_GetRightFPGATemp(); + + #endif diff --git a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h index 1dbd97b599..dc88de3a10 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h @@ -149,3 +149,5 @@ #define FRAME_NUM_RESET_OFFSET 0xA0 +//temp so far +#define FEB_REG_STATUS 0xa diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.0.14.0 b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.0.14.1 similarity index 56% rename from slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.0.14.0 rename to slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.0.14.1 index 2060a26d530118f4b6ffac9926d498b52b516cda..6dce1aa1da668603efd332f21d15315d34710ff2 100755 GIT binary patch delta 52563 zcmc${eOy&l);NCl0Tr%@R|7;uxF8~L>IJbtLD5i;ii(QwZ&yV_MMXoy!tSNCut?F3 zZZs?$FNH-#qmEjZSlVD?6HVIK3{E)dGdf|>q?0!4{jIgnKKGt`(Rt?k{GQME`^V+% zm$lbkd+oK>UVH6*4uAjIxc^_q@<{nxpY2hLhV3hrWcW!^2Z_L63I0Of=%xN7Nv@UT zgd0%aNz}_we+cUNZ~Li-4SVkxW%YN^o2>GZl~!8lJyEWWIe5x@qPKN_lO*{DAZDXi zZHy#^J*1{<&O%>-B7F`z($dY6Y=5JB`H`-Z<3@CEnOx_y|i?NB!z0}DoN_CrR|awuBGcF z$)u$ZNm2x+t-$uzj!ROcR&h#_`e^C1k`$$-&q-2WE!`|h{j~IDNs7_Zt&$Y0rEf@5 zoR+>LN%126y0;`HXlXy_zrU6VkfZ@xI#iMdYUwCRGHdAsNlMhx$&!?$rPCy7ke1Gr zq+~6fB}s#|bdDrF%+nPSj<#YS`L%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jA3}g65w_lXGM|mT_1c}&p4BeDZ4>0Wqdh_a6l2x_$utM z5X2_W8(Ftval@z(O%}b@$hrgE)`bFGSvC5@eKcUO030g}u0(}?#!r$F2D+uN3;dhm zl1+ddlv%C7+M)scdlI4(m}4euAL#V~I!uxE5egat1;Bp?ZXCnYv5URf;V+7G)QFgw z#=Upmu_kBM6}kDyEnlZ|v(%v|N5Y)^*~Z!*-o9+jJ$K%nGi&yYTnpX1e6@vU{2Oi7 aztJxDr$;+F6Z~eb Date: Mon, 10 Oct 2016 08:41:03 +0200 Subject: [PATCH 04/48] ask only 1 for frames caught for 9m --- .../multiSlsDetector/multiSlsDetector.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index d33ba18a56..5d6ef18f47 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -4932,6 +4932,16 @@ int multiSlsDetector::getReceiverCurrentFrameIndex() { int multiSlsDetector::resetFramesCaught() { int ret=-100, ret1; + + if(thisMultiDetector->numberOfDetectors>10) { + if (detectors[0]){ + ret =detectors[0]->getFramesCaughtByReceiver(); + if(detectors[0]->getErrorMask()) + setErrorMask(getErrorMask()|(1<<0)); + } + return ret; + } + for (int i=0; inumberOfDetectors; i++){ if (detectors[i]){ ret1=detectors[i]->resetFramesCaught(); From 7f293115c4710c9e5e0160df9b0eaf8873ae6aa8 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Mon, 10 Oct 2016 08:43:18 +0200 Subject: [PATCH 05/48] moved f_activate to receiver funcs from detectors funcs --- slsReceiverSoftware/include/sls_receiver_funcs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slsReceiverSoftware/include/sls_receiver_funcs.h b/slsReceiverSoftware/include/sls_receiver_funcs.h index e1ef930402..c5e99c1b96 100644 --- a/slsReceiverSoftware/include/sls_receiver_funcs.h +++ b/slsReceiverSoftware/include/sls_receiver_funcs.h @@ -49,7 +49,9 @@ enum { F_ENABLE_RECEIVER_OVERWRITE, /**< set overwrite flag in receiver */ F_ENABLE_RECEIVER_TEN_GIGA, /**< enable 10Gbe in receiver */ - F_SET_RECEIVER_FIFO_DEPTH /**< set receiver fifo depth */ + F_SET_RECEIVER_FIFO_DEPTH, /**< set receiver fifo depth */ + + F_ACTIVATE /** < activate/deactivate readout */ /* Always append functions hereafter!!! */ }; From 4a7e2466040542d164b037f6cd2f6aee3aeadec7 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Oct 2016 10:21:29 +0200 Subject: [PATCH 06/48] removed asking only 1 for framescaugh --- .../multiSlsDetector/multiSlsDetector.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 5d6ef18f47..aea44e42f8 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -4933,15 +4933,6 @@ int multiSlsDetector::getReceiverCurrentFrameIndex() { int multiSlsDetector::resetFramesCaught() { int ret=-100, ret1; - if(thisMultiDetector->numberOfDetectors>10) { - if (detectors[0]){ - ret =detectors[0]->getFramesCaughtByReceiver(); - if(detectors[0]->getErrorMask()) - setErrorMask(getErrorMask()|(1<<0)); - } - return ret; - } - for (int i=0; inumberOfDetectors; i++){ if (detectors[i]){ ret1=detectors[i]->resetFramesCaught(); From 839896c7e688f6c3fdd49593e4aa71fe65ade383 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Oct 2016 15:53:26 +0200 Subject: [PATCH 07/48] fixed the print file packet loss progress bug --- .../src/UDPStandardImplementation.cpp | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index d64692b658..bb758f6792 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1359,9 +1359,12 @@ int UDPStandardImplementation::setupWriter(){ int UDPStandardImplementation::createNewFile(){ FILE_LOG(logDEBUG) << __AT__ << " called"; + int index = 0; - if(packetsCaught) + if(packetsCaught){ index = frameIndex; + cout << endl << "File:" << completeFileName < Date: Thu, 6 Apr 2017 15:04:33 +0200 Subject: [PATCH 08/48] strtok is not thread safe..used to set receiver udp ip etc to detector, fixed --- .../slsDetector/slsDetector.cpp | 258 ++++++++++-------- 1 file changed, 141 insertions(+), 117 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 1e5a87d9da..f54f7f5db2 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -6041,151 +6041,175 @@ int slsDetector::setUDPConnection(){ int slsDetector::configureMAC(){ - int i; - int ret=FAIL; - int fnum=F_CONFIGURE_MAC,fnum2=F_RECEIVER_SHORT_FRAME; - char mess[MAX_STR_LENGTH]=""; - char arg[6][50]={"","","","","",""}; - char cword[50]="", *pcword; - string sword; - int retval=-1; + int i; + int ret=FAIL; + int fnum=F_CONFIGURE_MAC,fnum2=F_RECEIVER_SHORT_FRAME; + char mess[MAX_STR_LENGTH]=""; + char arg[6][50]={"","","","","",""}; + int retval=-1; - //if udpip wasnt initialized in config file - if(!(strcmp(thisDetector->receiverUDPIP,"none"))){ - //hostname is an ip address - if(strchr(thisDetector->receiver_hostname,'.')!=NULL) - strcpy(thisDetector->receiverUDPIP,thisDetector->receiver_hostname); - //if hostname not ip, convert it to ip - else{ - struct hostent *he = gethostbyname(thisDetector->receiver_hostname); - if (he != NULL) - strcpy(thisDetector->receiverUDPIP,inet_ntoa(*(struct in_addr*)he->h_addr)); - else{ - std::cout << "configure mac failed. no rx_udpip given and invalid receiver hostname" << endl; - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); - return FAIL; - } - } - } - strcpy(arg[0],thisDetector->receiverUDPIP); - strcpy(arg[1],thisDetector->receiverUDPMAC); - sprintf(arg[2],"%x",thisDetector->receiverUDPPort); - strcpy(arg[3],thisDetector->detectorMAC); - strcpy(arg[4],thisDetector->detectorIP); - sprintf(arg[5],"%x",thisDetector->receiverUDPPort2); + //if udpip wasnt initialized in config file + if(!(strcmp(thisDetector->receiverUDPIP,"none"))){ + //hostname is an ip address + if(strchr(thisDetector->receiver_hostname,'.')!=NULL) + strcpy(thisDetector->receiverUDPIP,thisDetector->receiver_hostname); + //if hostname not ip, convert it to ip + else{ + struct hostent *he = gethostbyname(thisDetector->receiver_hostname); + if (he != NULL) + strcpy(thisDetector->receiverUDPIP,inet_ntoa(*(struct in_addr*)he->h_addr)); + else{ + std::cout << "configure mac failed. no rx_udpip given and invalid receiver hostname" << endl; + setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + return FAIL; + } + } + } + strcpy(arg[0],thisDetector->receiverUDPIP); + strcpy(arg[1],thisDetector->receiverUDPMAC); + sprintf(arg[2],"%x",thisDetector->receiverUDPPort); + strcpy(arg[3],thisDetector->detectorMAC); + strcpy(arg[4],thisDetector->detectorIP); + sprintf(arg[5],"%x",thisDetector->receiverUDPPort2); #ifdef VERBOSE - std::cout<< "Configuring MAC"<< std::endl; + std::cout<< "Configuring MAC"<< std::endl; #endif - for(i=0;i<2;i++){ - if(!strcmp(arg[i],"none")){ - std::cout<< "Configure MAC Error. IP/MAC Addresses not set"<< std::endl; - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); - return FAIL; - } - } + for(i=0;i<2;i++){ + if(!strcmp(arg[i],"none")){ + std::cout<< "Configure MAC Error. IP/MAC Addresses not set"<< std::endl; + setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + return FAIL; + } + } #ifdef VERBOSE - std::cout<< "IP/MAC Addresses valid "<< std::endl; + std::cout<< "IP/MAC Addresses valid "<< std::endl; #endif - //converting IPaddress to hex. - pcword = strtok (arg[0],"."); - while (pcword != NULL) { - sprintf(arg[0],"%02x",atoi(pcword)); - strcat(cword,arg[0]); - pcword = strtok (NULL, "."); - } - strcpy(arg[0],cword); + + { + //converting IPaddress to hex + stringstream ss(arg[0]); + char cword[50]=""; + bzero(cword, 50); + string s; + while (getline(ss, s, '.')) { + sprintf(cword,"%s%02x",cword,atoi(s.c_str())); + } + bzero(arg[0], 50); + strcpy(arg[0],cword); #ifdef VERBOSE - std::cout<<"receiver udp ip:"<onlineFlag==ONLINE_FLAG) { - if (connectControl() == OK){ - controlSocket->SendDataOnly(&fnum,sizeof(fnum)); - controlSocket->SendDataOnly(arg,sizeof(arg)); - controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); - if (ret==FAIL){ - controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); - } - else - controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); - disconnectControl(); - if (ret==FORCE_UPDATE) - updateDetector(); - } - } - if (ret==FAIL) { - ret=FAIL; - std::cout<< "Configuring MAC failed " << std::endl; - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); - } - else if (thisDetector->myDetectorType==GOTTHARD){ - //set frames per file - only for gotthard - pthread_mutex_lock(&ms); - if(retval==-1) - setFramesPerFile(MAX_FRAMES_PER_FILE); - else - setFramesPerFile(SHORT_MAX_FRAMES_PER_FILE); - pthread_mutex_unlock(&ms); - //connect to receiver - if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ + //send to server + if (thisDetector->onlineFlag==ONLINE_FLAG) { + if (connectControl() == OK){ + controlSocket->SendDataOnly(&fnum,sizeof(fnum)); + controlSocket->SendDataOnly(arg,sizeof(arg)); + controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); + if (ret==FAIL){ + controlSocket->ReceiveDataOnly(mess,sizeof(mess)); + std::cout<< "Detector returned error: " << mess << std::endl; + setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + } + else + controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); + disconnectControl(); + if (ret==FORCE_UPDATE) + updateDetector(); + } + } + if (ret==FAIL) { + ret=FAIL; + std::cout<< "Configuring MAC failed " << std::endl; + setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + } + else if (thisDetector->myDetectorType==GOTTHARD){ + //set frames per file - only for gotthard + pthread_mutex_lock(&ms); + if(retval==-1) + setFramesPerFile(MAX_FRAMES_PER_FILE); + else + setFramesPerFile(SHORT_MAX_FRAMES_PER_FILE); + pthread_mutex_unlock(&ms); + //connect to receiver + if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending adc val to receiver " << retval << std::endl; + std::cout << "Sending adc val to receiver " << retval << std::endl; #endif - if (connectData() == OK){ - ret=thisReceiver->sendInt(fnum2,retval,retval); - disconnectData(); + if (connectData() == OK){ + ret=thisReceiver->sendInt(fnum2,retval,retval); + disconnectData(); + } + if(ret==FAIL) + setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + } } - if(ret==FAIL) - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); - } - } - return ret; + return ret; } From 5b3a911e8d44fef40d81797b2566990ff771ebb5 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:11:34 +0200 Subject: [PATCH 09/48] solved warnings except sscanf for uint64_t --- slsDetectorSoftware/Makefile | 2 +- .../multiSlsDetector/multiSlsDetector.cpp | 60 +- .../multiSlsDetector/multiSlsDetector.h | 2 +- .../slsDetector/slsDetector.cpp | 1052 ++++++++--------- .../slsDetector/slsDetectorCommand.cpp | 45 +- .../slsDetector/slsDetectorUtils.cpp | 8 +- .../angularConversionStatic.cpp | 4 +- .../slsDetectorAnalysis/energyConversion.cpp | 84 +- .../slsDetectorAnalysis/postProcessing.cpp | 9 +- slsDetectorSoftware/threadFiles/Task.h | 12 +- .../threadFiles/ThreadPool.cpp | 3 +- 11 files changed, 654 insertions(+), 627 deletions(-) diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index 36eda6c4cf..e28fae7905 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -69,7 +69,7 @@ gotthardVirtualServer: $(SRC_MYTHEN_SVC) %.o : %.cpp %.h Makefile - $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread -lrt $(LIBZMQ) #$(FLAGS) + $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread -lrt $(LIBZMQ) $(FLAGS) package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 6a838656dd..fb1ae4bda2 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -1173,11 +1173,11 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise if (ret==-100) ret=*iret[idet]; else if (ret<(*iret[idet]-200) || ret>(*iret[idet]+200)) - ret=-1; - delete iret[idet]; + ret=-1; }else ret=-1; if(detectors[idet]->getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<flatFieldFile); @@ -3334,8 +3334,6 @@ char* multiSlsDetector::setNetworkParameter(networkParameter p, string s){ if (s.find('+')==string::npos) { - int posmin=0, posmax=thisMultiDetector->numberOfDetectors; - if(!threadpool){ cout << "Error in creating threadpool. Exiting" << endl; return getNetworkParameter(p); @@ -3356,6 +3354,7 @@ char* multiSlsDetector::setNetworkParameter(networkParameter p, string s){ //doing nothing with the return values if(detectors[idet]->getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<executeLine(1,args,GET_ACTION) << std::endl; - + iline++; // single detector configuration for (int i=0; inumberOfDetectors; i++) { // sprintf(ext,".det%d",i); @@ -4544,6 +4541,7 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ cout << iv << " " << names[iv] << endl; strcpy(args[0],names[iv].c_str()); outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl; + iline++; } @@ -4555,7 +4553,7 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ return FAIL; } #ifdef VERBOSE - std::cout<< "wrote " <getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask(); #ifdef VERYVERBOSE //append sls det error mask - sprintf(sNumber,"0x%x",slsMask); + sprintf(sNumber,"0x%lx",slsMask); retval.append("Error Mask " + string(sNumber)+string("\n")); #endif //get the error critical level @@ -5804,10 +5802,10 @@ uint64_t multiSlsDetector::setCTBWord(int addr,uint64_t word) { ret1=detectors[idet]->setCTBWord(addr, word); if(detectors[idet]->getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<getErrorMask()) setErrorMask(getErrorMask()|(1<Connect()>=0) { s->SendDataOnly(&fnum,sizeof(fnum)); @@ -333,16 +333,16 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType(const char *name, int s->ReceiveDataOnly(&t,sizeof(t)); #ifdef VERBOSE - cout << "Detector type is "<< t << endl; + printf( "Detector type is %d \n", t ); #endif } else { s->ReceiveDataOnly(m,sizeof(m)); - std::cout<< "Detector returned error: " << m << std::endl; + printf( "Detector returned error: %s \n", m ); } s->Disconnect(); } else { - cout << "Cannot connect to server " << name << " over port " << cport << endl; + printf( "Cannot connect to server %s over port %d \n", name, cport ); } @@ -353,13 +353,13 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType(const char *name, int retval = FAIL; if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending detector type to Receiver " << (int)thisDetector->myDetectorType << std::endl; + printf( "Sending detector type to Receiver %d \n", (int)thisDetector->myDetectorType ); #endif if (connectData() == OK) retval=thisReceiver->sendInt(fnum2,k,(int)t); disconnectData(); if(retval==FAIL){ - cout << "ERROR: Could not send detector type to receiver" << endl; + printf( "ERROR: Could not send detector type to receiver \n" ); setErrorMask((getErrorMask())|(RECEIVER_DET_HOSTTYPE_NOT_SET)); } } @@ -387,12 +387,12 @@ int slsDetector::exists(int id) { #ifdef VERBOSE - cout << "getDetectorType: generic shared memory of size " << sz << endl; + printf( "getDetectorType: generic shared memory of size %d \n", sz ); #endif shm_id = shmget(mem_key,sz,IPC_CREAT | 0666); // allocate shared memory if (shm_id < 0) { - std::cout<<"*** shmget error (server) ***"<< shm_id << std::endl; + printf( "*** shmget error (server) ***%d \n", shm_id ); return -1; } @@ -403,7 +403,7 @@ int slsDetector::exists(int id) { sharedSlsDetector* det = (sharedSlsDetector*) shmat(shm_id, NULL, 0); /* attach */ if (det == (void*)-1) { - std::cout<<"*** shmat error (server) ***" << std::endl; + printf( "*** shmat error (server) *** \n" ); return -1; } /** @@ -457,12 +457,12 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType(int id) { #ifdef VERBOSE - cout << "getDetectorType: generic shared memory of size " << sz << endl; + printf( "getDetectorType: generic shared memory of size %d \n", sz ); #endif shm_id = shmget(mem_key,sz,IPC_CREAT | 0666); // allocate shared memory if (shm_id < 0) { - std::cout<<"*** shmget error (server) ***"<< shm_id << std::endl; + printf( "*** shmget error (server) ***%d \n", shm_id ); return t; } @@ -473,7 +473,7 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType(int id) { sharedSlsDetector* det = (sharedSlsDetector*) shmat(shm_id, NULL, 0); /* attach */ if (det == (void*)-1) { - std::cout<<"*** shmat error (server) ***" << std::endl; + printf( "*** shmat error (server) *** \n" ); return t; } /** @@ -504,7 +504,7 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType(int id) { } #ifdef VERBOSE - cout << "Detector type is " << t << endl; + printf( "Detector type is %d \n", t ); #endif return t; @@ -517,12 +517,12 @@ int slsDetector::initializeDetectorSize(detectorType type) { char *goff; goff=(char*)thisDetector; - // cout << "init detector size" << endl; + // printf( "init detector size \n" ); /** if the shared memory has newly be created, initialize the detector variables */ if (thisDetector->alreadyExisting==0) { - // cout << "detector not existing " << endl; + // printf( "detector not existing \n" ); /** set hostname to default */ strcpy(thisDetector->hostname,DEFAULT_HOSTNAME); @@ -567,7 +567,7 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->dynamicRange=24; thisDetector->moveFlag=1; #ifdef VERBOSE - cout << "move flag" << thisDetector->moveFlag<< endl; + printf( "move flag %d \n", thisDetector->moveFlag ); #endif break; case PICASSO: @@ -803,7 +803,7 @@ int slsDetector::initializeDetectorSize(detectorType type) { detectorModules=(sls_detector_module*)(goff+ thisDetector->modoff); #ifdef VERBOSE // for (int imod=0; imod< thisDetector->nModsMax; imod++) - // std::cout<< hex << detectorModules+imod << dec <nBadChans; @@ -826,7 +826,7 @@ int slsDetector::initializeDetectorSize(detectorType type) { } #ifdef VERBOSE - cout << "passing pointers" << endl; + printf( "passing pointers \n" ); #endif @@ -875,12 +875,14 @@ int slsDetector::initializeDetectorSize(detectorType type) { if (thisDetector->myDetectorType==JUNGFRAUCTB) setFramesPerFile(JFCTB_MAX_FRAMES_PER_FILE); pthread_mutex_unlock(&ms); + if (thisReceiver != NULL) + delete thisReceiver; thisReceiver = new receiverInterface(dataSocket); // setAngularConversionPointer(thisDetector->angOff,&thisDetector->nMods, thisDetector->nChans*thisDetector->nChips); #ifdef VERBOSE - cout << "done" << endl; + printf( "done \n" ); #endif @@ -888,7 +890,7 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->lastPID=getpid(); #ifdef VERBOSE - cout << "Det size initialized " << endl; + printf( "Det size initialized \n" ); #endif return OK; @@ -1075,12 +1077,12 @@ int slsDetector::sendChip(sls_detector_chip *myChip) { ts+=controlSocket->SendDataOnly(&(myChip->reg),sizeof(myChip->reg)); ts+=controlSocket->SendDataOnly(myChip->chanregs,sizeof(myChip->chanregs)); #ifdef VERY_VERBOSE - std::cout<< "chip structure sent" << std::endl; - std::cout<< "now sending " << myChip->nchan << " channles" << std::endl; + printf( "chip structure sent \n" ); + printf( "now sending %d channels \n", myChip->nchan ); #endif ts=controlSocket->SendDataOnly(myChip->chanregs,sizeof(int)*myChip->nchan ); #ifdef VERBOSE - std::cout<< "chip's channels sent " <chanregs=chanptr; #ifdef VERBOSE - std::cout<< "received module " << myMod->module << " of size "<< ts << " register " << myMod->reg << std::endl; + printf( "received module %d of size %d register %d \n", myMod->module, ts, myMod->reg ); #endif ts+=controlSocket->ReceiveDataOnly(myMod->dacs,sizeof(dacs_t)*(myMod->ndac)); #ifdef VERBOSE - std::cout<< "received dacs " << myMod->module << " of size "<< ts << std::endl; + printf( "received dacs %d of size %d \n", myMod->module, ts ); #endif ts+=controlSocket->ReceiveDataOnly(myMod->adcs,sizeof(dacs_t)*(myMod->nadc)); #ifdef VERBOSE - std::cout<< "received adcs " << myMod->module << " of size "<< ts << std::endl; + printf( "received adcs %d of size %d \n", myMod->module, ts ); #endif if(thisDetector->myDetectorType != JUNGFRAU){ ts+=controlSocket->ReceiveDataOnly(myMod->chipregs,sizeof(int)*(myMod->nchip)); #ifdef VERBOSE - std::cout<< "received chips " << myMod->module << " of size "<< ts << std::endl; + printf( "received chips %d of size %d \n", myMod->module, ts ); #endif ts+=controlSocket->ReceiveDataOnly(myMod->chanregs,sizeof(int)*(myMod->nchan)); #ifdef VERBOSE - std::cout<< "nchans= " << thisDetector->nChans << " nchips= " << thisDetector->nChips; - std::cout<< "mod - nchans= " << myMod->nchan << " nchips= " <nchip; - std::cout<< "received chans " << myMod->module << " of size "<< ts << std::endl; + printf( "nchans= %d nchips= %d\n", thisDetector->nChans, thisDetector->nChips ); + printf( "mod - nchans= %d nchips= %d \n", myMod->nchan, myMod->nchip ); + printf( "received chans %d of size %d \n", myMod->module, ts ); #endif } #ifdef VERBOSE - std::cout<< "received module " << myMod->module << " of size "<< ts << " register " << myMod->reg << std::endl; + printf( "received module %d of size %d register %d \n", myMod->module, ts, myMod->reg ); #endif return ts; @@ -1219,11 +1221,11 @@ int slsDetector::setOnline(int off) { if (thisDetector->onlineFlag==ONLINE_FLAG) { setTCPSocket(); if (thisDetector->onlineFlag==ONLINE_FLAG && old==OFFLINE_FLAG) { - cout << "Detector connecting for the first time - updating!" << endl; + printf( "Detector connecting for the first time - updating! \n" ); updateDetector(); } else if(thisDetector->onlineFlag==OFFLINE_FLAG){ - std::cout << "cannot connect to detector" << endl; + printf( "cannot connect to detector \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_DETECTOR)); } } @@ -1252,14 +1254,14 @@ string slsDetector::checkOnline() { controlSocket=NULL; retval = string(thisDetector->hostname); #ifdef VERBOSE - std::cout<< "offline!" << std::endl; + printf( "offline! \n" ); #endif } else { thisDetector->onlineFlag=ONLINE_FLAG; controlSocket->SetTimeOut(100); disconnectControl(); #ifdef VERBOSE - std::cout<< "online!" << std::endl; + printf( "online! \n" ); #endif } } @@ -1276,18 +1278,18 @@ int slsDetector::activate(int const enable){ int ret = OK; if(thisDetector->myDetectorType != EIGER){ - std::cout<< "Not implemented for this detector" << std::endl; + printf( "Not implemented for this detector \n" ); setErrorMask((getErrorMask())|(DETECTOR_ACTIVATE)); return -1; } #ifdef VERBOSE if(!enable) - std::cout<< "Deactivating Detector" << std::endl; + printf( "Deactivating Detector \n" ); else if(enable == -1) - std::cout<< "Getting Detector activate mode" << std::endl; + printf( "Getting Detector activate mode \n" ); else - std::cout<< "Activating Detector" << std::endl; + printf( "Activating Detector \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1296,7 +1298,7 @@ int slsDetector::activate(int const enable){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(DETECTOR_ACTIVATE)); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -1308,17 +1310,17 @@ int slsDetector::activate(int const enable){ } #ifdef VERBOSE if(retval==1) - std::cout << "Detector Activated" << std::endl; + printf( "Detector Activated \n" ); else if(retval==0) - std::cout << "Detector Deactivated" << std::endl; + printf( "Detector Deactivated \n" ); else - std::cout << "Detector Activation unknown:" << retval << std::endl; + printf( "Detector Activation unknown: %d", retval ); #endif if(ret!=FAIL){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Activating/Deactivating Receiver: " << retval << std::endl; + printf( "Activating/Deactivating Receiver: %d", retval ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,retval); @@ -1330,11 +1332,11 @@ int slsDetector::activate(int const enable){ } #ifdef VERBOSE if(retval==1) - std::cout << "Receiver Activated" << std::endl; + printf( "Receiver Activated \n" ); else if(retval==0) - std::cout << "Receiver Deactivated" << std::endl; + printf( "Receiver Deactivated \n" ); else - std::cout << "Receiver Activation unknown:" << retval << std::endl; + printf( "Receiver Activation unknown:%d", retval ); #endif @@ -1360,7 +1362,7 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con if (strcmp(name.c_str(),"")!=0) { #ifdef VERBOSE - std::cout<< "setting hostname" << std::endl; + printf( "setting hostname \n" ); #endif strcpy(thisName,name.c_str()); strcpy(thisDetector->hostname,thisName); @@ -1377,7 +1379,7 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con if (control_port>0) { #ifdef VERBOSE - std::cout<< "setting control port" << std::endl; + printf( "setting control port \n" ); #endif thisCP=control_port; thisDetector->controlPort=thisCP; @@ -1390,7 +1392,7 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con if (stop_port>0) { #ifdef VERBOSE - std::cout<< "setting stop port" << std::endl; + printf( "setting stop port \n" ); #endif thisSP=stop_port; thisDetector->stopPort=thisSP; @@ -1406,7 +1408,7 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con controlSocket= new MySocketTCP(thisName, thisCP); if (controlSocket->getErrorStatus()){ #ifdef VERBOSE - std::cout<< "Could not connect Control socket " << thisName << " " << thisCP << std::endl; + printf( "Could not connect Control socket %s %d \n", thisName, thisCP ); #endif delete controlSocket; controlSocket=NULL; @@ -1414,14 +1416,14 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con } #ifdef VERYVERBOSE else - std::cout<< "Control socket connected " <getErrorStatus()){ #ifdef VERBOSE - std::cout<< "Could not connect Stop socket "<onlineFlag=OFFLINE_FLAG; #ifdef VERBOSE - std::cout<< "offline!" << std::endl; + printf( "offline! \n" ); #endif } return retval; @@ -1450,7 +1452,7 @@ int slsDetector::connectControl() { if (controlSocket->Connect() >= 0) return OK; else{ - std::cout << "cannot connect to detector" << endl; + printf( "cannot connect to detector \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_DETECTOR)); return FAIL; } @@ -1472,7 +1474,7 @@ int slsDetector::connectData() { if (dataSocket->Connect() >= 0) return OK; else{ - std::cout << "cannot connect to receiver" << endl; + printf( "cannot connect to receiver \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_RECEIVER)); return FAIL;} } @@ -1492,7 +1494,7 @@ int slsDetector::connectStop() { if (stopSocket->Connect() >= 0) return OK; else{ - std::cout << "cannot connect to stop server" << endl; + printf( "cannot connect to stop server \n" ); return FAIL; } } @@ -1540,8 +1542,8 @@ int slsDetector::execCommand(string cmd, string answer){ strcpy(arg,cmd.c_str()); #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Sending command " << arg << std::endl; + printf( "\n" ); + printf( "Sending command %s \n", arg ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1556,7 +1558,7 @@ int slsDetector::execCommand(string cmd, string answer){ disconnectControl(); } #ifdef VERBOSE - std::cout<< "Detector answer is " << answer << std::endl; + printf( "Detector answer is %s \n", answer.c_str() ); #endif } return ret; @@ -1590,8 +1592,8 @@ int slsDetector::setDetectorType(detectorType const type){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Setting detector type to " << arg << std::endl; + printf( "\n" ); + printf( "Setting detector type to %d \n", arg ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1601,7 +1603,7 @@ int slsDetector::setDetectorType(detectorType const type){ controlSocket->ReceiveDataOnly(&retType,sizeof(retType)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s\n", mess ); } disconnectControl(); if (retval==FORCE_UPDATE) @@ -1617,10 +1619,10 @@ int slsDetector::setDetectorType(detectorType const type){ retval=OK; } #ifdef VERBOSE - std::cout<< "Detector type set to " << retType << std::endl; + printf( "Detector type set to %d \n", retType ); #endif if (retval==FAIL) { - std::cout<< "Set detector type failed " << std::endl; + printf( "Set detector type failed \n" ); retType=GENERIC; } else @@ -1632,14 +1634,14 @@ int slsDetector::setDetectorType(detectorType const type){ retval = FAIL; if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending detector type to Receiver " << (int)thisDetector->myDetectorType << std::endl; + printf( "Sending detector type to Receiver %d \n", (int)thisDetector->myDetectorType ); #endif if (connectData() == OK){ retval=thisReceiver->sendInt(fnum2,arg,(int)thisDetector->myDetectorType); disconnectData(); } if(retval==FAIL){ - cout << "ERROR: Could not send detector type to receiver" << endl; + printf( "ERROR: Could not send detector type to receiver \n" ); setErrorMask((getErrorMask())|(RECEIVER_DET_HOSTTYPE_NOT_SET)); } } @@ -1677,19 +1679,19 @@ int slsDetector::setNumberOfModules(int n, dimension d){ if (dY) { - std::cout<< "Set number of modules in wrong dimension " << d << std::endl; + printf( "Set number of modules in wrong dimension %d \n", d ); return ret; } #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Setting number of modules of dimension "<< d << " to " << n << std::endl; + printf( "\n" ); + printf( "Setting number of modules of dimension %d to %d \n", d, n ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { connect = connectControl(); if (connect == UNDEFINED) - cout << "no control socket?" << endl; + printf( "no control socket? \n" ); else if (connect == OK){ num = controlSocket->SendDataOnly(&fnum,sizeof(fnum)); num = controlSocket->SendDataOnly(&arg,sizeof(arg)); @@ -1698,14 +1700,14 @@ int slsDetector::setNumberOfModules(int n, dimension d){ num = controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) updateDetector(); } } else { - cout << "offline" << endl; + printf( "offline \n" ); ret=OK; if (n==GET_FLAG) ; @@ -1719,10 +1721,10 @@ int slsDetector::setNumberOfModules(int n, dimension d){ retval=thisDetector->nMod[d]; } #ifdef VERBOSE - std::cout<< "Number of modules in dimension "<< d <<" is " << retval << std::endl; + printf( "Number of modules in dimension %d is %d \n", d, retval ); #endif if (ret==FAIL) { - std::cout<< "Set number of modules failed " << std::endl; + printf( "Set number of modules failed \n" ); } else { thisDetector->nMod[d]=retval; thisDetector->nMods=thisDetector->nMod[X]*thisDetector->nMod[Y]; @@ -1763,8 +1765,8 @@ int slsDetector::setNumberOfModules(int n, dimension d){ } #ifdef VERBOSE - std::cout<< "Data size is " << thisDetector->dataBytes << std::endl; - std::cout<< "nModX " << thisDetector->nMod[X] << " nModY " << thisDetector->nMod[Y] << " nChips " << thisDetector->nChips << " nChans " << thisDetector->nChans<< " dr " << dr << std::endl; + printf( "Data size is %d \n", thisDetector->dataBytes ); + printf( "nModX %d nModY %d nChips %d nChans %d dr %d \n", thisDetector->nMod[X], thisDetector->nMod[Y], thisDetector->nChips, thisDetector->nChans, dr ); #endif } @@ -1787,12 +1789,12 @@ int slsDetector::getMaxNumberOfModules(dimension d){ char mess[MAX_STR_LENGTH]=""; if (dY) { - std::cout<< "Get max number of modules in wrong dimension " << d << std::endl; + printf( "Get max number of modules in wrong dimension %d \n", d ); return ret; } #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Getting max number of modules in dimension "<< d <onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1803,7 +1805,7 @@ int slsDetector::getMaxNumberOfModules(dimension d){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -1814,10 +1816,10 @@ int slsDetector::getMaxNumberOfModules(dimension d){ retval=thisDetector->nModMax[d]; } #ifdef VERBOSE - std::cout<< "Max number of modules in dimension "<< d <<" is " << retval << std::endl; + printf( "Max number of modules in dimension %d is %d \n", d, retval ); #endif if (ret==FAIL) { - std::cout<< "Get max number of modules failed " << retval << std::endl; + printf( "Get max number of modules failed %d\n", retval ); return retval; } else { thisDetector->nModMax[d]=retval; @@ -1837,19 +1839,18 @@ int slsDetector::setFlippedData(dimension d, int value){ int retval=-1; int fnum=F_SET_FLIPPED_DATA_RECEIVER; int ret=FAIL; - char mess[MAX_STR_LENGTH]=""; int args[2]={X,-1}; if(thisDetector->myDetectorType!= EIGER){ - std::cout << "Flipped Data is not implemented in this detector" << std::endl; + printf( "Flipped Data is not implemented in this detector \n" ); setErrorMask((getErrorMask())|(RECEIVER_FLIPPED_DATA_NOT_SET)); return -1; } #ifdef VERBOSE - std::cout << std::endl; - std::cout << "Setting/Getting flipped data across axis " << d <<" with value " << value << std::endl; + printf( " \n" ); + printf( "Setting/Getting flipped data across axis %d with value %d \n", d, value ); #endif if(value > -1){ thisDetector->flippedData[d] = value; @@ -1862,7 +1863,6 @@ int slsDetector::setFlippedData(dimension d, int value){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { if (connectData() == OK){ ret=thisReceiver->sendIntArray(fnum,retval,args); - disconnectData(); } @@ -1912,8 +1912,8 @@ slsDetectorDefs::externalSignalFlag slsDetector::setExternalSignalFlags(external retval=GET_EXTERNAL_SIGNAL_FLAG; #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Setting signal "<< signalindex << " to flag" << pol << std::endl; + printf( "\n" ); + printf( "Setting signal %d to flag %d \n", signalindex, pol ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1924,7 +1924,7 @@ slsDetectorDefs::externalSignalFlag slsDetector::setExternalSignalFlags(external controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -1935,9 +1935,9 @@ slsDetectorDefs::externalSignalFlag slsDetector::setExternalSignalFlags(external ret=FAIL; } #ifdef VERBOSE - std::cout<< "Signal "<< signalindex << " flag set to" << retval << std::endl; + printf( "Signal %d flag set to %d \n", signalindex, retval ); if (ret==FAIL) { - std::cout<< "Set signal flag failed " << std::endl; + printf( "Set signal flag failed \n" ); } #endif return retval; @@ -1982,8 +1982,8 @@ slsDetectorDefs::externalCommunicationMode slsDetector::setExternalCommunication retval=GET_EXTERNAL_COMMUNICATION_MODE; #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Setting communication to mode " << pol << std::endl; + printf( "\n" ); + printf( "Setting communication to mode %d \n", pol ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -1994,7 +1994,7 @@ slsDetectorDefs::externalCommunicationMode slsDetector::setExternalCommunication controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2005,10 +2005,10 @@ slsDetectorDefs::externalCommunicationMode slsDetector::setExternalCommunication ret=FAIL; } #ifdef VERBOSE - std::cout<< "Communication mode "<< " set to" << retval << std::endl; + printf( "Communication mode se to %d \n", retval ); #endif if (ret==FAIL) { - std::cout<< "Setting communication mode failed" << std::endl; + printf( "Setting communication mode failed \n" ); } return retval; @@ -2042,11 +2042,11 @@ int64_t slsDetector::getId( idMode mode, int imod){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< std::endl; + printf( "\n" ); if (mode==MODULE_SERIAL_NUMBER) - std::cout<< "Getting id of "<< imod << std::endl; + printf( "Getting id of %d \n", imod ); else - std::cout<< "Getting id type "<< mode << std::endl; + printf( "Getting id type %d \n", mode ); #endif if (mode==THIS_SOFTWARE_VERSION) { ret=OK; @@ -2075,7 +2075,7 @@ int64_t slsDetector::getId( idMode mode, int imod){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2084,14 +2084,14 @@ int64_t slsDetector::getId( idMode mode, int imod){ } } if (ret==FAIL) { - std::cout<< "Get id failed " << std::endl; + printf( "Get id failed \n" ); return ret; } else { #ifdef VERBOSE if (mode==MODULE_SERIAL_NUMBER) - std::cout<< "Id of "<< imod <<" is " << hex <onlineFlag==ONLINE_FLAG) { @@ -2137,7 +2137,7 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2147,10 +2147,10 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){ ret=FAIL; } #ifdef VERBOSE - std::cout<< "Id "<< mode <<" is " << retval << std::endl; + printf( "Id %d is %d \n", mode, retval ); #endif if (ret==FAIL) { - std::cout<< "Get id failed " << std::endl; + printf( "Get id failed \n" ); return ret; } else return retval; @@ -2168,7 +2168,7 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){ */ /* int* slsDetector::analogTest(analogTestMode mode){ - std::cout<< "function not yet implemented " << std::endl; + printf( "function not yet implemented \n" ); }; */ /* @@ -2184,7 +2184,7 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){ }; int slsDetector::enableAnalogOutput(int imod, int ichip, int ichan){ - std::cout<< "function not yet implemented " << std::endl; + printf( "function not yet implemented \n" ); }; */ /* @@ -2192,7 +2192,7 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){ */ /* int slsDetector::giveCalibrationPulse(double vcal, int npulses){ - std::cout<< "function not yet implemented " << std::endl; + printf( "function not yet implemented \n" ); }; */ // Expert low level functions @@ -2216,8 +2216,8 @@ int slsDetector::writeRegister(int addr, int val){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Writing to register "<< hex<onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -2228,7 +2228,7 @@ int slsDetector::writeRegister(int addr, int val){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2236,10 +2236,10 @@ int slsDetector::writeRegister(int addr, int val){ } } #ifdef VERBOSE - std::cout<< "Register returned "<< retval << std::endl; + printf( "Register returned %d \n", retval ); #endif if (ret==FAIL) { - std::cout<< "Write to register failed " << std::endl; + printf( "Write to register failed \n" ); } return retval; @@ -2261,8 +2261,8 @@ int slsDetector::writeAdcRegister(int addr, int val){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Writing to adc register "<< hex<onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -2273,7 +2273,7 @@ int slsDetector::writeAdcRegister(int addr, int val){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2281,10 +2281,10 @@ int slsDetector::writeAdcRegister(int addr, int val){ } } #ifdef VERBOSE - std::cout<< "ADC Register returned "<< retval << std::endl; + printf( "ADC Register returned %d \n", retval ); #endif if (ret==FAIL) { - std::cout<< "Write ADC to register failed " << std::endl; + printf( "Write ADC to register failed \n" ); } return retval; @@ -2307,8 +2307,8 @@ int slsDetector::readRegister(int addr){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Reading register "<< hex<onlineFlag==ONLINE_FLAG) { // if (connectControl() == OK){ @@ -2321,7 +2321,7 @@ int slsDetector::readRegister(int addr){ stopSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { stopSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectStop(); // if (ret==FORCE_UPDATE) @@ -2330,10 +2330,10 @@ int slsDetector::readRegister(int addr){ } } #ifdef VERBOSE - std::cout<< "Register returned "<< retval << std::endl; + printf( "Register returned %d \n", retval ); #endif if (ret==FAIL) { - std::cout<< "Read register failed " << std::endl; + printf( "Read register failed \n" ); } return retval; @@ -2367,7 +2367,7 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ int arg[3]; - if ( (thisDetector->myDetectorType == GOTTHARD) || (thisDetector->myDetectorType == PROPIX) && index==HV_NEW) + if ( ((thisDetector->myDetectorType == GOTTHARD) || (thisDetector->myDetectorType == PROPIX)) && (index == HV_NEW)) index=HV_POT; arg[0]=index; @@ -2376,8 +2376,8 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Setting DAC "<< index << " of module " << imod << " to " << val << std::endl; + printf( "\n" ); + printf( "Setting DAC %d of module %d to %d \n", index, imod, val ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -2401,7 +2401,7 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ } } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2410,10 +2410,10 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ } } #ifdef VERBOSE - std::cout<< "Dac set to "<< retval[0] << " dac units (" << retval[1] << "mV)" << std::endl; + printf( "Dac set to %d dac units (%dmV) \n", retval[0], retval[1] ); #endif if (ret==FAIL) { - std::cout<< "Set dac " << index << " of module " << imod << " to " << val << " failed." << std::endl; + printf( "Set dac %d of module %d to %d failed. \n", index, imod, val ); } if(mV) return retval[1]; @@ -2436,8 +2436,8 @@ dacs_t slsDetector::getADC(dacIndex index, int imod){ #ifdef VERBOSE - std::cout<< std::endl; - std::cout<< "Getting ADC "<< index << " of module " << imod << std::endl; + printf( "\n" ); + printf( "Getting ADC %d of module %d \n", index, imod ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -2451,7 +2451,7 @@ dacs_t slsDetector::getADC(dacIndex index, int imod){ } } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2459,10 +2459,10 @@ dacs_t slsDetector::getADC(dacIndex index, int imod){ } } #ifdef VERBOSE - std::cout<< "ADC returned "<< retval << std::endl; + printf( "ADC returned %d", retval ); #endif if (ret==FAIL) { - std::cout<< "Get ADC failed " << std::endl; + printf( "Get ADC failed \n" ); } return retval; @@ -2485,7 +2485,7 @@ dacs_t slsDetector::getADC(dacIndex index, int imod){ int slsDetector::setChannel(int64_t reg, int ichan, int ichip, int imod){ sls_detector_channel myChan; #ifdef VERBOSE - std::cout<< "Setting channel "<< ichan << " " << ichip << " " << imod << " to " << reg << std::endl; + printf( "Setting channel %d %d %d to %ld \n", ichan, ichip, imod, reg ); #endif //int mmin=imod, mmax=imod+1, chimin=ichip, chimax=ichip+1, chamin=ichan, chamax=ichan+1; @@ -2542,7 +2542,7 @@ int slsDetector::setChannel(sls_detector_channel chan){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2589,7 +2589,7 @@ int slsDetector::setChannel(sls_detector_channel chan){ } } #ifdef VERBOSE - std::cout<< "Channel register returned "<< retval << std::endl; + printf( "Channel register returned %d \n", retval ); #endif return retval; @@ -2633,7 +2633,7 @@ slsDetectorDefs::sls_detector_channel slsDetector::getChannel(int ichan, int ic receiveChannel(&myChan); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2649,7 +2649,7 @@ slsDetectorDefs::sls_detector_channel slsDetector::getChannel(int ichan, int ic } #ifdef VERBOSE - std::cout<< "Returned channel "<< ichan << " " << ichip << " " << imod << " " << myChan.reg << std::endl; + printf( "Returned channel %d %d %d %ld \n", ichan, ichip, imod, myChan.reg ); #endif return myChan; } @@ -2665,7 +2665,7 @@ int slsDetector::setChip(int reg, int ichip, int imod){ sls_detector_chip myChip; #ifdef VERBOSE - std::cout<< "Setting chip "<< ichip << " " << imod << " to " << reg << std::endl; + printf( "Setting chip %d %d to %d \n", ichip, imod, reg ); #endif @@ -2724,7 +2724,7 @@ int slsDetector::setChip(sls_detector_chip chip){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2739,7 +2739,7 @@ int slsDetector::setChip(sls_detector_chip chip){ } #ifdef VERBOSE - std::cout<< "Chip register returned "<< retval << std::endl; + printf( "Chip register returned %d \n", retval ); #endif return retval; }; @@ -2777,7 +2777,7 @@ slsDetectorDefs::sls_detector_chip slsDetector::getChip(int ichip, int imod){ receiveChip(&myChip); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -2795,7 +2795,7 @@ slsDetectorDefs::sls_detector_chip slsDetector::getChip(int ichip, int imod){ } } #ifdef VERBOSE - std::cout<< "Returned chip "<< ichip << " " << imod << " " << myChip.reg << std::endl; + printf( "Returned chip %d %d %d \n", ichip, imod, myChip.reg ); #endif return myChip; @@ -2813,7 +2813,7 @@ int slsDetector::setModule(int reg, int imod){ sls_detector_module myModule; #ifdef VERBOSE - std::cout << "slsDetector set module " << std::endl; + printf( "slsDetector set module \n" ); #endif int charegs[thisDetector->nChans*thisDetector->nChips]; int chiregs[thisDetector->nChips]; @@ -2897,7 +2897,7 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int #ifdef VERBOSE - std::cout << "slsDetector set module " << std::endl; + printf( "slsDetector set module \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -2922,7 +2922,7 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); if(strstr(mess,"default tau")!=NULL) setErrorMask((getErrorMask())|(RATE_CORRECTION_NO_TAU_PROVIDED)); } @@ -2987,7 +2987,7 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int } #ifdef VERBOSE - std::cout<< "Module register returned "<< retval << std::endl; + printf( "Module register returned %d \n", retval ); #endif return retval; @@ -3000,7 +3000,7 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ #ifdef VERBOSE - std::cout << "slsDetector get module " << std::endl; + printf( "slsDetector get module \n" ); #endif int fnum=F_GET_MODULE; @@ -3023,7 +3023,7 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ // int n; #ifdef VERBOSE - std::cout<< "getting module " << imod << std::endl; + printf( "getting module %d \n", imod ); #endif myMod->module=imod; @@ -3053,7 +3053,7 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ controlSocket->ReceiveDataOnly(offsetval,sizeof(int)*thisDetector->nOffset); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -3132,7 +3132,7 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ really needed? int slsDetector::setCalibration(int imod, detectorSettings isettings, double gain, double offset){ - std::cout<< "function not yet implemented " << std::endl; + printf( "function not yet implemented \n" ); @@ -3141,7 +3141,7 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ } int slsDetector::getCalibration(int imod, detectorSettings isettings, double &gain, double &offset){ - std::cout<< "function not yet implemented " << std::endl; + printf( "function not yet implemented \n" ); @@ -3159,7 +3159,7 @@ int slsDetector::getThresholdEnergy(int imod){ int ret=FAIL; char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Getting threshold energy "<< std::endl; + printf( "Getting threshold energy \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -3168,9 +3168,8 @@ int slsDetector::getThresholdEnergy(int imod){ controlSocket->SendDataOnly(&imod,sizeof(imod)); controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { - std::cout<< "Detector returned error: "<< std::endl; controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< mess << std::endl; + printf( "Detector returned error:%s \n", mess ); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); thisDetector->currentThresholdEV=retval; @@ -3196,7 +3195,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti int ret=FAIL; char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Setting threshold energy "<< std::endl; + printf( "Setting threshold energy \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -3206,12 +3205,11 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti controlSocket->SendDataOnly(&isettings,sizeof(isettings)); controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { - std::cout<< "Detector returned error: "<< std::endl; controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { #ifdef VERBOSE - std::cout<< "Detector returned OK "<< std::endl; + printf( "Detector returned OK \n" ); #endif controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); thisDetector->currentThresholdEV=retval; @@ -3290,7 +3288,7 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti ostfn << thisDetector->settingsDir << ssettings << "/" << e_eV << "eV" << "/noise.sn" << setfill('0') << setw(3) << dec << getId(DETECTOR_SERIAL_NUMBER) << setbase(10); string settingsfname = ostfn.str(); #ifdef VERBOSE - printf("Settings File is %s\n", settingsfname1.c_str()); + printf("Settings File is %s\n", settingsfname.c_str()); #endif //read the files myMod=createModule(); @@ -3370,7 +3368,7 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti setModule(*myMod, iodelay, tau, e_eV, 0, 0); deleteModule(myMod); if (getSettings(-1) != is){ - std::cout << "Could not set settings in detector" << endl; + printf( "Could not set settings in detector \n" ); setErrorMask((getErrorMask())|(SETTINGS_NOT_SET)); return FAIL; } @@ -3394,7 +3392,7 @@ slsDetectorDefs::detectorSettings slsDetector::getSettings(int imod){ arg[0]=GET_SETTINGS; arg[1]=imod; #ifdef VERBOSE - std::cout<< "Getting settings "<< std::endl; + printf( "Getting settings \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -3403,12 +3401,12 @@ slsDetectorDefs::detectorSettings slsDetector::getSettings(int imod){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else{ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); thisDetector->currentSettings=(detectorSettings)retval; #ifdef VERBOSE - std::cout<< "Settings are "<< retval << std::endl; + printf( "Settings are %d \n", retval ); #endif } disconnectControl(); @@ -3424,7 +3422,7 @@ slsDetectorDefs::detectorSettings slsDetector::getSettings(int imod){ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings isettings, int imod){ #ifdef VERBOSE - std::cout<< "slsDetector setSettings "<< std::endl; + printf( "slsDetector setSettings \n" ); #endif //only set client shared memory variable for Eiger, settings threshold loads the module data (trimbits, dacs etc.) @@ -3564,7 +3562,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise if (isettings != thisDetector->currentSettings) { - std::cout<< "Unknown settings for this detector!" << std::endl; + printf( "Unknown settings for this detector! \n" ); }else{ if (imod<0) { modmi=0; @@ -3576,7 +3574,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise ostringstream ostfn, oscfn; myMod->module=im; - std::cout << std::endl << "Loading settings for module:" << im << std::endl; + printf( "\nLoading settings for module: %d \n", im ); //create file names switch(thisDetector->myDetectorType){ @@ -3586,7 +3584,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise ostfn << thisDetector->settingsDir << ssettings <<"/noise.sn" << setfill('0') << setw(3) << dec << getId(DETECTOR_SERIAL_NUMBER) << setbase(10); oscfn << thisDetector->calDir << ssettings << "/calibration.sn" << setfill('0') << setw(3) << dec << getId(DETECTOR_SERIAL_NUMBER) << setbase(10); #ifdef VERBOSE - std::cout<< thisDetector->settingsDir<calDir <settingsDir, thisDetector->calDir ); #endif break; case MOENCH: @@ -3599,7 +3597,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise ostfn << thisDetector->settingsDir << ssettings <<"/settings.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10); oscfn << thisDetector->calDir << ssettings << "/calibration.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10); #ifdef VERBOSE - std::cout<< thisDetector->settingsDir<calDir <settingsDir, thisDetector->calDir ); #endif break; default: @@ -3611,7 +3609,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise //settings file**** settingsfname=ostfn.str(); #ifdef VERBOSE - cout << "the settings file name is "<myDetectorType, iodelay, tau, myMod)) { //if it didnt open, try default settings file @@ -3631,11 +3629,11 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise } settingsfname=ostfn_default.str(); #ifdef VERBOSE - cout << settingsfname << endl; + printf( "%s \n", settingsfname.c_str() ); #endif if (NULL == readSettingsFile(settingsfname,thisDetector->myDetectorType, iodelay, tau, myMod)) { //if default doesnt work, return error - std::cout << "Could not open settings file" << endl; + printf( "Could not open settings file \n" ); setErrorMask((getErrorMask())|(SETTINGS_FILE_NOT_OPEN)); return thisDetector->currentSettings; } @@ -3647,7 +3645,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise if(thisDetector->myDetectorType != EIGER) { calfname=oscfn.str(); #ifdef VERBOSE - cout << "Specific file:"<< calfname << endl; + printf( "Specific file: %s \n", calfname.c_str() ); #endif //extra gain and offset if(thisDetector->nGain) @@ -3662,7 +3660,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise oscfn_default << thisDetector->calDir << ssettings << ssettings << ".cal"; calfname=oscfn_default.str(); #ifdef VERBOSE - cout << "Default file:" << calfname << endl; + printf( "Default file: %s \n", calfname.c_str() ); #endif //extra gain and offset if(thisDetector->nGain) @@ -3673,7 +3671,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise } //if default doesnt work, return error if(ret != OK){ - std::cout << "Could not open calibration file" << calfname << endl; + printf( "Could not open calibration file %s \n", calfname.c_str() ); setErrorMask((getErrorMask())|(SETTINGS_FILE_NOT_OPEN)); return thisDetector->currentSettings; } @@ -3701,7 +3699,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise } if (getSettings(imod) != isettings){ - std::cout << "Could not set settings" << endl; + printf( "Could not set settings \n" ); setErrorMask((getErrorMask())|(SETTINGS_NOT_SET)); } @@ -3737,7 +3735,7 @@ int slsDetector::updateDetectorNoWait() { n = controlSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); #ifdef VERBOSE - cout << "Updating detector last modified by " << lastClientIP << std::endl; + printf( "Updating detector last modified by %s \n", lastClientIP ); #endif n = controlSocket->ReceiveDataOnly(&nm,sizeof(nm)); thisDetector->nMod[X]=nm; @@ -3831,7 +3829,7 @@ int slsDetector::updateDetector() { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else updateDetectorNoWait(); disconnectControl(); @@ -3853,7 +3851,7 @@ int slsDetector::startAcquisition(){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Starting acquisition "<< std::endl; + printf( "Starting acquisition \n" ); #endif thisDetector->stoppedFlag=0; if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -3862,7 +3860,7 @@ int slsDetector::startAcquisition(){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -3881,7 +3879,7 @@ int slsDetector::stopAcquisition(){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Stopping acquisition "<< std::endl; + printf( "Stopping acquisition \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (stopSocket) { @@ -3890,7 +3888,7 @@ int slsDetector::stopAcquisition(){ stopSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { stopSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectStop(); } @@ -3909,7 +3907,7 @@ int slsDetector::startReadOut(){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Starting readout "<< std::endl; + printf( "Starting readout \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -3917,7 +3915,7 @@ int slsDetector::startReadOut(){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -3935,7 +3933,7 @@ slsDetectorDefs::runStatus slsDetector::getRunStatus(){ strcpy(mess,"aaaaa"); runStatus retval=ERROR; #ifdef VERBOSE - std::cout<< "Getting status "<< std::endl; + printf( "Getting status \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (stopSocket) { @@ -3943,14 +3941,14 @@ slsDetectorDefs::runStatus slsDetector::getRunStatus(){ stopSocket->SendDataOnly(&fnum,sizeof(fnum)); stopSocket->ReceiveDataOnly(&ret,sizeof(ret)); - //cout << "________:::____________" << ret << endl; + //printf( "________:::____________%d \n", ret ); if (ret==FAIL) { stopSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { stopSocket->ReceiveDataOnly(&retval,sizeof(retval)); - //cout << "____________________" << retval << endl; + //printf( "____________________ %d \n", retval ); } disconnectStop(); } @@ -3968,7 +3966,7 @@ int* slsDetector::readFrame(){ int* retval=NULL; #ifdef VERBOSE - std::cout<< "slsDetector: Reading frame "<< std::endl; + printf( "slsDetector: Reading frame \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -4004,11 +4002,11 @@ int* slsDetector::getDataFromDetector(int *retval){ #ifdef VERBOSE - std::cout<< "getting data "<< thisDetector->dataBytes << " " << nel<< std::endl; + printf( "getting data %d %d \n", thisDetector->dataBytes, nel ); #endif controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); #ifdef VERBOSE - cout << "ret=" << ret << endl; + printf( "ret=%d \n", ret ); #endif if (ret!=OK) { @@ -4016,11 +4014,11 @@ int* slsDetector::getDataFromDetector(int *retval){ // if(thisDetector->receiverOnlineFlag == OFFLINE_FLAG) if (ret==FAIL) { thisDetector->stoppedFlag=1; - std::cout<< "Detector returned: " << mess << " " << n << std::endl; + printf( "Detector returned: %s %d \n", mess, n ); } else { ; #ifdef VERBOSE - std::cout<< "Detector successfully returned: " << mess << " " << n << std::endl; + printf( "Detector successfully returned: %s %d \n", mess, n ); #endif } if ((!nodatadetectortype) && (r==NULL)){ @@ -4032,10 +4030,10 @@ int* slsDetector::getDataFromDetector(int *retval){ n=controlSocket->ReceiveDataOnly(retval,thisDetector->dataBytes); #ifdef VERBOSE - std::cout<< "Received "<< n << " data bytes" << std::endl; + printf( "Received %d data bytes \n", n ); #endif if (n!=thisDetector->dataBytes) { - std::cout<< "wrong data size received from detector: received " << n << " but expected " << thisDetector->dataBytes << std::endl; + printf( "wrong data size received from detector: received %d but expected %d \n", n, thisDetector->dataBytes ); thisDetector->stoppedFlag=1; ret=FAIL; if (r==NULL) { @@ -4044,7 +4042,7 @@ int* slsDetector::getDataFromDetector(int *retval){ return NULL; } } - // cout << "get data returning " << endl; + // printf( "get data returning \n" ); return retval; }; @@ -4061,7 +4059,7 @@ int* slsDetector::readAll(){ int i=0; #ifdef VERBOSE - std::cout<< "Reading all frames "<< std::endl; + printf( "Reading all frames \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -4070,20 +4068,20 @@ int* slsDetector::readAll(){ while ((retval=getDataFromDetector())){ i++; //#ifdef VERBOSE - std::cout<< i << std::endl; + printf(" %d \n", i ); //#else - //std::cout << "-" << flush ; + //fflush(stdout); //#endif dataQueue.push(retval); - std::cout<< "pushed" << std::endl; + printf( "pushed \n" ); } disconnectControl(); } } #ifdef VERBOSE - std::cout<< "received "<< i<< " frames" << std::endl; + printf( "received %d frames \n", i ); //#else - // std::cout << std::endl; + // printf( " \n" ); #endif return dataQueue.front(); // check what we return! @@ -4098,7 +4096,7 @@ int slsDetector::readAllNoWait(){ int fnum= F_READ_ALL; #ifdef VERBOSE - std::cout<< "Reading all frames "<< std::endl; + printf( "Reading all frames \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -4126,29 +4124,29 @@ int* slsDetector::startAndReadAll(){ #endif startAndReadAllNoWait(); //#ifdef VERBOSE - // std::cout<< "started" << std::endl; + // printf( "started \n" ); //#endif while ((retval=getDataFromDetector())){ #ifdef VERBOSE i++; - std::cout<< i << std::endl; + printf( "%d \n", i ); //#else - //std::cout<< "-" << flush; + //fflush(stdout); #endif dataQueue.push(retval); } disconnectControl(); #ifdef VERBOSE - std::cout<< "received "<< i<< " frames" << std::endl; + printf( "received %d frames \n", i ); //#else - // std::cout << std::endl; + // printf( " \n" ); #endif return dataQueue.front(); // check what we return! /* while ((retval=getDataFromDetectorNoWait())) i++; #ifdef VERBOSE - std::cout<< "Received " << i << " frames"<< std::endl; + printf( "Received %d frames \n", i ); #endif return dataQueue.front(); // check what we return! */ @@ -4162,12 +4160,12 @@ int slsDetector::startAndReadAllNoWait(){ int fnum= F_START_AND_READ_ALL; #ifdef VERBOSE - std::cout<< "Starting and reading all frames "<< std::endl; + printf( "Starting and reading all frames \n" ); #endif thisDetector->stoppedFlag=0; if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ - //std::cout<< "connected" << std::endl; + //printf( "connected \n" ); controlSocket->SendDataOnly(&fnum,sizeof(fnum)); return OK; } @@ -4183,11 +4181,11 @@ int slsDetector::startAndReadAllNoWait(){ // disconnectControl(); // #ifdef VERBOSE -// std::cout<< "Run finished "<< std::endl; +// printf( "Run finished " \n" ); // #endif // } else { // #ifdef VERBOSE -// std::cout<< "Frame received "<< std::endl; +// printf( "Frame received " \n" ); // #endif // } // } @@ -4224,7 +4222,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ #ifdef VERBOSE - std::cout<< "Setting timer "<< index << " to " << t << "ns/value" << std::endl; + printf( "Setting timer %d to %ld ns value \n", index , t ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -4234,7 +4232,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(DETECTOR_TIMER_VALUE_NOT_SET)); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -4244,13 +4242,13 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ if (ret==FORCE_UPDATE) { updateDetector(); #ifdef VERBOSE - std::cout<< "Updated!" << std::endl; + printf( "Updated! \n" ); #endif } } } else { - //std::cout<< "offline " << std::endl; + //printf( "offline \n" ); if (t>=0) thisDetector->timerValue[index]=t; if((thisDetector->myDetectorType==GOTTHARD)|| @@ -4264,14 +4262,14 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ thisDetector->timerValue[index]=t; } #ifdef VERBOSE - std::cout<< "Timer " << index << " set to "<< thisDetector->timerValue[index] << "ns" << std::endl; + printf( "Timer %d set to %ldns \n", index, thisDetector->timerValue[index] ); #endif if(t!=-1){ if ((thisDetector->myDetectorType==MYTHEN)&&(index==PROBES_NUMBER)) { setDynamicRange(); - //cout << "Changing probes: data size = " << thisDetector->dataBytes <dataBytes); } /* set progress */ @@ -4309,7 +4307,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ //set #frames, #cycles if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){ #ifdef VERBOSE - std::cout << "Setting/Getting number of frames*cycles " << index <<" to/from receiver " << args[1] << std::endl; + printf( "Setting/Getting number of frames*cycles %d to/from receiver %ld \n", index, args[1] ); #endif if(thisDetector->timerValue[CYCLES_NUMBER]==0) args[1] = thisDetector->timerValue[FRAME_NUMBER]; @@ -4320,9 +4318,9 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ else{ #ifdef VERBOSE if(index==ACQUISITION_TIME) - std::cout << "Setting/Getting acquisition time " << index << " to/from receiver " << args[1] << std::endl; + printf( "Setting/Getting acquisition time %d to/from receiver %ld \n", index, args[1] ); else - std::cout << "Setting/Getting acquisition period " << index << " to/from receiver " << args[1] << std::endl; + printf( "Setting/Getting acquisition period %d to/from receiver %ld \n", index, args[1] ); #endif } @@ -4335,15 +4333,15 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ ret = FAIL; if(index==ACQUISITION_TIME){ if(strstr(mess,"receiver not idle")==NULL) - cout << "ERROR:Acquisition Time in receiver set incorrectly to " << retval << " instead of " << args[1] << endl; + printf( "ERROR:Acquisition Time in receiver set incorrectly to %ld instead of %ld \n", retval, args[1] ); setErrorMask((getErrorMask())|(RECEIVER_ACQ_TIME_NOT_SET)); }else if(index==FRAME_PERIOD){ if(strstr(mess,"receiver not idle")==NULL) - cout << "ERROR:Acquisition Period in receiver set incorrectly to " << retval << " instead of " << args[1] << endl; + printf( "ERROR:Acquisition Period in receiver set incorrectly to %ld instead of %ld \n", retval, args[1] ); setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET)); }else{ if(strstr(mess,"receiver not idle")==NULL) - cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << retval << " instead of " << args[1] << endl; + printf( "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to %ld instead of %ld \n", retval, args[1] ); setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET)); } } @@ -4368,7 +4366,7 @@ int slsDetector::lockServer(int lock) { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } @@ -4397,7 +4395,7 @@ string slsDetector::getLastClientIP() { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { controlSocket->ReceiveDataOnly(clientName,sizeof(clientName)); } @@ -4428,14 +4426,13 @@ int slsDetector::setPort(portType index, int num){ s=controlSocket; retval=thisDetector->controlPort; #ifdef VERBOSE - cout << "s="<< s<< endl; - cout << thisDetector->controlPort<< " " << " " << thisDetector->stopPort << endl; + printf( " %d %d \n", thisDetector->controlPort, thisDetector->stopPort ); #endif if (s==NULL) { #ifdef VERBOSE - cout << "s=NULL"<< endl; - cout << thisDetector->controlPort<< " " << " " << thisDetector->stopPort << endl; + printf( "s=NULL \n" ); + printf( " %d %d \n", thisDetector->controlPort, thisDetector->stopPort ); #endif setTCPSocket("",DEFAULT_PORTNO); } @@ -4443,8 +4440,8 @@ int slsDetector::setPort(portType index, int num){ s=controlSocket; } else { #ifdef VERBOSE - cout << "still cannot connect!"<< endl; - cout << thisDetector->controlPort<< " " << " " << thisDetector->stopPort << endl; + printf( "still cannot connect! \n" ); + printf( " %d %d \n", thisDetector->controlPort, thisDetector->stopPort ); #endif setTCPSocket("",retval); @@ -4456,7 +4453,7 @@ int slsDetector::setPort(portType index, int num){ return thisDetector->controlPort; //reusable port, so print error else if((num==thisDetector->stopPort)||(num==thisDetector->receiverTCPPort)){ - std::cout<< "Can not connect to port in use " << std::endl; + printf( "Can not connect to port in use \n" ); setErrorMask((getErrorMask())|(COULDNOT_SET_CONTROL_PORT)); return thisDetector->controlPort; } @@ -4477,7 +4474,7 @@ int slsDetector::setPort(portType index, int num){ return thisDetector->receiverTCPPort; //reusable port, so print error else if((num==thisDetector->stopPort)||(num==thisDetector->controlPort)){ - std::cout<< "Can not connect to port in use " << std::endl; + printf( "Can not connect to port in use \n" ); setErrorMask((getErrorMask())|(COULDNOT_SET_DATA_PORT)); return thisDetector->receiverTCPPort; } @@ -4497,7 +4494,7 @@ int slsDetector::setPort(portType index, int num){ return thisDetector->stopPort; //reusable port, so print error else if((num==thisDetector->receiverTCPPort)||(num==thisDetector->controlPort)){ - std::cout<< "Can not connect to port in use " << std::endl; + printf( "Can not connect to port in use \n" ); setErrorMask((getErrorMask())|(COULDNOT_SET_STOP_PORT)); return thisDetector->stopPort; } @@ -4523,17 +4520,17 @@ int slsDetector::setPort(portType index, int num){ s->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { s->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { s->ReceiveDataOnly(&retval,sizeof(retval)); } s->Disconnect(); }else{ if (index == CONTROL_PORT){ - std::cout << "cannot connect to detector" << endl; + printf( "cannot connect to detector \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_DETECTOR)); }else if (index == DATA_PORT){ - std::cout << "cannot connect to receiver" << endl; + printf( "cannot connect to receiver \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_RECEIVER)); } } @@ -4561,7 +4558,7 @@ int slsDetector::setPort(portType index, int num){ break; } #ifdef VERBOSE - cout << "ret is ok" << endl; + printf( "ret is ok \n" ); #endif } else { @@ -4611,7 +4608,7 @@ int slsDetector::setPort(portType index, int num){ #ifdef VERBOSE - cout << thisDetector->controlPort<< " " << thisDetector->receiverTCPPort << " " << thisDetector->stopPort << endl; + printf( " %d %d %d \n", thisDetector->controlPort, thisDetector->receiverTCPPort, thisDetector->stopPort ); #endif @@ -4659,14 +4656,14 @@ int slsDetector::setTotalProgress() { thisDetector->totalProgress=nf*nc*npos*nm*nscan[0]*nscan[1]; #ifdef VERBOSE - cout << "nc " << nc << endl; - cout << "nm " << nm << endl; - cout << "nf " << nf << endl; - cout << "npos " << npos << endl; - cout << "nscan[0] " << nscan[0] << endl; - cout << "nscan[1] " << nscan[1] << endl; + printf( "nc %d \n", nc ); + printf( "nm %d \n", nm ); + printf( "nf %d \n", nf ); + printf( "npos %d \n", npos ); + printf( "nscan[0] %d \n", nscan[0] ); + printf( "nscan[1] %d \n", nscan[1] ); - cout << "Set total progress " << thisDetector->totalProgress << endl; + printf( "Set total progress %d \n", thisDetector->totalProgress); #endif return thisDetector->totalProgress; } @@ -4710,7 +4707,7 @@ int slsDetector::setSpeed(speedVariable sp, int value) { int ret=OK; int n=0; #ifdef VERBOSE - std::cout<< "Setting speed variable"<< sp << " to " << value << std::endl; + printf( "Setting speed variable %d to %d \n", sp, value ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -4718,12 +4715,12 @@ int slsDetector::setSpeed(speedVariable sp, int value) { controlSocket->SendDataOnly(&sp,sizeof(sp)); n=controlSocket->SendDataOnly(&value,sizeof(value)); #ifdef VERBOSE - std::cout<< "Sent "<< n << " bytes " << std::endl; + printf( "Sent %d bytes \n", n ); #endif controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_SET_SPEED_PARAMETERS)); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -4734,7 +4731,7 @@ int slsDetector::setSpeed(speedVariable sp, int value) { } } #ifdef VERBOSE - std::cout<< "Speed set to "<< retval << std::endl; + printf( "Speed set to %d \n", retval ); #endif return retval; @@ -4752,7 +4749,7 @@ int64_t slsDetector::getTimeLeft(timerIndex index){ int ret=OK; #ifdef VERBOSE - std::cout<< "Getting timer "<< index << std::endl; + printf( "Getting timer %d \n", index ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (stopSocket) { @@ -4762,7 +4759,7 @@ int64_t slsDetector::getTimeLeft(timerIndex index){ stopSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { stopSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { stopSocket->ReceiveDataOnly(&retval,sizeof(retval)); } @@ -4771,7 +4768,7 @@ int64_t slsDetector::getTimeLeft(timerIndex index){ } } #ifdef VERBOSE - std::cout<< "Time left is "<< retval << std::endl; + printf( "Time left is %ld \n", retval ); #endif return retval; @@ -4781,14 +4778,14 @@ int64_t slsDetector::getTimeLeft(timerIndex index){ // Flags int slsDetector::setDynamicRange(int n){ - // cout << "single " << endl; + // printf( "single \n" ); int fnum=F_SET_DYNAMIC_RANGE,fnum2=F_SET_RECEIVER_DYNAMIC_RANGE; int retval=-1,retval1; char mess[MAX_STR_LENGTH]=""; int ret=OK, rateret=OK; #ifdef VERBOSE - std::cout<< "Setting dynamic range to "<< n << std::endl; + printf( "Setting dynamic range to %d\n", n ); #endif if ((thisDetector->myDetectorType == MYTHEN) &&(n==24)) n=32; @@ -4804,7 +4801,7 @@ int slsDetector::setDynamicRange(int n){ controlSocket->ReceiveDataOnly(&rateret,sizeof(rateret)); if (rateret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); if(strstr(mess,"Rate Correction")!=NULL){ if(strstr(mess,"32")!=NULL) setErrorMask((getErrorMask())|(RATE_CORRECTION_NOT_32or16BIT)); @@ -4816,7 +4813,7 @@ int slsDetector::setDynamicRange(int n){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } @@ -4855,8 +4852,8 @@ int slsDetector::setDynamicRange(int n){ #ifdef VERBOSE - std::cout<< "Dynamic range set to "<< thisDetector->dynamicRange << std::endl; - std::cout<< "Data bytes "<< thisDetector->dataBytes << std::endl; + printf( "Dynamic range set to %d \n", thisDetector->dynamicRange ); + printf( "Data bytes %d \n", thisDetector->dataBytes ); #endif } @@ -4867,7 +4864,7 @@ int slsDetector::setDynamicRange(int n){ if((n==-1) && (ret!= FORCE_UPDATE)) n =-1; if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending/Getting dynamic range to/from receiver " << n << std::endl; + printf( "Sending/Getting dynamic range to/from receiver %d\n", n ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum2,retval1,n); @@ -4875,7 +4872,7 @@ int slsDetector::setDynamicRange(int n){ } if ((ret==FAIL) || (retval1 != retval)){ ret = FAIL; - cout << "ERROR:Dynamic range in receiver set incorrectly to " << retval1 << " instead of " << retval << endl; + printf( "ERROR:Dynamic range in receiver set incorrectly to %d instead of %d\n", retval1, retval ); setErrorMask((getErrorMask())|(RECEIVER_DYNAMIC_RANGE)); } if(ret==FORCE_UPDATE) @@ -4935,11 +4932,11 @@ int slsDetector::sendROI(int n,ROI roiLimits[]){ controlSocket->SendDataOnly(&arg,sizeof(arg)); if(arg==-1){; #ifdef VERBOSE - cout << "Getting ROI from detector" << endl; + printf( "Getting ROI from detector \n" ); #endif }else{ #ifdef VERBOSE - cout << "Sending ROI of size " << arg << " to detector" << endl; + printf( "Sending ROI of size %d to detector \n", arg ); #endif controlSocket->SendDataOnly(roiLimits,arg*sizeof(ROI)); } @@ -4948,13 +4945,13 @@ int slsDetector::sendROI(int n,ROI roiLimits[]){ if (ret!=FAIL){ controlSocket->ReceiveDataOnly(&retvalsize,sizeof(retvalsize)); nrec = controlSocket->ReceiveDataOnly(retval,retvalsize*sizeof(ROI)); - if(nrec!=(retvalsize*sizeof(ROI))){ + if(nrec!=(retvalsize*(int)sizeof(ROI))){ ret=FAIL; - std::cout << " wrong size received: received " << nrec << "but expected " << retvalsize*sizeof(ROI) << endl; + printf( " wrong size received: received %d but expected %d \n", nrec, retvalsize*(int)sizeof(ROI) ); } }else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -4971,7 +4968,7 @@ int slsDetector::sendROI(int n,ROI roiLimits[]){ #ifdef VERBOSE for(int j=0;jnROI;j++) - cout<onlineFlag==ONLINE_FLAG) { @@ -5010,7 +5007,7 @@ int slsDetector::setReadOutFlags(readOutFlags flag){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_SET_READOUT_FLAGS)); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -5026,7 +5023,7 @@ int slsDetector::setReadOutFlags(readOutFlags flag){ } #ifdef VERBOSE - std::cout<< "Readout flag set to "<< retval << std::endl; + printf( "Readout flag set to %d \n", retval ); #endif return thisDetector->roFlags; }; @@ -5054,14 +5051,14 @@ int slsDetector::executeTrimming(trimMode mode, int par1, int par2, int imod){ #ifdef VERBOSE - std::cout<< "Trimming module " << imod << " with mode "<< mode << " parameters " << par1 << " " << par2 << std::endl; + printf( "Trimming module %d with mode %d parameters %d %d \n", imod, mode, par1, par2 ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ controlSocket->SendDataOnly(&fnum,sizeof(fnum)); #ifdef VERBOSE - std::cout<< "sending mode bytes= "<< controlSocket->SendDataOnly(&mode,sizeof(mode)) << std::endl; + printf( "sending mode bytes= %d \n", controlSocket->SendDataOnly(&mode,sizeof(mode)) ); #endif controlSocket->SendDataOnly(&mode,sizeof(mode)); controlSocket->SendDataOnly(arg,sizeof(arg)); @@ -5069,10 +5066,10 @@ int slsDetector::executeTrimming(trimMode mode, int par1, int par2, int imod){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { #ifdef VERBOSE - std::cout<< "Detector trimmed "<< ret << std::endl; + printf( "Detector trimmed %d \n", ret ); #endif /* controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -5188,7 +5185,7 @@ double* slsDetector::decodeData(int *datain, double *fdata) { #ifdef VERBOSE - std::cout<< "decoded "<< ichan << " channels" << std::endl; + printf( "decoded %d channels \n", ichan ); #endif return dataout; @@ -5223,7 +5220,7 @@ int slsDetector::setFlatFieldCorrection(string fname) if (fname=="") { #ifdef VERBOSE - std::cout<< "disabling flat field correction" << std::endl; + printf( "disabling flat field correction \n" ); #endif thisDetector->correctionMask&=~(1<nMod[X]*thisDetector->nChans*thisDetector->nChips; ichan++) { // #ifdef VERBOSE - // std::cout<< ichan << " "<< corr[ichan] << std::endl; + // printf( "%d %f \n", ichan, corr[ichan] ); // #endif ffcoefficients[ichan]=corr[ichan]; if (ecorr!=NULL) @@ -5289,13 +5286,13 @@ int slsDetector::setFlatFieldCorrection(double *corr, double *ecorr) { else fferrors[ichan]=1; - cout << ichan << " " << ffcoefficients[ichan] << endl; + printf( " %d %f \n", ichan, ffcoefficients[ichan] ); } thisDetector->correctionMask|=(1<correctionMask&=~(1<correctionMask)&(1<correctionMask)&(1<correctionMask&(1<nMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { @@ -5329,7 +5326,7 @@ int slsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { return 1; } else { #ifdef VERBOSE - std::cout<< "Flat field correction is disabled" << std::endl; + printf( "Flat field correction is disabled \n" ); #endif if (corr) for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { @@ -5345,7 +5342,7 @@ int slsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { int slsDetector::flatFieldCorrect(double* datain, double *errin, double* dataout, double *errout){ #ifdef VERBOSE - std::cout<< "Flat field correcting data" << std::endl; + printf( "Flat field correcting data \n" ); #endif double e, eo; if (thisDetector->correctionMask & (1<onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -5385,7 +5381,7 @@ int slsDetector::setRateCorrection(double t){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); if(strstr(mess,"default tau")!=NULL) setErrorMask((getErrorMask())|(RATE_CORRECTION_NO_TAU_PROVIDED)); if(strstr(mess,"32")!=NULL) @@ -5406,7 +5402,7 @@ int slsDetector::setRateCorrection(double t){ double tdead[]=defaultTDead; if (t==0) { #ifdef VERBOSE - std::cout<< "unsetting rate correction" << std::endl; + printf( "unsetting rate correction \n" ); #endif thisDetector->correctionMask&=~(1<tDead=0; } #ifdef VERBOSE - std::cout<< "Setting rate correction with dead time "<< thisDetector->tDead << std::endl; + printf( "Setting rate correction with dead time %f \n", thisDetector->tDead ); #endif } return thisDetector->correctionMask&(1<correctionMask&(1<tDead << std::endl; + printf( "Rate correction is enabled with dead time %f \n", thisDetector->tDead ); #endif t=thisDetector->tDead; return 1; } else t=0; #ifdef VERBOSE - std::cout<< "Rate correction is disabled " << std::endl; + printf( "Rate correction is disabled \n" ); #endif return 0; }; @@ -5458,7 +5454,7 @@ double slsDetector::getRateCorrectionTau(){ char mess[MAX_STR_LENGTH]=""; int64_t retval = -1; #ifdef VERBOSE - std::cout<< "Setting Rate Correction to " << arg << endl; + printf( "Getting Rate Correction \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -5468,7 +5464,7 @@ double slsDetector::getRateCorrectionTau(){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -5483,13 +5479,13 @@ double slsDetector::getRateCorrectionTau(){ //mythen only if (thisDetector->correctionMask&(1<tDead << std::endl; + printf( "Rate correction is enabled with dead time %f \n", thisDetector->tDead ); #endif return thisDetector->tDead; //return 1; } else #ifdef VERBOSE - std::cout<< "Rate correction is disabled " << std::endl; + printf( "Rate correction is disabled \n" ); #endif return 0; }; @@ -5521,7 +5517,7 @@ int slsDetector::rateCorrect(double* datain, double *errin, double* dataout, dou double e; if (thisDetector->correctionMask&(1<nMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { @@ -5576,7 +5572,7 @@ int slsDetector::setBadChannelCorrection(string fname){ int slsDetector::setBadChannelCorrection(int nch, int *chs, int ff) { #ifdef VERBOSE - cout << "setting " << nch << " bad chans " << endl; + printf( "setting %d bad chans \n", nch ); #endif if (ff==0) { if (nch0) { @@ -5586,7 +5582,7 @@ int slsDetector::setBadChannelCorrection(int nch, int *chs, int ff) { if (chs[ich]>=0 && chs[ich]badChansList[ich]=chs[ich]; thisDetector->nBadChans++; - // cout << "det : " << thisDetector->nBadChans << " " << thisDetector->badChansList[ich] << endl; + // printf( "det : %d %d \n", thisDetector->nBadChans, thisDetector->badChansList[ich] ); } } } else @@ -5600,7 +5596,7 @@ int slsDetector::setBadChannelCorrection(int nch, int *chs, int ff) { } } #ifdef VERBOSE - cout << "badchans flag is "<< (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) << endl; + printf( "badchans flag is %d \n", (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) ); #endif // fillBadChannelMask(); if (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) { @@ -5654,9 +5650,9 @@ int slsDetector::exitServer(){ } } if (retval!=OK) { - std::cout<< std::endl; - std::cout<< "Shutting down the server" << std::endl; - std::cout<< std::endl; + printf( "\n" ); + printf( "Shutting down the server \n" ); + printf( "\n" ); } return retval; @@ -5745,17 +5741,17 @@ char* slsDetector::setDetectorMAC(string detectorMAC){ (detectorMAC[11]==':')&&(detectorMAC[14]==':')){ strcpy(thisDetector->detectorMAC,detectorMAC.c_str()); if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL) - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf( "Warning: UDP connection set up failed \n" ); }else{ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: server MAC Address should be in xx:xx:xx:xx:xx:xx format" << endl; + printf( "Warning: server MAC Address should be in xx:xx:xx:xx:xx:xx format \n" ); } } else{ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: server MAC Address should be in xx:xx:xx:xx:xx:xx format" << std::endl; + printf( "Warning: server MAC Address should be in xx:xx:xx:xx:xx:xx format \n" ); } return thisDetector->detectorMAC; @@ -5772,12 +5768,12 @@ char* slsDetector::setDetectorIP(string detectorIP){ if(result!=0){ strcpy(thisDetector->detectorIP,detectorIP.c_str()); if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL) - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf( "Warning: UDP connection set up failed \n" ); }else{ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: Detector IP Address should be VALID and in xxx.xxx.xxx.xxx format" << std::endl; + printf( "Warning: Detector IP Address should be VALID and in xxx.xxx.xxx.xxx format \n" ); } } } @@ -5797,22 +5793,22 @@ char* slsDetector::setReceiver(string receiverIP){ if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Setting up receiver with" << endl; - std::cout << "detector type:" << slsDetectorBase::getDetectorType(thisDetector->myDetectorType) << endl; - std::cout << "detector hostname:" << thisDetector->hostname << endl; - std::cout << "file path:" << fileIO::getFilePath() << endl; - std::cout << "file name:" << fileIO::getFileName() << endl; - std::cout << "file index:" << fileIO::getFileIndex() << endl; + printf( "Setting up receiver with \n" ); + printf( "detector type: %s \n", slsDetectorBase::getDetectorType(thisDetector->myDetectorType).c_str() ); + printf( "detector hostname: %s \n", thisDetector->hostname ); + printf( "file path: %s \n", fileIO::getFilePath().c_str() ); + printf( "file name: %s \n", fileIO::getFileName().c_str() ); + printf( "file index: %d \n", fileIO::getFileIndex() ); pthread_mutex_lock(&ms); - std::cout << "write enable:" << parentDet->enableWriteToFileMask() << endl; - std::cout << "overwrite enable:" << parentDet->enableOverwriteMask() << endl; + printf( "write enable: %d \n", parentDet->enableWriteToFileMask()); + printf( "overwrite enable: %d \n", parentDet->enableOverwriteMask()); pthread_mutex_unlock(&ms); - std::cout << "frame index needed:" << ((thisDetector->timerValue[FRAME_NUMBER]*thisDetector->timerValue[CYCLES_NUMBER])>1) << endl; - std::cout << "frame period:" << thisDetector->timerValue[FRAME_PERIOD] << endl; - std::cout << "frame number:" << thisDetector->timerValue[FRAME_NUMBER] << endl; - std::cout << "dynamic range:" << thisDetector->dynamicRange << endl << endl; - std::cout << "10GbE:" << thisDetector->tenGigaEnable << endl << endl; - //std::cout << "dataStreaming:" << enableDataStreamingFromReceiver(-1) << endl << endl; + printf( "frame index needed: %d \n", ((thisDetector->timerValue[FRAME_NUMBER]*thisDetector->timerValue[CYCLES_NUMBER])>1)); + printf( "frame period: %ld \n", thisDetector->timerValue[FRAME_PERIOD]); + printf( "frame number: %ld \n", thisDetector->timerValue[FRAME_NUMBER]); + printf( "dynamic range: %d \n", thisDetector->dynamicRange ); + printf( "10GbE: %d \n\n", thisDetector->tenGigaEnable ); + //printf( "dataStreaming: %d \n\n", enableDataStreamingFromReceiver(-1) ); /** enable compresison, */ #endif if(setDetectorType()!= GENERIC){ @@ -5841,7 +5837,7 @@ char* slsDetector::setReceiver(string receiverIP){ setFlippedData(X,-1); activate(-1); } - //std::cout << "***********************************dataStreaming:" << parentDet->enableDataStreamingFromReceiver(-1) << endl << endl; + //printf( "***********************************dataStreaming: %d \n\n", parentDet->enableDataStreamingFromReceiver(-1) ); //parentDet->enableDataStreamingFromReceiver(parentDet->enableDataStreamingFromReceiver(-1)); //set scan tag setUDPConnection(); @@ -5864,13 +5860,15 @@ char* slsDetector::setReceiverUDPIP(string udpip){ int result = inet_pton(AF_INET, udpip.c_str(), &(sa.sin_addr)); if(result==0){ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: Receiver UDP IP Address should be VALID and in xxx.xxx.xxx.xxx format" << std::endl; + printf( "Warning: Receiver UDP IP Address should be VALID and in xxx.xxx.xxx.xxx format \n" ); }else{ strcpy(thisDetector->receiverUDPIP,udpip.c_str()); if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf("Warning: Receiver hostname not set yet.\n"); + //printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL){ - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf("Warning: UDP connection set up failed\n"); + //printf( "Warning: UDP connection set up failed \n" ); } } } @@ -5884,20 +5882,20 @@ char* slsDetector::setReceiverUDPIP(string udpip){ char* slsDetector::setReceiverUDPMAC(string udpmac){ if(udpmac.length()!=17){ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: receiver udp mac address should be in xx:xx:xx:xx:xx:xx format" << std::endl; + printf( "Warning: receiver udp mac address should be in xx:xx:xx:xx:xx:xx format \n" ); } else{ if((udpmac[2]==':')&&(udpmac[5]==':')&&(udpmac[8]==':')&& (udpmac[11]==':')&&(udpmac[14]==':')){ strcpy(thisDetector->receiverUDPMAC,udpmac.c_str()); if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL){ - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf( "Warning: UDP connection set up failed \n" ); } }else{ setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); - std::cout << "Warning: receiver udp mac address should be in xx:xx:xx:xx:xx:xx format" << std::endl; + printf( "Warning: receiver udp mac address should be in xx:xx:xx:xx:xx:xx format \n" ); } } @@ -5910,9 +5908,9 @@ char* slsDetector::setReceiverUDPMAC(string udpmac){ int slsDetector::setReceiverUDPPort(int udpport){ thisDetector->receiverUDPPort = udpport; if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL){ - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf( "Warning: UDP connection set up failed \n" ); } return thisDetector->receiverUDPPort; } @@ -5920,9 +5918,9 @@ int slsDetector::setReceiverUDPPort(int udpport){ int slsDetector::setReceiverUDPPort2(int udpport){ thisDetector->receiverUDPPort2 = udpport; if(!strcmp(thisDetector->receiver_hostname,"none")) - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); else if(setUDPConnection()==FAIL){ - std::cout<< "Warning: UDP connection set up failed" << std::endl; + printf( "Warning: UDP connection set up failed \n" ); } return thisDetector->receiverUDPPort2; } @@ -5936,7 +5934,7 @@ char* slsDetector::setDetectorNetworkParameter(networkParameter index, int delay char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< "Setting Transmission delay of mode "<< index << " to " << delay << std::endl; + printf( "Setting Transmission delay of mode %d to %d \n", index, delay ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -5946,7 +5944,7 @@ char* slsDetector::setDetectorNetworkParameter(networkParameter index, int delay controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(DETECTOR_NETWORK_PARAMETER)); } else controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -5956,7 +5954,7 @@ char* slsDetector::setDetectorNetworkParameter(networkParameter index, int delay } } #ifdef VERBOSE - std::cout<< "Speed set to "<< retval << std::endl; + printf( "Speed set to %d\n", retval ); #endif @@ -5974,7 +5972,7 @@ int slsDetector::setUDPConnection(){ //called before set up if(!strcmp(thisDetector->receiver_hostname,"none")){ - std::cout << "Warning: Receiver hostname not set yet." << endl; + printf( "Warning: Receiver hostname not set yet. \n" ); return FAIL; } @@ -5987,8 +5985,8 @@ int slsDetector::setUDPConnection(){ else{ struct hostent *he = gethostbyname(thisDetector->receiver_hostname); if (he == NULL){ - cout<<"rx_hostname:"<receiver_hostname<receiver_hostname ); + printf( "no rx_udpip given and could not convert receiver hostname to ip \n" ); return FAIL; }else strcpy(thisDetector->receiverUDPIP,inet_ntoa(*(struct in_addr*)he->h_addr)); @@ -6001,15 +5999,15 @@ int slsDetector::setUDPConnection(){ sprintf(args[1],"%d",thisDetector->receiverUDPPort); sprintf(args[2],"%d",thisDetector->receiverUDPPort2); #ifdef VERBOSE - std::cout << "Receiver udp ip address: " << thisDetector->receiverUDPIP << std::endl; - std::cout << "Receiver udp port: " << thisDetector->receiverUDPPort << std::endl; - std::cout << "Receiver udp port2: " << thisDetector->receiverUDPPort2 << std::endl; + printf( "Receiver udp ip address: %s \n",thisDetector->receiverUDPIP ); + printf( "Receiver udp port: %d \n",thisDetector->receiverUDPPort ); + printf( "Receiver udp port2: %d \n", thisDetector->receiverUDPPort2 ); #endif //set up receiver for UDP Connection and get receivermac address if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Setting up UDP Connection for Receiver " << args[0] << "\t" << args[1] << std::endl; + printf( "Setting up UDP Connection for Receiver %s\t%s \n", args[0], args[1] ); #endif if (connectData() == OK){ ret=thisReceiver->sendUDPDetails(fnum,retval,args); @@ -6019,7 +6017,7 @@ int slsDetector::setUDPConnection(){ strcpy(thisDetector->receiverUDPMAC,retval); #ifdef VERBOSE - std::cout << "Receiver mac address: " << thisDetector->receiverUDPMAC << std::endl; + printf( "Receiver mac address: %s \n", thisDetector->receiverUDPMAC ); #endif if(ret==FORCE_UPDATE) updateReceiver(); @@ -6027,7 +6025,7 @@ int slsDetector::setUDPConnection(){ //configure detector with udp details, -100 is so it doesnt overwrite the previous value if(configureMAC()==FAIL){ setReceiverOnline(OFFLINE_FLAG); - std::cout << "could not configure mac" << endl; + printf( "could not configure mac \n" ); } } }else @@ -6060,7 +6058,7 @@ int slsDetector::configureMAC(){ if (he != NULL) strcpy(thisDetector->receiverUDPIP,inet_ntoa(*(struct in_addr*)he->h_addr)); else{ - std::cout << "configure mac failed. no rx_udpip given and invalid receiver hostname" << endl; + printf( "configure mac failed. no rx_udpip given and invalid receiver hostname \n" ); setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); return FAIL; } @@ -6074,20 +6072,20 @@ int slsDetector::configureMAC(){ sprintf(arg[5],"%x",thisDetector->receiverUDPPort2); #ifdef VERBOSE - std::cout<< "Configuring MAC"<< std::endl; + printf( "Configuring MAC \n" ); #endif for(i=0;i<2;i++){ if(!strcmp(arg[i],"none")){ - std::cout<< "Configure MAC Error. IP/MAC Addresses not set"<< std::endl; + printf( "Configure MAC Error. IP/MAC Addresses not set \n" ); setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); return FAIL; } } #ifdef VERBOSE - std::cout<< "IP/MAC Addresses valid "<< std::endl; + printf( "IP/MAC Addresses valid \n" ); #endif @@ -6103,7 +6101,7 @@ int slsDetector::configureMAC(){ bzero(arg[0], 50); strcpy(arg[0],cword); #ifdef VERBOSE - std::cout<<"receiver udp ip:"<ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); } else @@ -6184,7 +6182,7 @@ int slsDetector::configureMAC(){ } if (ret==FAIL) { ret=FAIL; - std::cout<< "Configuring MAC failed " << std::endl; + printf( "Configuring MAC failed \n" ); setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); } else if (thisDetector->myDetectorType==GOTTHARD){ @@ -6198,7 +6196,7 @@ int slsDetector::configureMAC(){ //connect to receiver if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending adc val to receiver " << retval << std::endl; + printf( "Sending adc val to receiver %d\n", retval ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum2,retval,retval); @@ -6279,19 +6277,19 @@ int slsDetector::loadImageToDetector(imageType index,string const fname){ short int arg[thisDetector->nChans*thisDetector->nChips]; #ifdef VERBOSE - std::cout<< std::endl<< "Loading "; + printf( "\n Loading " ); if(!index) - std::cout<<"Dark"; + printf( "Dark"); else - std::cout<<"Gain"; - std::cout<<" image from file " << fname << std::endl; + printf( "Gain"); + printf( " image from file %s \n", fname.c_str() ); #endif if(readDataFile(fname,arg)){ ret = sendImageToDetector(index,arg); return ret; } - std::cout<< "Could not open file "<< fname << std::endl; + printf( "Could not open file %s \n", fname.c_str() ); return ret; } @@ -6304,7 +6302,7 @@ int slsDetector::sendImageToDetector(imageType index,short int imageVals[]){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Sending image to detector " <onlineFlag==ONLINE_FLAG) { @@ -6317,7 +6315,7 @@ int slsDetector::sendImageToDetector(imageType index,short int imageVals[]){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -6342,7 +6340,7 @@ int slsDetector::getCounterBlock(short int arg[],int startACQ){ controlSocket->ReceiveDataOnly(arg,thisDetector->dataBytes); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -6360,10 +6358,10 @@ int slsDetector::writeCounterBlockFile(string const fname,int startACQ){ short int counterVals[thisDetector->nChans*thisDetector->nChips]; #ifdef VERBOSE - std::cout<< std::endl<< "Reading Counter to \""<onlineFlag==ONLINE_FLAG) { @@ -6394,7 +6392,7 @@ int slsDetector::resetCounterBlock(int startACQ){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -6416,11 +6414,11 @@ int slsDetector::setCounterBit(int i){ if(thisDetector->onlineFlag==ONLINE_FLAG){ #ifdef VERBOSE if(i ==-1) - std::cout<< "Getting counter bit from detector" << endl; + printf( "Getting counter bit from detector \n" ); else if(i==0) - std::cout<< "Resetting counter bit in detector " << endl; + printf( "Resetting counter bit in detector \n" ); else - std::cout<< "Setting counter bit in detector " << endl; + printf( "Setting counter bit in detector \n" ); #endif if (connectControl() == OK){ @@ -6429,7 +6427,7 @@ int slsDetector::setCounterBit(int i){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Receiver returned error: " << mess << std::endl; + printf( "Receiver returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_SET_COUNTER_BIT)); } controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -6450,19 +6448,19 @@ int slsDetector::setCounterBit(int i){ int slsDetector::printReceiverConfiguration(){ - std::cout << "Detector IP:\t\t" << getNetworkParameter(DETECTOR_IP) << std::endl; - std::cout << "Detector MAC:\t\t" << getNetworkParameter(DETECTOR_MAC) << std::endl; + printf( "Detector IP:\t\t %s \n", getNetworkParameter(DETECTOR_IP) ); + printf( "Detector MAC:\t\t %s \n", getNetworkParameter(DETECTOR_MAC) ); - std::cout << "Receiver Hostname:\t" << getNetworkParameter(RECEIVER_HOSTNAME) << std::endl; - std::cout << "Receiver UDP IP:\t" << getNetworkParameter(RECEIVER_UDP_IP) << std::endl; - std::cout << "Receiver UDP MAC:\t" << getNetworkParameter(RECEIVER_UDP_MAC) << std::endl; + printf( "Receiver Hostname:\t %s \n", getNetworkParameter(RECEIVER_HOSTNAME) ); + printf( "Receiver UDP IP:\t %s \n", getNetworkParameter(RECEIVER_UDP_IP) ); + printf( "Receiver UDP MAC:\t %s \n", getNetworkParameter(RECEIVER_UDP_MAC) ); - std::cout << "Receiver UDP Port:\t" << getNetworkParameter(RECEIVER_UDP_PORT) << std::endl; + printf( "Receiver UDP Port:\t %s \n", getNetworkParameter(RECEIVER_UDP_PORT) ); if(thisDetector->myDetectorType == EIGER) - std::cout << "Receiver UDP Port2:\t" << getNetworkParameter(RECEIVER_UDP_PORT2) << std::endl; + printf( "Receiver UDP Port2:\t %s \n", getNetworkParameter(RECEIVER_UDP_PORT2) ); - std::cout << std::endl; + printf( " \n" ); return OK; } @@ -6481,18 +6479,18 @@ int slsDetector::readConfigurationFile(string const fname){ string sargname, sargval; int iline=0; #ifdef VERBOSE - std::cout<< "config file name "<< fname << std::endl; + printf( "config file name %s \n", fname.c_str() ); #endif infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { iline=readConfigurationFile(infile); infile.close(); } else { - std::cout<< "Error opening configuration file " << fname << " for reading" << std::endl; + printf( "Error opening configuration file %s for reading \n", fname.c_str() ); return FAIL; } #ifdef VERBOSE - std::cout<< "Read configuration file of " << iline << " lines" << std::endl; + printf( "Read configuration file of %d lines \n", iline ); #endif return OK; @@ -6521,17 +6519,17 @@ int slsDetector::readConfigurationFile(ifstream &infile){ getline(infile,str); iline++; #ifdef VERBOSE - std::cout<< str << std::endl; + printf( "<< str \n" ); #endif if (str.find('#')!=string::npos) { #ifdef VERBOSE - std::cout<< "Line is a comment " << std::endl; - std::cout<< str << std::endl; + printf( "Line is a comment \n" ); + printf( "<< str \n" ); #endif continue; } else if (str.length()<2) { #ifdef VERBOSE - std::cout<< "Empty line " << std::endl; + printf( "Empty line \n" ); #endif continue; } else { @@ -6541,7 +6539,7 @@ int slsDetector::readConfigurationFile(ifstream &infile){ ssstr >> sargname; //if (ssstr.good()) { #ifdef VERBOSE - std::cout<< iargval << " " << sargname << std::endl; + printf( "%d %s \n", iargval, sargname.c_str() ); #endif strcpy(myargs[iargval],sargname.c_str()); args[iargval]=myargs[iargval]; @@ -6550,7 +6548,7 @@ int slsDetector::readConfigurationFile(ifstream &infile){ } ans=cmd->executeLine(iargval,args,PUT_ACTION); #ifdef VERBOSE - std::cout<< ans << std::endl; + printf( "%s \n", ans.c_str() ); #endif } iline++; @@ -6581,11 +6579,11 @@ int slsDetector::writeConfigurationFile(string const fname){ outfile.close(); } else { - std::cout<< "Error opening configuration file " << fname << " for writing" << std::endl; + printf( "Error opening configuration file %s for writing\n", fname.c_str() ); return FAIL; } #ifdef VERBOSE - std::cout<< "wrote " <=0) outfile << id << ":"; - outfile << args[0] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl; + outfile << args[0] << " " << cmd->executeLine(1,args,GET_ACTION) << endl; } } else { strcpy(args[0],names[iv].c_str()); if (id>=0) outfile << id << ":"; - outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl; + outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << endl; } } delete cmd; @@ -6706,12 +6704,11 @@ int slsDetector::programFPGA(string fname){ int ret=FAIL; int fnum=F_PROGRAM_FPGA; char mess[MAX_STR_LENGTH]=""; - int64_t retval = -1; size_t filesize=0; char* fpgasrc = NULL; if(thisDetector->myDetectorType != JUNGFRAU){ - std::cout << "Not implemented for this detector" << std::endl; + printf( "Not implemented for this detector \n" ); return FAIL; } @@ -6719,7 +6716,7 @@ int slsDetector::programFPGA(string fname){ //check if it exists struct stat st; if(stat(fname.c_str(),&st)){ - std::cout << "Programming file does not exist" << endl; + printf( "Programming file does not exist \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } @@ -6732,7 +6729,7 @@ int slsDetector::programFPGA(string fname){ destfname = fname.substr(0,found+1); destfname.append("Jungfrau_MCB.rawbin"); #ifdef VERBOSE - std::cout << "Converting " << fname << " to " << destfname << std::endl; + printf( "Converting %s to %s \n", fname.c_str(), destfname.c_str() ); #endif int filepos,x,y,i; FILE* src = fopen(fname.c_str(),"rb"); @@ -6753,57 +6750,57 @@ int slsDetector::programFPGA(string fname){ fputc(y,dst); } if (filepos < 0x1000000){ - std::cout << "Could not convert programming file. EOF before end of flash" << std::endl; + printf( "Could not convert programming file. EOF before end of flash \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } #ifdef VERBOSE - std::cout << "File has been converted to " << destfname << std::endl; + printf( "File has been converted to %s \n", destfname.c_str() ); #endif //loading file to memory FILE* fp = fopen(destfname.c_str(),"r"); if(fp == NULL){ - std::cout << "Could not open rawbin file" << std::endl; + printf( "Could not open rawbin file \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } if(fseek(fp,0,SEEK_END)){ - std::cout << "Seek error in rawbin file" << std::endl; + printf( "Seek error in rawbin file \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } filesize = ftell(fp); if(filesize <= 0){ - std::cout << "Could not get length of rawbin file" << std::endl; + printf( "Could not get length of rawbin file \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } rewind(fp); fpgasrc = (char*)malloc(filesize+1); if(fpgasrc == NULL){ - std::cout << "Could not allocate size of program" << std::endl; + printf( "Could not allocate size of program \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } if(fread(fpgasrc, sizeof(char), filesize, fp) != filesize){ - std::cout << "Could not read rawbin file" << std::endl; + printf( "Could not read rawbin file \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } if(fclose(fp)){ - std::cout << "Could not close rawbin file" << std::endl; + printf( "Could not close rawbin file \n" ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); return FAIL; } #ifdef VERBOSE - std::cout << "Successfully loaded the rawbin file to program memory" << std::endl; + printf( "Successfully loaded the rawbin file to program memory \n" ); #endif #ifdef VERBOSE - std::cout<< "Sending programming binary to detector " << endl; + printf( "Sending programming binary to detector \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -6813,7 +6810,7 @@ int slsDetector::programFPGA(string fname){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); filesize = 0; } @@ -6821,20 +6818,20 @@ int slsDetector::programFPGA(string fname){ //erasing flash if(ret!=FAIL){ - std::cout<< "This can take awhile. Please be patient..." << endl; + printf( "This can take awhile. Please be patient... \n" ); printf("Erasing Flash:%d%%\r",0); - std::cout << flush; + fflush(stdout); //erasing takes 65 seconds, printing here (otherwise need threads in server-unnecessary) int count = 66; while(count>0){ usleep(1 * 1000 * 1000); count--; printf("Erasing Flash:%d%%\r",(int) (((double)(65-count)/65)*100)); - std::cout << flush; + fflush(stdout); } - std::cout< filesize) //less than 2mb unitprogramsize = filesize; #ifdef VERBOSE - std::cout << "unitprogramsize:" << unitprogramsize << "\t filesize:" << filesize << std::endl; + printf( "unitprogramsize:%zu\t filesize: %zu \n", unitprogramsize, filesize ); #endif controlSocket->SendDataOnly(fpgasrc+currentPointer,unitprogramsize); controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); @@ -6858,20 +6855,20 @@ int slsDetector::programFPGA(string fname){ //print progress printf("Writing to Flash:%d%%\r",(int) (((double)(totalsize-filesize)/totalsize)*100)); - std::cout << flush; + fflush(stdout); }else{ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); } } - std::cout<ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(PROGRAMMING_ERROR)); } disconnectControl(); @@ -6894,11 +6891,11 @@ int slsDetector::resetFPGA(){ char mess[MAX_STR_LENGTH]=""; if(thisDetector->myDetectorType != JUNGFRAU){ - std::cout << "Not implemented for this detector" << std::endl; + printf( "Not implemented for this detector \n" ); return FAIL; } #ifdef VERBOSE - std::cout<< "Sending reset to FPGA " << endl; + printf( "Sending reset to FPGA \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -6908,7 +6905,7 @@ int slsDetector::resetFPGA(){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(RESET_ERROR)); } @@ -6930,11 +6927,11 @@ int slsDetector::powerChip(int ival){ int retval=-1; if(thisDetector->myDetectorType != JUNGFRAU){ - std::cout << "Not implemented for this detector" << std::endl; + printf( "Not implemented for this detector \n" ); return FAIL; } #ifdef VERBOSE - std::cout<< "Sending power on/off/get to the chip " << endl; + printf( "Sending power on/off/get to the chip \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ @@ -6944,7 +6941,7 @@ int slsDetector::powerChip(int ival){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(POWER_CHIP)); }else controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -7038,7 +7035,7 @@ int slsDetector::setAllTrimbits(int val, int imod){ int ret=OK; #ifdef VERBOSE - std::cout<< "Setting all trimbits to "<< val << std::endl; + printf( "Setting all trimbits to %d \n", val ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -7048,7 +7045,7 @@ int slsDetector::setAllTrimbits(int val, int imod){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(ALLTIMBITS_NOT_SET)); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -7060,7 +7057,7 @@ int slsDetector::setAllTrimbits(int val, int imod){ } #ifdef VERBOSE - std::cout<< "All trimbits were set to "<< retval << std::endl; + printf( "All trimbits were set to %d \n", retval ); #endif return retval; } @@ -7071,7 +7068,7 @@ int slsDetector::setAllTrimbits(int val, int imod){ int slsDetector::loadCalibrationFile(string fname, int imod) { if(thisDetector->myDetectorType == EIGER) { - std::cout << "Not required for this detector!" << std::endl; + printf( "Not required for this detector! \n" ); return FAIL; } @@ -7179,7 +7176,7 @@ slsDetectorDefs::masterFlags slsDetector::setMaster(masterFlags flag) { int ret=OK; #ifdef VERBOSE - std::cout<< "Setting master flags to "<< flag << std::endl; + printf( "Setting master flags to %d \n", flag ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -7189,7 +7186,7 @@ slsDetectorDefs::masterFlags slsDetector::setMaster(masterFlags flag) { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } @@ -7200,7 +7197,7 @@ slsDetectorDefs::masterFlags slsDetector::setMaster(masterFlags flag) { } #ifdef VERBOSE - std::cout<< "Master flag set to "<< retval << std::endl; + printf( "Master flag set to %d \n", retval ); #endif return retval; } @@ -7223,7 +7220,7 @@ slsDetectorDefs::synchronizationMode slsDetector::setSynchronization(synchroniza int ret=OK; #ifdef VERBOSE - std::cout<< "Setting synchronization mode to "<< flag << std::endl; + printf( "Setting synchronization mode to %d \n", flag ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -7233,7 +7230,7 @@ slsDetectorDefs::synchronizationMode slsDetector::setSynchronization(synchroniza controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } else { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } @@ -7244,7 +7241,7 @@ slsDetectorDefs::synchronizationMode slsDetector::setSynchronization(synchroniza } #ifdef VERBOSE - std::cout<< "Readout flag set to "<< retval << std::endl; + printf( "Readout flag set to %d \n", retval ); #endif return retval; @@ -7268,7 +7265,7 @@ int slsDetector::setReceiverOnline(int off) { if (thisDetector->receiverOnlineFlag==ONLINE_FLAG){ setReceiverTCPSocket(); if(thisDetector->receiverOnlineFlag==OFFLINE_FLAG){ - std::cout << "cannot connect to receiver" << endl; + printf( "cannot connect to receiver \n" ); setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_RECEIVER)); } } @@ -7298,7 +7295,7 @@ string slsDetector::checkReceiverOnline() { delete dataSocket; dataSocket=NULL; #ifdef VERBOSE - std::cout<< "receiver offline!" << std::endl; + printf( "receiver offline! \n" ); #endif return string(thisDetector->receiver_hostname); } else { @@ -7306,11 +7303,12 @@ string slsDetector::checkReceiverOnline() { dataSocket->SetTimeOut(100); disconnectData(); #ifdef VERBOSE - std::cout<< "receiver online!" << std::endl; + printf( "receiver online! \n" ); #endif return string(""); } } + return retval; } @@ -7326,7 +7324,7 @@ int slsDetector::setReceiverTCPSocket(string const name, int const receiver_port //if receiver ip given if (strcmp(name.c_str(),"")!=0) { #ifdef VERBOSE - std::cout<< "setting receiver" << std::endl; + printf( "setting receiver \n" ); #endif strcpy(thisName,name.c_str()); strcpy(thisDetector->receiver_hostname,thisName); @@ -7340,7 +7338,7 @@ int slsDetector::setReceiverTCPSocket(string const name, int const receiver_port //if receiverTCPPort given if (receiver_port>0) { #ifdef VERBOSE - std::cout<< "setting data port" << std::endl; + printf( "setting data port \n" ); #endif thisRP=receiver_port; thisDetector->receiverTCPPort=thisRP; @@ -7356,7 +7354,7 @@ int slsDetector::setReceiverTCPSocket(string const name, int const receiver_port dataSocket=new MySocketTCP(thisName, thisRP); if (dataSocket->getErrorStatus()){ #ifdef VERBOSE - std::cout<< "Could not connect Data socket "<receiverOnlineFlag=OFFLINE_FLAG; #ifdef VERBOSE - std::cout<< "offline!" << std::endl; + printf( "offline! \n" ); #endif } thisReceiver->setSocket(dataSocket); @@ -7396,7 +7394,7 @@ string slsDetector::setFilePath(string s) { if(thisDetector->receiverOnlineFlag==OFFLINE_FLAG){ if(!s.empty()){ if(stat(s.c_str(),&st)){ - std::cout << "path does not exist" << endl; + printf( "path does not exist \n" ); setErrorMask((getErrorMask())|(FILE_PATH_DOES_NOT_EXIST)); }else{ pthread_mutex_lock(&ms); @@ -7409,7 +7407,7 @@ string slsDetector::setFilePath(string s) { else{ strcpy(arg,s.c_str()); #ifdef VERBOSE - std::cout << "Sending file path to receiver " << arg << std::endl; + printf( "Sending file path to receiver %s \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendString(fnum,retval,arg); @@ -7421,7 +7419,7 @@ string slsDetector::setFilePath(string s) { pthread_mutex_unlock(&ms); } else if(!s.empty()){ - std::cout << "path does not exist" << endl; + printf( "path does not exist \n" ); setErrorMask((getErrorMask())|(FILE_PATH_DOES_NOT_EXIST)); } if(ret==FORCE_UPDATE) @@ -7457,7 +7455,7 @@ string slsDetector::setFileName(string s) { if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ strcpy(arg,s.c_str()); #ifdef VERBOSE - std::cout << "Sending file name to receiver " << arg << std::endl; + printf( "Sending file name to receiver %s \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendString(fnum,retval,arg); @@ -7465,7 +7463,7 @@ string slsDetector::setFileName(string s) { } if(ret!=FAIL){ #ifdef VERBOSE - std::cout << "Complete file prefix from receiver: " << retval << std::endl; + printf( "Complete file prefix from receiver: %s \n", retval); #endif pthread_mutex_lock(&ms); fileIO::setFileName(parentDet->getNameFromReceiverFilePrefix(string(retval))); @@ -7504,7 +7502,7 @@ int slsDetector::setFileIndex(int i) { else{ #ifdef VERBOSE - std::cout << "Sending file index to receiver " << arg << std::endl; + printf( "Sending file index to receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -7532,7 +7530,7 @@ int slsDetector::startReceiver(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Starting Receiver " << std::endl; + printf( "Starting Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->executeFunction(fnum,mess); @@ -7572,7 +7570,7 @@ int slsDetector::stopReceiver(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Stopping Receiver " << std::endl; + printf( "Stopping Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->executeFunction(fnum,mess); @@ -7598,7 +7596,7 @@ slsDetectorDefs::runStatus slsDetector::startReceiverReadout(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Starting Receiver Readout" << std::endl; + printf( "Starting Receiver Readout \n" ); #endif if (connectData() == OK){ ret=thisReceiver->getInt(fnum,retval); @@ -7623,21 +7621,21 @@ int slsDetector::detectorSendToReceiver(bool set){ if (thisDetector->onlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Setting detector to send packets via client to: " << set << std::endl; + printf( "Setting detector to send packets via client to: %d \n", (int)set ); #endif if (connectControl() == OK){ controlSocket->SendDataOnly(&fnum,sizeof(fnum)); controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) updateDetector(); } }else - std::cout << "cannot connect to detector" << endl; + printf( "cannot connect to detector \n" ); return ret; } @@ -7656,7 +7654,7 @@ slsDetectorDefs::runStatus slsDetector::getReceiverStatus(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Getting Receiver Status" << std::endl; + printf( "Getting Receiver Status \n" ); #endif if (connectData() == OK){ ret=thisReceiver->getInt(fnum,retval); @@ -7681,7 +7679,7 @@ int slsDetector::getFramesCaughtByReceiver(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Getting Frames Caught by Receiver " << std::endl; + printf( "Getting Frames Caught by Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->getInt(fnum,retval); @@ -7703,7 +7701,7 @@ int slsDetector::getReceiverCurrentFrameIndex(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Getting Current Frame Index of Receiver " << std::endl; + printf( "Getting Current Frame Index of Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->getInt(fnum,retval); @@ -7726,7 +7724,7 @@ int slsDetector::resetFramesCaught(){ if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE - std::cout << "Reset Frames Caught by Receiver" << std::endl; + printf( "Reset Frames Caught by Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->executeFunction(fnum,mess); @@ -7753,7 +7751,7 @@ int slsDetector::lockReceiver(int lock){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Locking or Unlocking Receiver " << std::endl; + printf( "Locking or Unlocking Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -7778,7 +7776,7 @@ string slsDetector::getReceiverLastClientIP(){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Geting Last Client IP connected to Receiver " << std::endl; + printf( "Geting Last Client IP connected to Receiver \n" ); #endif if (connectData() == OK){ ret=thisReceiver->getLastClientIP(fnum,retval); @@ -7803,7 +7801,7 @@ int slsDetector::updateReceiverNoWait() { n = dataSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); #ifdef VERBOSE - cout << "Updating receiver last modified by " << lastClientIP << std::endl; + printf( "Updating receiver last modified by %s \n", lastClientIP ); #endif n = dataSocket->ReceiveDataOnly(&ind,sizeof(ind)); @@ -7842,7 +7840,7 @@ int slsDetector::updateReceiver() { updateReceiverNoWait(); else{ dataSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Receiver returned error: " << mess << std::endl; + printf( "Receiver returned error: %s \n", mess ); } disconnectData(); } @@ -7870,9 +7868,9 @@ int slsDetector::exitReceiver(){ } } if (retval!=OK) { - std::cout<< std::endl; - std::cout<< "Shutting down the receiver" << std::endl; - std::cout<< std::endl; + printf( "\n" ); + printf( "Shutting down the receiver \n" ); + printf( "\n" ); } return retval; @@ -7899,7 +7897,7 @@ int slsDetector::enableWriteToFile(int enable){ else if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending enable file write to receiver " << arg << std::endl; + printf( "Sending enable file write to receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -7941,7 +7939,7 @@ int slsDetector::overwriteFile(int enable){ else if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending enable file write to receiver " << arg << std::endl; + printf( "Sending enable file write to receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -7980,7 +7978,7 @@ int slsDetector::setFrameIndex(int index){ else if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending frame index to receiver " << arg << std::endl; + printf( "Sending frame index to receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -8009,7 +8007,7 @@ int slsDetector::calibratePedestal(int frames){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Calibrating Pedestal " <onlineFlag==ONLINE_FLAG) { @@ -8021,7 +8019,7 @@ int slsDetector::calibratePedestal(int frames){ controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -8060,7 +8058,7 @@ int slsDetector::setReadReceiverFrequency(int getFromReceiver, int freq){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending read frequency to receiver " << arg << std::endl; + printf( "Sending read frequency to receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -8073,7 +8071,7 @@ int slsDetector::setReadReceiverFrequency(int getFromReceiver, int freq){ } if ((freq > 0) && (retval != freq)){ - cout << "could not set receiver read frequency to " << freq <<" Returned:" << retval << endl; + printf( "could not set receiver read frequency to %d Returned: %d \n", freq, retval ); setErrorMask((getErrorMask())|(RECEIVER_READ_FREQUENCY)); } return retval; @@ -8089,7 +8087,7 @@ int slsDetector::setReceiverReadTimer(int time_in_ms){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending read timer to receiver " << arg << std::endl; + printf( "Sending read timer to receiver %d\n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -8100,7 +8098,7 @@ int slsDetector::setReceiverReadTimer(int time_in_ms){ } if ((time_in_ms > 0) && (retval != time_in_ms)){ - cout << "could not set receiver read timer to " << time_in_ms <<" Returned:" << retval << endl; + printf( "could not set receiver read timer to %d Returned: %d \n", time_in_ms, retval ); setErrorMask((getErrorMask())|(RECEIVER_READ_TIMER)); } return retval; @@ -8117,7 +8115,7 @@ int slsDetector::enableDataStreamingFromReceiver(int enable){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "***************Sending Data Streaming in Receiver " << arg << std::endl; + printf( "***************Sending Data Streaming in Receiver %d \n", arg ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,arg); @@ -8130,7 +8128,7 @@ int slsDetector::enableDataStreamingFromReceiver(int enable){ } if ((enable > 0) && (retval != enable)){ - cout << "could not set data streaming in receiver to " << enable <<" Returned:" << retval << endl; + printf( "could not set data streaming in receiver to %d Returned %d \n", enable, retval ); setErrorMask((getErrorMask())|(DATA_STREAMING)); } return retval; @@ -8146,7 +8144,7 @@ int slsDetector::enableReceiverCompression(int i){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Getting/Enabling/Disabling Receiver Compression with argument " << i << std::endl; + printf( "Getting/Enabling/Disabling Receiver Compression with argument %d \n", i ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,i); @@ -8168,7 +8166,7 @@ void slsDetector::setDetectorHostname(){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Sending detector hostname to Receiver " << thisDetector->hostname << std::endl; + printf( "Sending detector hostname to Receiver %s \n", thisDetector->hostname ); #endif if (connectData() == OK){ ret=thisReceiver->sendString(fnum,retval,thisDetector->hostname); @@ -8188,7 +8186,7 @@ int slsDetector::enableTenGigabitEthernet(int i){ char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<< std::endl<< "Enabling / Disabling 10Gbe" << endl; + printf( "\nEnabling / Disabling 10Gbe \n" ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -8198,7 +8196,7 @@ int slsDetector::enableTenGigabitEthernet(int i){ controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(DETECTOR_TEN_GIGA)); } controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); @@ -8217,7 +8215,7 @@ int slsDetector::enableTenGigabitEthernet(int i){ retval=-1; if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE - std::cout << "Enabling / Disabling 10Gbe in receiver: " << i << std::endl; + printf( "Enabling / Disabling 10Gbe in receiver: %d \n", i ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum2,retval,i); @@ -8246,9 +8244,9 @@ int slsDetector::setReceiverFifoDepth(int i){ if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ #ifdef VERBOSE if(i ==-1) - std::cout<< "Getting Receiver Fifo Depth" << endl; + printf( "Getting Receiver Fifo Depth \n" ); else - std::cout<< "Setting Receiver Fifo Depth to " << i << endl; + printf( "Setting Receiver Fifo Depth to %d \n", i ); #endif if (connectData() == OK){ ret=thisReceiver->sendInt(fnum,retval,i); @@ -8272,15 +8270,13 @@ int slsDetector::setReceiverFifoDepth(int i){ */ int slsDetector::setCTBPattern(string fname) { - - int fnum=F_SET_CTB_PATTERN; - int ret = FAIL; - char retval[MAX_STR_LENGTH]=""; - + //int fnum=F_SET_CTB_PATTERN; + //int ret = FAIL; + //char retval[MAX_STR_LENGTH]=""; // if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ // #ifdef VERBOSE -// std::cout << "Sending detector hostname to Receiver " << thisDetector->hostname << std::endl; +// printf( "Sending detector hostname to Receiver %s \n", thisDetector->hostname ); // #endif // if (connectData() == OK) // ret=thisReceiver->sendString(fnum,retval,thisDetector->hostname); @@ -8298,7 +8294,7 @@ int slsDetector::setCTBPattern(string fname) { if (fd>0) { while (fread(&word, sizeof(word), 1,fd)) { setCTBWord(addr,word); - // cout << hex << addr << " " << word << dec << endl; + // printf( " 0x%x %llx \n", addr, word ); addr++; } @@ -8333,7 +8329,7 @@ uint64_t slsDetector::setCTBWord(int addr,uint64_t word) { char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Setting CTB word" <onlineFlag==ONLINE_FLAG) { @@ -8347,7 +8343,7 @@ uint64_t slsDetector::setCTBWord(int addr,uint64_t word) { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -8385,7 +8381,7 @@ int slsDetector::setCTBPatLoops(int level,int &start, int &stop, int &n) { char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Setting CTB word" <onlineFlag==ONLINE_FLAG) { @@ -8401,7 +8397,7 @@ int slsDetector::setCTBPatLoops(int level,int &start, int &stop, int &n) { n=retval[2]; } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -8435,7 +8431,7 @@ int slsDetector::setCTBPatWaitAddr(int level, int addr) { char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Setting CTB word" <onlineFlag==ONLINE_FLAG) { @@ -8449,7 +8445,7 @@ int slsDetector::setCTBPatWaitAddr(int level, int addr) { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -8485,7 +8481,7 @@ int slsDetector::setCTBPatWaitTime(int level, uint64_t t) { char mess[MAX_STR_LENGTH]=""; #ifdef VERBOSE - std::cout<<"Setting CTB word" <onlineFlag==ONLINE_FLAG) { @@ -8499,7 +8495,7 @@ int slsDetector::setCTBPatWaitTime(int level, uint64_t t) { controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); } disconnectControl(); if (ret==FORCE_UPDATE) @@ -8520,7 +8516,7 @@ int slsDetector::pulsePixel(int n,int x,int y) { arg[0] = n; arg[1] = x; arg[2] = y; #ifdef VERBOSE - std::cout<< std::endl<< "Pulsing Pixel " << n << " number of times at (" << x << "," << "y)" << endl << endl; + printf( "\nPulsing Pixel %d number of times at (%d,%d) \n\n", n, x, y ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -8530,7 +8526,7 @@ int slsDetector::pulsePixel(int n,int x,int y) { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_PULSE_PIXEL)); } disconnectControl(); @@ -8551,7 +8547,7 @@ int slsDetector::pulsePixelNMove(int n,int x,int y) { arg[0] = n; arg[1] = x; arg[2] = y; #ifdef VERBOSE - std::cout<< std::endl<< "Pulsing Pixel " << n << " number of times and move by deltax:" << x << " deltay:" << y << endl << endl; + printf( "\nPulsing Pixel %d number of times and move by deltax:%d deltay:%d \n\n", n, x, y ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -8561,7 +8557,7 @@ int slsDetector::pulsePixelNMove(int n,int x,int y) { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf( "Detector returned error: %s \n", mess ); setErrorMask((getErrorMask())|(COULD_NOT_PULSE_PIXEL_NMOVE)); } disconnectControl(); @@ -8582,7 +8578,7 @@ int slsDetector::pulseChip(int n) { #ifdef VERBOSE - std::cout<< std::endl<< "Pulsing Pixel " << n << " number of times" << endl << endl; + printf( "\nPulsing Pixel %d number of times \n\n", n ); #endif if (thisDetector->onlineFlag==ONLINE_FLAG) { @@ -8592,7 +8588,7 @@ int slsDetector::pulseChip(int n) { controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); - std::cout<< "Detector returned error: " << mess << std::endl; + printf("Detector returned error: %s\n", mess); setErrorMask((getErrorMask())|(COULD_NOT_PULSE_CHIP)); } disconnectControl(); diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index f977bd28e6..ee81bffee4 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -7,6 +7,7 @@ #include + slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { myDet=det; @@ -3426,7 +3427,11 @@ string slsDetectorCommand::cmdSN(int narg, char *args[], int action) { if (cmd=="thisversion"){ - sprintf(answer,"%llx",myDet->getId(THIS_SOFTWARE_VERSION)); + int64_t retval = myDet->getId(THIS_SOFTWARE_VERSION); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } @@ -3436,37 +3441,61 @@ string slsDetectorCommand::cmdSN(int narg, char *args[], int action) { if (cmd=="moduleversion") { int ival=-1; if (sscanf(args[0],"moduleversion:%d",&ival)) { - sprintf(answer,"%llx",myDet->getId(MODULE_FIRMWARE_VERSION,ival)); + int64_t retval = myDet->getId(MODULE_FIRMWARE_VERSION, ival); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } else return string("undefined module number"); } if (cmd=="detectornumber") { - sprintf(answer,"%llx",myDet->getId(DETECTOR_SERIAL_NUMBER)); + int64_t retval = myDet->getId(DETECTOR_SERIAL_NUMBER); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } if (cmd.find("modulenumber")!=string::npos) { int ival=-1; if (sscanf(args[0],"modulenumber:%d",&ival)) { - sprintf(answer,"%llx",myDet->getId(MODULE_SERIAL_NUMBER,ival)); + int64_t retval = myDet->getId(MODULE_SERIAL_NUMBER, ival); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } else return string("undefined module number"); } if (cmd=="detectorversion") { - sprintf(answer,"%llx",myDet->getId(DETECTOR_FIRMWARE_VERSION)); + int64_t retval = myDet->getId(DETECTOR_FIRMWARE_VERSION); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } if (cmd=="softwareversion") { - sprintf(answer,"%llx",myDet->getId(DETECTOR_SOFTWARE_VERSION)); + int64_t retval = myDet->getId(DETECTOR_SOFTWARE_VERSION); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } if (cmd=="receiverversion") { myDet->setReceiverOnline(ONLINE_FLAG); - sprintf(answer,"%llx",myDet->getId(RECEIVER_VERSION)); + int64_t retval = myDet->getId(RECEIVER_VERSION); + if (retval < 0) + sprintf(answer, "%d", -1); + else + sprintf(answer,"%llx", (long long unsigned int)retval); return string(answer); } return string("unknown id mode ")+cmd; @@ -4491,7 +4520,7 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) { if (action==GET_ACTION) return string("cannot get"); #ifdef VERBOSE - std::cout<< " resetting fpga " << sval << std::endl; + std::cout<< " resetting fpga " << std::endl; #endif myDet->setOnline(ONLINE_FLAG); if(myDet->resetFPGA() == OK) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp index ec3d1dae55..9134122453 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp @@ -798,7 +798,6 @@ int slsDetectorUtils::dumpDetectorSetup(string const fname, int level){ slsDetectorCommand *cmd; string names[100]; int nvar=0; - int nvar1=0; names[nvar++]="fname"; names[nvar++]="index"; @@ -878,6 +877,8 @@ int slsDetectorUtils::dumpDetectorSetup(string const fname, int level){ names[nvar++]="patnloop2"; names[nvar++]="patwait2"; names[nvar++]="patwaittime2"; + default: + break; } @@ -908,6 +909,8 @@ int slsDetectorUtils::dumpDetectorSetup(string const fname, int level){ names[nvar++]="flatfield"; names[nvar++]="badchannels"; break; + default: + break; } @@ -916,7 +919,8 @@ int slsDetectorUtils::dumpDetectorSetup(string const fname, int level){ case MYTHEN: names[nvar++]="trimbits"; break; - +default: + break; } // char ext[100]; diff --git a/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp b/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp index 43e5a44364..2e380323c6 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp @@ -255,8 +255,8 @@ int angularConversionStatic::readAngularConversion( ifstream& infile, int nmod, angOff[nm].etilt=epitch; } - // cout << angOff[nm].center << " " << \ - // angOff[nm].r_conversion << " " << \ + // cout << angOff[nm].center << " " << + // angOff[nm].r_conversion << " " << // angOff[nm].offset << endl; } else diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp index d55e4cc8fb..d24c8de502 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp @@ -17,20 +17,20 @@ int energyConversion::readCalibrationFile(string fname, double &gain, double &of string str; ifstream infile; #ifdef VERBOSE - std::cout<< "Opening file "<< fname << std::endl; + printf( "Opening file %s \n", fname.c_str() ); #endif infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { getline(infile,str); #ifdef VERBOSE - std::cout<< str << std::endl; + printf( "%s \n", str.c_str() ); #endif istringstream ssstr(str); ssstr >> offset >> gain; infile.close(); - cout << "Calibration file loaded: " << fname << endl; + printf( "Calibration file loaded: %s \n", fname.c_str() ); } else { - std::cout<< "Could not open calibration file "<< fname << std::endl; + printf( "Could not open calibration file %s \n", fname.c_str() ); gain=0.; offset=0.; #ifndef MYROOT @@ -45,7 +45,7 @@ int energyConversion::readCalibrationFile(string fname, double &gain, double &of }; int energyConversion::writeCalibrationFile(string fname, double gain, double offset){ - //std::cout<< "Function not yet implemented " << std::endl; + //printf( "Function not yet implemented \n" ); ofstream outfile; outfile.open (fname.c_str()); @@ -53,7 +53,7 @@ int energyConversion::writeCalibrationFile(string fname, double gain, double off if (outfile.is_open()) { outfile << offset << " " << gain << std::endl; } else { - std::cout<< "Could not open calibration file "<< fname << " for writing" << std::endl; + printf( "Could not open calibration file %s for writing \n", fname.c_str() ); #ifndef MYROOT return FAIL; #endif @@ -76,7 +76,7 @@ int energyConversion::readCalibrationFile(string fname, int *gain, int *offset){ double o,g; int ig=0; #ifdef VERBOSE - std::cout<< "Opening file "<< fname << std::endl; + printf( "Opening file %s \n", fname.c_str() ); #endif infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { @@ -85,7 +85,7 @@ int energyConversion::readCalibrationFile(string fname, int *gain, int *offset){ //while ( (getline(infile,str)) > -1) { getline(infile,str); #ifdef VERBOSE - std::cout<< str << std::endl; + printf( "%s \n", str.c_str() ); #endif istringstream ssstr(str); ssstr >> o >> g; @@ -96,9 +96,9 @@ int energyConversion::readCalibrationFile(string fname, int *gain, int *offset){ break; } infile.close(); - cout << "Calibration file loaded: " << fname << endl; + printf( "Calibration file loaded: %s \n", fname.c_str() ); } else { - cout << "Could not open calibration file: "<< fname << std::endl; + printf( "Could not open calibration file: %s \n", fname.c_str() ); gain[0]=0; offset[0]=0; #ifndef MYROOT @@ -114,7 +114,7 @@ int energyConversion::readCalibrationFile(string fname, int *gain, int *offset){ }; int energyConversion::writeCalibrationFile(string fname, int *gain, int *offset){ - //std::cout<< "Function not yet implemented " << std::endl; + //printf( "Function not yet implemented \n" ); ofstream outfile; outfile.open (fname.c_str()); // >> i/o operations here << @@ -122,7 +122,7 @@ int energyConversion::writeCalibrationFile(string fname, int *gain, int *offset) for (int ig=0; ig<4; ig++) outfile << ((double)offset[ig]/1000) << " " << ((double)gain[ig]/1000) << std::endl; } else { - std::cout<< "Could not open calibration file "<< fname << " for writing" << std::endl; + printf( "Could not open calibration file %s for writing \n", fname.c_str() ); #ifndef MYROOT return FAIL; #endif @@ -251,16 +251,16 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string names[id++]="VDAC15"; break; default: - cout << "Unknown detector type - unknown format for settings file" << endl; + printf( "Unknown detector type - unknown format for settings file \n" ); return NULL; } #ifdef VERBOSE - std::cout<< "reading settings file for module number "<< myMod->module << std::endl; + printf( " reading settings file for module number %d \n", myMod->module ); #endif myfname=fname; #ifdef VERBOSE - std::cout<< "file name is "<< myfname << std::endl; + printf( "file name is %s \n", myfname.c_str() ); #endif switch (myDetectorType) { @@ -274,7 +274,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string istringstream ssstr(str); ssstr >> sargname >> ival; #ifdef VERBOSE - std::cout<< sargname << " dac nr. " << idac << " is " << ival << std::endl; + printf( "%s dac nr. %d is %d \n", sargname.c_str(), idac, ival ); #endif myMod->dacs[idac]=ival; idac++; @@ -283,24 +283,24 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string getline(infile,str); iline++; #ifdef VERYVERBOSE - std::cout<< str << std::endl; + printf( "%s \n", str.c_str() ); #endif istringstream ssstr(str); ssstr >> sargname >> ival; #ifdef VERYVERBOSE - std::cout<< "chip " << ichip << " " << sargname << " is " << ival << std::endl; + printf( "chip %d %s is %d \n", ichip, sargname.c_str(), ival ); #endif myMod->chipregs[ichip]=ival; for (ichan=0; ichannChans <<" iline " << iline<< std::endl; + printf( "channel %d iline %d \n", ichan+ichip*myMod->nchan, iline ); #endif iline++; myMod->chanregs[ichip*nch+ichan]=0; @@ -310,42 +310,42 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string switch (iarg) { case 0: #ifdef VERYVERBOSE - std::cout<< "trimbits " << ival ; + printf( "trimbits %d", ival ); #endif myMod->chanregs[ichip*nch+ichan]|=ival&TRIMBITMASK; break; case 1: #ifdef VERYVERBOSE - std::cout<< " compen " << ival ; + printf( " compen %d", ival ); #endif myMod->chanregs[ichip*nch+ichan]|=ival<<9; break; case 2: #ifdef VERYVERBOSE - std::cout<< " anen " << ival ; + printf( " anen %d", ival ); #endif myMod->chanregs[ichip*nch+ichan]|=ival<<8; break; case 3: #ifdef VERYVERBOSE - std::cout<< " calen " << ival ; + printf( " calen %d", ival ) ; #endif myMod->chanregs[ichip*nch+ichan]|=ival<<7; break; case 4: #ifdef VERBOSE - std::cout<< " outcomp " << ival ; + printf( " outcomp %d", ival ) ; #endif myMod->chanregs[ichip*nch+ichan]|=ival<<10; break; case 5: #ifdef VERBOSE - std::cout<< " counts " << ival << std::endl; + printf( " counts %d \n", ival ); #endif myMod->chanregs[ichip*nch+ichan]|=ival<<11; break; default: - std::cout<< " too many columns" << std::endl; + printf( " too many columns \n" ); break; } } @@ -353,7 +353,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string // } } #ifdef VERBOSE - std::cout<< "read " << ichan*ichip << " channels" <chanregs,sizeof(int)*(myMod->nchan)); #ifdef VERBOSE for(int i=0;indac;i++) - std::cout << "dac " << i << ":" << myMod->dacs[i] << std::endl; - std::cout << "iodelay:" << iodelay << std::endl; - std::cout << "tau:" << tau << std::endl; + printf( "dac %d:%d \n", i, myMod->dacs[i] ); + printf( "iodelay:%d \n", iodelay ); + printf( "tau:%d \n", tau ); #endif if(infile.eof()){ - cout<> sargname >> ival; @@ -415,7 +415,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string myMod->dacs[i]=ival; idac++; #ifdef VERBOSE - std::cout<< sargname << " dac nr. " << idac << " is " << ival << std::endl; + printf( " %s dac nr. %d is %d \n", sargname.c_str(), idac, ival ); #endif break; } @@ -423,10 +423,10 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string } if (i < id) { #ifdef VERBOSE - std::cout<< sargname << " dac nr. " << idac << " is " << ival << std::endl; + printf( " %s dac nr. %d is %d \n", sargname.c_str(), idac, ival ); #endif }else - std::cout<< "Unknown dac " << sargname << std::endl; + printf( "Unknown dac %s \n", sargname.c_str() ); infile.close(); strcpy(settingsFile,fname.c_str()); @@ -439,7 +439,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string break; default: - std::cout<< "Unknown detector type - don't know how to read file" << myfname << std::endl; + printf( "Unknown detector type - don't know how to read file %s\n", myfname.c_str()); infile.close(); deleteModule(myMod); return NULL; @@ -517,7 +517,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp names[id++]="VDAC15"; break; default: - cout << "Unknown detector type - unknown format for settings file" << endl; + printf( "Unknown detector type - unknown format for settings file \n" ); return FAIL; } @@ -532,9 +532,9 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp iv = 1150; #ifdef VERBOSE for(int i=0;i*m_fn)());} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(); + _Class* m_ptr; }; template @@ -36,8 +36,8 @@ class func0_t{ ~func0_t() {} void operator()() const {*m_store = ((m_ptr->*m_fn)());} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(); + _Class* m_ptr; _Store* m_store; }; @@ -49,8 +49,8 @@ class func1_t{ ~func1_t() {} void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1));} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(_Arg1); + _Class* m_ptr; _Arg1 m_arg1; _Store* m_store; }; @@ -63,8 +63,8 @@ class func2_t{ ~func2_t() {} void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2));} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(_Arg1,_Arg2); + _Class* m_ptr; _Arg1 m_arg1; _Arg2 m_arg2; _Store* m_store; @@ -78,8 +78,8 @@ class func3_t{ ~func3_t() {} void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3));} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3); + _Class* m_ptr; _Arg1 m_arg1; _Arg2 m_arg2; _Arg3 m_arg3; @@ -94,8 +94,8 @@ class func4_t{ ~func4_t() {} void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3,m_arg4));} private: - _Class* m_ptr; _Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3,_Arg4); + _Class* m_ptr; _Arg1 m_arg1; _Arg2 m_arg2; _Arg3 m_arg3; diff --git a/slsDetectorSoftware/threadFiles/ThreadPool.cpp b/slsDetectorSoftware/threadFiles/ThreadPool.cpp index 347a15e31f..e1d473ead5 100644 --- a/slsDetectorSoftware/threadFiles/ThreadPool.cpp +++ b/slsDetectorSoftware/threadFiles/ThreadPool.cpp @@ -85,7 +85,8 @@ int ThreadPool::destroy_threadpool(){ } void* ThreadPool::execute_thread(){ - int ithread = current_thread_number; + //for debugging seting ithread value + // int ithread = current_thread_number; thread_started = true; Task* task = NULL; m_tasks_loaded = false; From f7d85231f2ac6efcda71bbd972442da6d14dfcc1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:12:21 +0200 Subject: [PATCH 10/48] solved warnings except sscanf for uint64_t --- slsReceiverSoftware/include/logger.h | 11 ++++------- .../src/UDPStandardImplementation.cpp | 12 +++++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/slsReceiverSoftware/include/logger.h b/slsReceiverSoftware/include/logger.h index a91dea9f4e..d01b1db2d6 100644 --- a/slsReceiverSoftware/include/logger.h +++ b/slsReceiverSoftware/include/logger.h @@ -7,16 +7,13 @@ #include #include -#ifdef VERBOSE -#define FILELOG_MAX_LEVEL logDEBUG -#endif - -#ifdef VERYVERBOSE -#define FILELOG_MAX_LEVEL logDEBUG4 -#endif #ifdef FIFODEBUG #define FILELOG_MAX_LEVEL logDEBUG5 +#elif VERYVERBOSE +#define FILELOG_MAX_LEVEL logDEBUG4 +#elif VERBOSE +#define FILELOG_MAX_LEVEL logDEBUG #endif #ifndef FILELOG_MAX_LEVEL diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index c31a037cb1..d26ec75ca0 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -20,6 +20,7 @@ #include //zmq #include +#include //printf of uint64_t etc using namespace std; @@ -1531,11 +1532,12 @@ int UDPStandardImplementation::setupWriter(){ tempname=tempname.substr(0,uscore); startAcquisitionCallBack(filePath, (char*)tempname.c_str(),fileIndex, (uint32_t)bufferSize,pStartAcquisition); } - if (rawDataReadyCallBack) + if (rawDataReadyCallBack) { FILE_LOG(logINFO) << "Data Write has been defined externally"; - if (!fileWriteEnable) + } + if (!fileWriteEnable) { FILE_LOG(logINFO) << "Data will not be saved"; - + } //creating first file @@ -2346,7 +2348,7 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) #ifdef VERBOSE if(!ithread) cprintf(BLUE, - "framenumber:%llu\tsubfnum:%u\tpnum:%u\tbunchid:%llu\txcoord:%u\tdettype:%u\tversion:%u\n", + "framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->xCoord, header->detType, header->version); #endif @@ -3325,7 +3327,7 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer break; } - while(buff[0] = receiverData[ithread]->findNextFrame(data,ndata,remainingsize)){ + while((buff[0] = receiverData[ithread]->findNextFrame(data,ndata,remainingsize))){ //remaining number of packets np = ndata/onePacketSize; From 9aef802beab2c4f926dbe264deab64b2ae7454f7 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:24:49 +0200 Subject: [PATCH 11/48] changed all -lpthread to -pthread --- Makefile.include | 6 +++--- manual/manual-api/Makefile | 4 ++-- manual/manual-api/mainClient.cpp | 2 +- manual/manual-api/mainReceiver.cpp | 2 +- users/Makefile | 4 ++-- users/Makefile_new | 4 ++-- users/mainClient.cpp | 4 ++-- users/mainClient_new.cpp | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile.include b/Makefile.include index d223a7ce36..7357ba2a9e 100755 --- a/Makefile.include +++ b/Makefile.include @@ -5,9 +5,9 @@ CC = g++ CXX = $(CC) ASM=$(shell echo "/lib/modules/`uname -r`/build/include") -LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread -LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -lpthread -FLAGS= -Wall #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG +LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread +LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread +FLAGS= -Wall -DVERBOSE -DVERYVERBOSE #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG # -DVERBOSE # Setting up the verbose flags diff --git a/manual/manual-api/Makefile b/manual/manual-api/Makefile index 9c236d3edd..ac5451e012 100644 --- a/manual/manual-api/Makefile +++ b/manual/manual-api/Makefile @@ -2,8 +2,8 @@ INCLUDES = -I . SRC_DET = mainClient.cpp SRC_REC = mainReceiver.cpp LIBDIR = ../../bin -LDFLAG_DET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread -LDFLAG_REC = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -lpthread +LDFLAG_DET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread +LDFLAG_REC = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread DESTDIR ?= ../docs diff --git a/manual/manual-api/mainClient.cpp b/manual/manual-api/mainClient.cpp index cf2a335dfa..15838ba865 100644 --- a/manual/manual-api/mainClient.cpp +++ b/manual/manual-api/mainClient.cpp @@ -4,7 +4,7 @@ This file is an example of how to implement the slsDetectorUsers class You can compile it linking it to the slsDetector library -gcc mainClient.cpp -L lib -l SlsDetector -lm -lpthread +gcc mainClient.cpp -L lib -l SlsDetector -lm -pthread where lib is the location of libSlsDetector.so diff --git a/manual/manual-api/mainReceiver.cpp b/manual/manual-api/mainReceiver.cpp index 60276a9690..c0727dfa56 100644 --- a/manual/manual-api/mainReceiver.cpp +++ b/manual/manual-api/mainReceiver.cpp @@ -9,7 +9,7 @@ This file is an example of how to implement the slsDetectorUsers class You can compile it linking it to the slsDetector library -gcc mainReceiver.cpp -L lib -l SlsDetector -lm -lpthread +gcc mainReceiver.cpp -L lib -l SlsDetector -lm -pthread where lib is the location of libSlsDetector.so diff --git a/users/Makefile b/users/Makefile index 8922830370..3c5c83e572 100644 --- a/users/Makefile +++ b/users/Makefile @@ -2,8 +2,8 @@ WD = $(shell pwd) LIBDIR = $(WD)/../bin LIBRARYRXRDIR = $(WD)/../slsReceiverSoftware LIBRARYDETDIR = $(WD)/../slsDetectorSoftware -LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -lpthread -LDFLAGDET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread +LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread +LDFLAGDET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread INCLUDESRXR = -I $(LIBRARYRXRDIR)/include INCLUDESDET = -I $(LIBRARYRXRDIR)/include -I $(LIBRARYDETDIR)/slsDetector -I $(LIBRARYDETDIR)/slsDetectorAnalysis diff --git a/users/Makefile_new b/users/Makefile_new index ddc0050189..0f5bae42a3 100644 --- a/users/Makefile_new +++ b/users/Makefile_new @@ -2,8 +2,8 @@ WD = $(shell pwd) LIBDIR = $(WD)/../bin LIBRARYRXRDIR = $(WD)/../slsReceiverSoftware LIBRARYDETDIR = $(WD)/../slsDetectorSoftware -LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -lpthread -LDFLAGDET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread +LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread +LDFLAGDET = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread INCLUDESRXR = -I $(LIBRARYRXRDIR)/include INCLUDESDET = -I $(LIBRARYDETDIR)/slsDetector -I $(LIBRARYDETDIR)/slsDetectorAnalysis diff --git a/users/mainClient.cpp b/users/mainClient.cpp index df03ad74e8..e7310e1a38 100644 --- a/users/mainClient.cpp +++ b/users/mainClient.cpp @@ -4,10 +4,10 @@ This file is an example of how to implement the slsDetectorUsers class You can compile it linking it to the slsDetector library -gcc mainClient.cpp -L lib -l SlsDetector -lm -lpthread +gcc mainClient.cpp -L lib -l SlsDetector -lm -pthread where lib is the location of libSlsDetector.so -gcc mainClient.cpp -L . -l SlsDetector -lm -lpthread -o users +gcc mainClient.cpp -L . -l SlsDetector -lm -pthread -o users */ diff --git a/users/mainClient_new.cpp b/users/mainClient_new.cpp index 9208c0b971..6490888ec5 100644 --- a/users/mainClient_new.cpp +++ b/users/mainClient_new.cpp @@ -5,10 +5,10 @@ This file is an example of how to implement the slsDetectorUsers class You can compile it linking it to the slsDetector library -gcc mainClient.cpp -L lib -l SlsDetector -lm -lpthread +gcc mainClient.cpp -L lib -l SlsDetector -lm -pthread where lib is the location of libSlsDetector.so -gcc mainClient.cpp -L . -l SlsDetector -lm -lpthread -o users +gcc mainClient.cpp -L . -l SlsDetector -lm -pthread -o users */ From 7c3b5065a5af163859f015c8397e8d1e1bd1c02c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:25:09 +0200 Subject: [PATCH 12/48] changed all -lpthread to -pthread --- slsDetectorGui/client/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slsDetectorGui/client/Makefile b/slsDetectorGui/client/Makefile index 5545785fa8..c7ea673022 100644 --- a/slsDetectorGui/client/Makefile +++ b/slsDetectorGui/client/Makefile @@ -1,6 +1,6 @@ CC = g++ CLAGS += -DVERBOSE #VERYBOSE -LDLIBS += -lm -lstdc++ -lpthread +LDLIBS += -lm -lstdc++ -pthread LDIR = ../../slsDetectorSoftware RDIR = ../../slsReceiverSoftware From b91180f5b2f04e500d6f6bf6cd259a93d9c83c5f Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:26:03 +0200 Subject: [PATCH 13/48] changed all -lpthread to -pthread --- slsDetectorSoftware/Makefile | 4 ++-- .../slsDetectorClient/Makefile | 2 +- .../slsDetectorClient/Makefile.x04sa | 2 +- slsDetectorSoftware/threadFiles/Makefile | 20 +++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index e28fae7905..2f5ff41539 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -69,14 +69,14 @@ gotthardVirtualServer: $(SRC_MYTHEN_SVC) %.o : %.cpp %.h Makefile - $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread -lrt $(LIBZMQ) $(FLAGS) + $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -pthread -lrt $(LIBZMQ) $(FLAGS) package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a $(DESTDIR)/libSlsDetector.so: $(OBJS) - $(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -lpthread -lrt $(LIBZMQ) + $(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread -lrt $(LIBZMQ) $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) mv libSlsDetector.so $(DESTDIR) diff --git a/slsDetectorSoftware/slsDetectorClient/Makefile b/slsDetectorSoftware/slsDetectorClient/Makefile index fef04074ae..63a49637ae 100644 --- a/slsDetectorSoftware/slsDetectorClient/Makefile +++ b/slsDetectorSoftware/slsDetectorClient/Makefile @@ -13,7 +13,7 @@ INCLUDES?= -I../commonFiles -I../slsDetector -I ../MySocketTCP -I../usersFuncti LIBDIR?=../ LIBS?= -L$(LIBDIR) -lSlsDetector -LDFLAG= -L/usr/lib64/ -lpthread +LDFLAG= -L/usr/lib64/ -pthread DESTDIR ?= bin diff --git a/slsDetectorSoftware/slsDetectorClient/Makefile.x04sa b/slsDetectorSoftware/slsDetectorClient/Makefile.x04sa index 7e2daa9bdb..af02ea1769 100644 --- a/slsDetectorSoftware/slsDetectorClient/Makefile.x04sa +++ b/slsDetectorSoftware/slsDetectorClient/Makefile.x04sa @@ -2,7 +2,7 @@ CFLAGS= -DC_ONLY FLAGS=-DVERBOSE INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/usersFunctions -I../slsDetectorSoftware/multiSlsDetector -I../slsDetectorSoftware/slsDetectorAnalysis LIBS= -L../slsDetectorSoftware/ -LDFLAG= -lSlsDetector -lpthread +LDFLAG= -lSlsDetector -pthread EPICSFLAGS=-DEPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/SL5-x86/ -Wl,-R/usr/local/epics/base/lib/SL5-x86 -lca -lCom diff --git a/slsDetectorSoftware/threadFiles/Makefile b/slsDetectorSoftware/threadFiles/Makefile index 19b5b40e49..a1eb27d297 100644 --- a/slsDetectorSoftware/threadFiles/Makefile +++ b/slsDetectorSoftware/threadFiles/Makefile @@ -2,20 +2,20 @@ OBJPATH=bin/obj EXAMPLEPATH=bin/example all: - g++ CondVar.cpp -lpthread -c -g -o $(OBJPATH)/CondVar.o - g++ Mutex.cpp -lpthread -c -g -o $(OBJPATH)/Mutex.o - #g++ Task.cpp -lpthread -c -g -o $(OBJPATH)/Task.o - g++ ThreadPool.cpp -lpthread -c -g -o $(OBJPATH)/ThreadPool.o - g++ Multi.cpp -lpthread -c -g -o $(OBJPATH)/Multi.o - #g++ $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/Task.o $(OBJPATH)/ThreadPool.o threadpool_test.cpp Single.cpp Multi.cpp -lpthread -I . -g -o $(EXAMPLEPATH)threadpool_test - g++ $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/ThreadPool.o threadpool_test.cpp Single.cpp Multi.cpp -lpthread -I . -g -o $(EXAMPLEPATH)threadpool_test + g++ CondVar.cpp -pthread -c -g -o $(OBJPATH)/CondVar.o + g++ Mutex.cpp -pthread -c -g -o $(OBJPATH)/Mutex.o + #g++ Task.cpp -pthread -c -g -o $(OBJPATH)/Task.o + g++ ThreadPool.cpp -pthread -c -g -o $(OBJPATH)/ThreadPool.o + g++ Multi.cpp -pthread -c -g -o $(OBJPATH)/Multi.o + #g++ $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/Task.o $(OBJPATH)/ThreadPool.o threadpool_test.cpp Single.cpp Multi.cpp -pthread -I . -g -o $(EXAMPLEPATH)threadpool_test + g++ $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/ThreadPool.o threadpool_test.cpp Single.cpp Multi.cpp -pthread -I . -g -o $(EXAMPLEPATH)threadpool_test #all: -# g++ threadpool.cpp -lpthread -fpic -c -o bin/obj/threadpool.o -# g++ -L./bin bin/obj/threadpool.o -lpthread threadpool_test.cpp -o bin/example/threadpool_test +# g++ threadpool.cpp -pthread -fpic -c -o bin/obj/threadpool.o +# g++ -L./bin bin/obj/threadpool.o -pthread threadpool_test.cpp -o bin/example/threadpool_test #threadpool: -# g++ threadpool.cpp -lpthread -fpic -c -o bin/obj/threadpool.o +# g++ threadpool.cpp -pthread -fpic -c -o bin/obj/threadpool.o # g++ -shared -fPIC bin/obj/threadpool.o -o bin/lib/libthreadpool.so #example: # g++ -L./bin/lib -lthreadpool threadpool_test.cpp -o threadpool_test From bd5293f4b184ece0cee6e4c7e6a4f03865950127 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:26:09 +0200 Subject: [PATCH 14/48] changed all -lpthread to -pthread --- slsReceiverSoftware/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slsReceiverSoftware/Makefile b/slsReceiverSoftware/Makefile index d94ac77a04..c65f2806e4 100644 --- a/slsReceiverSoftware/Makefile +++ b/slsReceiverSoftware/Makefile @@ -54,7 +54,7 @@ $(BUILDDIR)/%.o : $(SRCDIR)/%.cpp Makefile ifeq ($(ROOTSLS),yes) $(CXX) -DROOTSLS -o $@ -c $< $(INCLUDES) $(DFLAGS) $(ROOTFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -L/usr/lib64/ $(FLAGS) else - $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -lpthread $(FLAGS) $(LIBZMQ) -lrt + $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -pthread $(FLAGS) $(LIBZMQ) -lrt endif lib: $(OBJS) $(DESTDIR)/libSlsReceiver.so $(DESTDIR)/libSlsReceiver.a @@ -63,7 +63,7 @@ receiver: $(DESTDIR)/slsReceiver $(DESTDIR)/libSlsReceiver.so: $(OBJS) - $(CXX) -shared -Wl,-soname,libSlsReceiver.so -o libSlsReceiver.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -lpthread $(LIBZMQ) -lrt + $(CXX) -shared -Wl,-soname,libSlsReceiver.so -o libSlsReceiver.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread $(LIBZMQ) -lrt $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) mv libSlsReceiver.so $(DESTDIR) From 8fb39b8c7ec5b7d4c02568972c86968e69f671da Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:27:27 +0200 Subject: [PATCH 15/48] changed all -lpthread to -pthread --- Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index 7357ba2a9e..5d74d15bd6 100755 --- a/Makefile.include +++ b/Makefile.include @@ -7,7 +7,7 @@ CXX = $(CC) ASM=$(shell echo "/lib/modules/`uname -r`/build/include") LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread -FLAGS= -Wall -DVERBOSE -DVERYVERBOSE #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG +FLAGS= -Wall -pthread -DVERBOSE -DVERYVERBOSE #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG # -DVERBOSE # Setting up the verbose flags From 5ddccbdee4043a967bfdc92c6fe90069b2796c5d Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:28:00 +0200 Subject: [PATCH 16/48] changed all -lpthread to -pthread --- Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.include b/Makefile.include index 5d74d15bd6..bfdb2d673a 100755 --- a/Makefile.include +++ b/Makefile.include @@ -12,10 +12,10 @@ FLAGS= -Wall -pthread -DVERBOSE -DVERYVERBOSE #-DEIGER_DEBUG2 -DEIGER_DEBUG -D # Setting up the verbose flags ifeq ($(DEBUG),1) - FLAGS = -Wall -DVERBOSE + FLAGS = -Wall -pthread -DVERBOSE endif ifeq ($(DEBUG),2) - FLAGS = -Wall -DVERYVERBOSE + FLAGS = -Wall -pthread -DVERYVERBOSE endif ############################################################## From f0198d2d2ede5631acf5e907f538b607d800a0cf Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:50:17 +0200 Subject: [PATCH 17/48] alejandro's changes from ESRF --- .../include/UDPStandardImplementation.h | 4 ++-- slsReceiverSoftware/include/circularFifo.h | 2 +- slsReceiverSoftware/include/logger.h | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index ccada5681c..a97ab3de64 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -739,7 +739,7 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase //***data call back thread parameters*** /** Ensures if zmq threads created successfully */ - bool zmqThreadStarted; + volatile bool zmqThreadStarted; /** Number of data callback Threads */ int numberofDataCallbackThreads; @@ -760,7 +760,7 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase //***general and listening thread parameters*** /** Ensures if threads created successfully */ - bool threadStarted; + volatile bool threadStarted; /** Current Thread Index*/ int currentThreadIndex; diff --git a/slsReceiverSoftware/include/circularFifo.h b/slsReceiverSoftware/include/circularFifo.h index 1d6fd427de..b0d70eab4b 100644 --- a/slsReceiverSoftware/include/circularFifo.h +++ b/slsReceiverSoftware/include/circularFifo.h @@ -134,7 +134,7 @@ bool CircularFifo::isEmpty() const template bool CircularFifo::isFull() const { - int tailCheck = (tail+1) % Capacity; + int tailCheck = increment(tail); return (tailCheck == head); } diff --git a/slsReceiverSoftware/include/logger.h b/slsReceiverSoftware/include/logger.h index d01b1db2d6..ff1762c19a 100644 --- a/slsReceiverSoftware/include/logger.h +++ b/slsReceiverSoftware/include/logger.h @@ -123,14 +123,18 @@ inline std::string NowTime() inline std::string NowTime() { char buffer[11]; + const int buffer_len = sizeof(buffer); time_t t; time(&t); tm r = {0}; - strftime(buffer, sizeof(buffer), "%X", localtime_r(&t, &r)); + strftime(buffer, buffer_len, "%X", localtime_r(&t, &r)); + buffer[buffer_len - 1] = 0; struct timeval tv; gettimeofday(&tv, 0); - char result[100] = {0}; - sprintf(result, "%s.%03ld", buffer, (long)tv.tv_usec / 1000); + char result[100]; + const int result_len = sizeof(result); + snprintf(result, result_len, "%s.%03ld", buffer, (long)tv.tv_usec / 1000); + result[result_len - 1] = 0; return result; } @@ -144,7 +148,8 @@ template std::ostringstream& Log::Get(TLogLevel level) lev = level; os << "- " << NowTime(); os << " " << ToString(level) << ": "; - os << std::string(level > logDEBUG ? level - logDEBUG : 0, '\t'); + if (level > logDEBUG) + os << std::string(level - logDEBUG, '\t'); return os; } @@ -216,14 +221,15 @@ inline void Output2FILE::Output(const std::string& msg, TLogLevel level) FILE* pStream = Stream(); if (!pStream) return; + bool out = true; switch(level){ case logERROR: cprintf(RED BOLD,"%s",msg.c_str()); break; case logWARNING: cprintf(YELLOW BOLD,"%s",msg.c_str()); break; case logINFO: cprintf(GRAY,"%s",msg.c_str());break; // case logINFO: cprintf(DARKGRAY BOLD,"%s",msg.c_str());break; - default: fprintf(pStream,"%s",msg.c_str()); break; + default: fprintf(pStream,"%s",msg.c_str()); out = false; break; } - fflush(pStream); + fflush(out ? stdout : pStream); } #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) From 7c725cc69b1ba2deb0f825d21066d34ae229c65a Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:57:19 +0200 Subject: [PATCH 18/48] .c_str() must not access global variables from thread --- slsReceiverSoftware/src/UDPStandardImplementation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index d26ec75ca0..6075e0666f 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -2523,8 +2523,7 @@ uint32_t UDPStandardImplementation::processListeningBuffer(int ithread, int &cSi break; default: - cprintf(RED,"Listening_Thread %d: Error: This detector %s is not implemented in the receiver\n", - ithread, getDetectorType(myDetectorType).c_str()); + cprintf(RED,"Listening_Thread %d: Error: This detector is not implemented in the receiver\n", ithread); break; } From ab94af6d2922e6386adf500df710992cf4a12ba4 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 15:08:40 +0200 Subject: [PATCH 19/48] removed verbose etc --- Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index bfdb2d673a..e76952335f 100755 --- a/Makefile.include +++ b/Makefile.include @@ -7,7 +7,7 @@ CXX = $(CC) ASM=$(shell echo "/lib/modules/`uname -r`/build/include") LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread -FLAGS= -Wall -pthread -DVERBOSE -DVERYVERBOSE #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG +FLAGS= -Wall -pthread #-DEIGER_DEBUG2 -DEIGER_DEBUG -DEIGER_DEBUG3 #-DFIFO_DEBUG # -DVERBOSE # Setting up the verbose flags From 4f83fcb001071ab37ac3f0496c41bb68a907bcc7 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 09:02:10 +0200 Subject: [PATCH 20/48] updaterev --- slsDetectorGui/gitInfo.txt | 10 +++++----- slsDetectorGui/include/gitInfoGui.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsDetectorGui/gitInfo.txt b/slsDetectorGui/gitInfo.txt index c627d20965..f63ad47239 100644 --- a/slsDetectorGui/gitInfo.txt +++ b/slsDetectorGui/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorGui URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git -Repsitory UUID: c43f58653a9b90aade45b9649810ff11225ca844 -Revision: 379 -Branch: 2.3-rc +Repsitory UUID: bddd126e382c1b2e8082419ff393f6e1fb17526a +Revision: 381 +Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 379 -Last Changed Date: 2016-12-16 14:46:02 +0100 +Last Changed Rev: 381 +Last Changed Date: 2017-04-07 14:25:09 +0200 diff --git a/slsDetectorGui/include/gitInfoGui.h b/slsDetectorGui/include/gitInfoGui.h index 3c2a38f68b..7d0f53315e 100644 --- a/slsDetectorGui/include/gitInfoGui.h +++ b/slsDetectorGui/include/gitInfoGui.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_gui.git" //#define SVNREPPATH "" -#define SVNREPUUID "c43f58653a9b90aade45b9649810ff11225ca844" -//#define SVNREV 0x379 +#define SVNREPUUID "bddd126e382c1b2e8082419ff393f6e1fb17526a" +//#define SVNREV 0x381 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x379 -#define SVNDATE 0x20161216 +#define SVNREV 0x381 +#define SVNDATE 0x20170407 // From 17cb63a57f3c3b77412d57aaf6c1f9f4c7a9f27f Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 09:03:19 +0200 Subject: [PATCH 21/48] updaterev --- slsDetectorSoftware/gitInfo.txt | 10 +++++----- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 5bd5174f4d..22abc58a9c 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: 3618c87c5cd000fff7799ddd8cd07a4162d9fdec -Revision: 1340 -Branch: 2.3 +Repsitory UUID: 008ed7012306d2ab0911963d6b82c6fb23f5d94a +Revision: 1344 +Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1340 -Last Changed Date: 2017-03-23 13:46:02 +0100 +Last Changed Rev: 1344 +Last Changed Date: 2017-04-07 14:26:03 +0200 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index e12835184b..a6363c728e 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "3618c87c5cd000fff7799ddd8cd07a4162d9fdec" -//#define SVNREV 0x1340 +#define SVNREPUUIDLIB "008ed7012306d2ab0911963d6b82c6fb23f5d94a" +//#define SVNREV 0x1344 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1340 -#define SVNDATELIB 0x20170323 +#define SVNREVLIB 0x1344 +#define SVNDATELIB 0x20170407 // From 6ecca8fcb0c3e5f7155b94970344b6b58f62dff1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 09:03:26 +0200 Subject: [PATCH 22/48] updaterev --- slsReceiverSoftware/gitInfo.txt | 10 +++++----- slsReceiverSoftware/include/gitInfoReceiver.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index bfc610dae6..793f120513 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git -Repsitory UUID: a453c1d55d73fecc18af9df6ada21621a989ee4b -Revision: 514 -Branch: 2.3 +Repsitory UUID: 8d07417b37c1cc24c0350404c0e52baee1aa0dc7 +Revision: 519 +Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 514 -Last Changed Date: 2017-03-24 13:41:56 +0100 +Last Changed Rev: 519 +Last Changed Date: 2017-04-07 14:57:19 +0200 diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index 29510e4e99..bf5a17e702 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "a453c1d55d73fecc18af9df6ada21621a989ee4b" -//#define SVNREV 0x514 +#define SVNREPUUID "8d07417b37c1cc24c0350404c0e52baee1aa0dc7" +//#define SVNREV 0x519 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x514 -#define SVNDATE 0x20170324 +#define SVNREV 0x519 +#define SVNDATE 0x20170407 // From 43efb8acfddcb2f42968565a315dcdc66f227d6c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:31:32 +0200 Subject: [PATCH 23/48] removing warnings shown from esrf debian --- .../multiSlsDetector/multiSlsDetector.cpp | 7 +- .../slsDetector/slsDetector.cpp | 103 ++++++++++-------- slsDetectorSoftware/slsDetector/slsDetector.h | 2 +- .../slsDetector/slsDetectorActions.cpp | 4 +- .../slsDetector/slsDetectorCommand.cpp | 26 ++--- .../slsDetectorAnalysis/energyConversion.cpp | 6 +- .../slsDetectorAnalysis/energyConversion.h | 2 +- .../slsDetectorAnalysis/fileIOStatic.h | 2 - .../slsDetectorAnalysis/postProcessing.cpp | 4 + .../threadFiles/ThreadPool.cpp | 5 +- 10 files changed, 87 insertions(+), 74 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index fb1ae4bda2..d792ab0c21 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -1436,7 +1436,7 @@ int* multiSlsDetector::getDataFromDetector() { int n = 0; int* retval= NULL; int *retdet, *p=retval; - int nodata=1, nodatadet=-1; + int nodatadet=-1; int nodatadetectortype = false; detectorType types = getDetectorsType(); if(types == EIGER || types == JUNGFRAU){ @@ -1455,7 +1455,6 @@ int* multiSlsDetector::getDataFromDetector() { if(!nodatadetectortype){ n=detectors[id]->getDataBytes(); if (retdet) { - nodata=0; #ifdef VERBOSE cout << "Detector " << id << " returned " << n << " bytes " << endl; #endif @@ -2105,7 +2104,6 @@ slsDetectorDefs::ROI* multiSlsDetector::getROI(int &n){ n = 0; int num = 0,i,j; int ndet = thisMultiDetector->numberOfDetectors; - int nroi[ndet]; int maxroi = ndet*MAX_ROIS; ROI temproi; ROI roiLimits[maxroi]; @@ -2120,7 +2118,6 @@ slsDetectorDefs::ROI* multiSlsDetector::getROI(int &n){ if(detectors[i]->getErrorMask()) setErrorMask(getErrorMask()|(1<setRateCorrection(t); if(detectors[idet]->getErrorMask()) setErrorMask(getErrorMask()|(1<nModsMax; imod++) { @@ -967,66 +967,67 @@ slsDetectorDefs::sls_detector_module* slsDetector::createModule(detectorType t) sls_detector_module *myMod=(sls_detector_module*)malloc(sizeof(sls_detector_module)); - int nch, nm, nc, nd, na=0; + int nch, nc, nd, na=0; + //int nm = 0; switch(t) { case MYTHEN: nch=128; // complete mythen system - nm=24; + // nm=24; nc=10; nd=6; // dacs break; case PICASSO: nch=128; // complete mythen system - nm=24; + // nm=24; nc=12; nd=6; // dacs+adcs break; case GOTTHARD: nch=128; - nm=1; + // nm=1; nc=10; nd=8; // dacs+adcs na=5; break; case PROPIX: nch=22*22; - nm=1; + // nm=1; nc=1; nd=8; // dacs+adcs na=5; break; case EIGER: nch=256*256; // one EIGER half module - nm=1; //modules/detector + // nm=1; //modules/detector nc=4*1; //chips nd=16; //dacs na=0; break; case MOENCH: nch=160*160; - nm=1; //modules/detector + // nm=1; //modules/detector nc=1; //chips nd=8; //dacs na=1; break; case JUNGFRAU: nch=256*256;//32; - nm=1; + // nm=1; nc=4*2; nd=16; // dacs+adcs na=0; break; case JUNGFRAUCTB: nch=32;//32; - nm=1; + // nm=1; nc=1; nd=8; // dacs+adcs na=1; break; default: nch=0; // dum! - nm=0; //modules/detector + // nm=0; //modules/detector nc=0; //chips nd=0; //dacs+adcs na=0; @@ -1672,7 +1673,6 @@ int slsDetector::setNumberOfModules(int n, dimension d){ int ret=FAIL; char mess[MAX_STR_LENGTH]="dummy"; int connect; - int num; arg[0]=d; arg[1]=n; @@ -1693,11 +1693,11 @@ int slsDetector::setNumberOfModules(int n, dimension d){ if (connect == UNDEFINED) printf( "no control socket? \n" ); else if (connect == OK){ - num = controlSocket->SendDataOnly(&fnum,sizeof(fnum)); - num = controlSocket->SendDataOnly(&arg,sizeof(arg)); - num = controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); + controlSocket->SendDataOnly(&fnum,sizeof(fnum)); + controlSocket->SendDataOnly(&arg,sizeof(arg)); + controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret!=FAIL) { - num = controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); + controlSocket->ReceiveDataOnly(&retval,sizeof(retval)); } else { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); printf( "Detector returned error: %s \n", mess ); @@ -3728,18 +3728,18 @@ int slsDetector::updateDetectorNoWait() { // int ret=OK; enum detectorSettings t; - int thr, n, nm; + int thr, n, nm = 0; // int it; int64_t retval;// tns=-1; char lastClientIP[INET_ADDRSTRLEN]; - n = controlSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); + n += controlSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); #ifdef VERBOSE printf( "Updating detector last modified by %s \n", lastClientIP ); #endif - n = controlSocket->ReceiveDataOnly(&nm,sizeof(nm)); + n += controlSocket->ReceiveDataOnly(&nm,sizeof(nm)); thisDetector->nMod[X]=nm; - n = controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); + n += controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); /// Should be overcome at a certain point! if (thisDetector->myDetectorType==MYTHEN) { @@ -3761,13 +3761,13 @@ int slsDetector::updateDetectorNoWait() { if (thisDetector->nModMax[Y]nMod[Y]) thisDetector->nModMax[Y]=thisDetector->nMod[Y]; - n = controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); + n += controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); thisDetector->dynamicRange=nm; - n = controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); + n += controlSocket->ReceiveDataOnly( &nm,sizeof(nm)); thisDetector->dataBytes=nm; //t=setSettings(GET_SETTINGS); - n = controlSocket->ReceiveDataOnly( &t,sizeof(t)); + n += controlSocket->ReceiveDataOnly( &t,sizeof(t)); thisDetector->currentSettings=t; if((thisDetector->myDetectorType!= GOTTHARD)&& @@ -3775,42 +3775,45 @@ int slsDetector::updateDetectorNoWait() { (thisDetector->myDetectorType!= JUNGFRAU)&& (thisDetector->myDetectorType!= MOENCH)){ //thr=getThresholdEnergy(); - n = controlSocket->ReceiveDataOnly( &thr,sizeof(thr)); + n += controlSocket->ReceiveDataOnly( &thr,sizeof(thr)); thisDetector->currentThresholdEV=thr; } //retval=setFrames(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[FRAME_NUMBER]=retval; // retval=setExposureTime(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[ACQUISITION_TIME]=retval; if(thisDetector->myDetectorType == EIGER){ //retval=setSubFrameExposureTime(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[SUBFRAME_ACQUISITION_TIME]=retval; } //retval=setPeriod(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[FRAME_PERIOD]=retval; //retval=setDelay(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[DELAY_AFTER_TRIGGER]=retval; // retval=setGates(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[GATES_NUMBER]=retval; //retval=setProbes(tns); if (thisDetector->myDetectorType == MYTHEN){ - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[PROBES_NUMBER]=retval; } //retval=setTrains(tns); - n = controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); + n += controlSocket->ReceiveDataOnly( &retval,sizeof(int64_t)); thisDetector->timerValue[CYCLES_NUMBER]=retval; + if (!n) + printf("n: %d\n", n); + return OK; } @@ -4216,7 +4219,6 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ int64_t retval = -1; char mess[MAX_STR_LENGTH]=""; int ret=OK; - int n=0; if (index!=MEASUREMENTS_NUMBER) { @@ -4228,7 +4230,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ if (connectControl() == OK){ controlSocket->SendDataOnly(&fnum,sizeof(fnum)); controlSocket->SendDataOnly(&index,sizeof(index)); - n=controlSocket->SendDataOnly(&t,sizeof(t)); + controlSocket->SendDataOnly(&t,sizeof(t)); controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); if (ret==FAIL) { controlSocket->ReceiveDataOnly(mess,sizeof(mess)); @@ -4705,7 +4707,7 @@ int slsDetector::setSpeed(speedVariable sp, int value) { int retval=-1; char mess[MAX_STR_LENGTH]=""; int ret=OK; - int n=0; + #ifdef VERBOSE printf( "Setting speed variable %d to %d \n", sp, value ); #endif @@ -4713,7 +4715,7 @@ int slsDetector::setSpeed(speedVariable sp, int value) { if (connectControl() == OK){ controlSocket->SendDataOnly(&fnum,sizeof(fnum)); controlSocket->SendDataOnly(&sp,sizeof(sp)); - n=controlSocket->SendDataOnly(&value,sizeof(value)); + controlSocket->SendDataOnly(&value,sizeof(value)); #ifdef VERBOSE printf( "Sent %d bytes \n", n ); #endif @@ -6477,13 +6479,17 @@ int slsDetector::readConfigurationFile(string const fname){ //char *args[1000]; string sargname, sargval; - int iline=0; #ifdef VERBOSE + int iline=0; printf( "config file name %s \n", fname.c_str() ); #endif infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { +#ifdef VERBOSE iline=readConfigurationFile(infile); +#else + readConfigurationFile(infile); +#endif infile.close(); } else { printf( "Error opening configuration file %s for reading \n", fname.c_str() ); @@ -6571,11 +6577,16 @@ int slsDetector::writeConfigurationFile(string const fname){ ofstream outfile; +#ifdef VERBOSE int ret; - +#endif outfile.open(fname.c_str(),ios_base::out); if (outfile.is_open()) { - ret=writeConfigurationFile(outfile); +#ifdef VERBOSE + ret=writeConfigurationFile(outfile); +#else + writeConfigurationFile(outfile); +#endif outfile.close(); } else { @@ -6691,7 +6702,7 @@ int slsDetector::writeConfigurationFile(ofstream &outfile, int id){ -int slsDetector::writeSettingsFile(string fname, int imod, int& iodelay, int& tau){ +int slsDetector::writeSettingsFile(string fname, int imod, int iodelay, int tau){ return writeSettingsFile(fname,thisDetector->myDetectorType, detectorModules[imod], iodelay, tau); @@ -7795,21 +7806,21 @@ string slsDetector::getReceiverLastClientIP(){ int slsDetector::updateReceiverNoWait() { - int n,ind; + int n,ind = 0; char path[MAX_STR_LENGTH]; char lastClientIP[INET_ADDRSTRLEN]; - n = dataSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); + n += dataSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); #ifdef VERBOSE printf( "Updating receiver last modified by %s \n", lastClientIP ); #endif - n = dataSocket->ReceiveDataOnly(&ind,sizeof(ind)); + n += dataSocket->ReceiveDataOnly(&ind,sizeof(ind)); pthread_mutex_lock(&ms); fileIO::setFileIndex(ind); pthread_mutex_unlock(&ms); - n = dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); + n += dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); pthread_mutex_lock(&ms); fileIO::setFilePath(path); pthread_mutex_unlock(&ms); @@ -7819,6 +7830,8 @@ int slsDetector::updateReceiverNoWait() { fileIO::setFileName(path); pthread_mutex_unlock(&ms); + if (!n) printf("n: %d\n", n); + return OK; } diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index ed8f57ac02..fa3cc8e258 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -511,7 +511,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion { \sa ::sls_detector_module sharedSlsDetector mythenDetector::writeSettingsFile(string, int) */ using energyConversion::writeSettingsFile; - int writeSettingsFile(string fname, int imod, int& iodelay, int& tau); + int writeSettingsFile(string fname, int imod, int iodelay, int tau); /** diff --git a/slsDetectorSoftware/slsDetector/slsDetectorActions.cpp b/slsDetectorSoftware/slsDetector/slsDetectorActions.cpp index 5d0b77621a..6db2329a24 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorActions.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorActions.cpp @@ -75,10 +75,10 @@ int slsDetectorActions::setActionScript(int iaction, string fname) { int slsDetectorActions::setActionParameter(int iaction, string par) { - int am; + // int am; if (iaction>=0 && iaction(&iodelay), sizeof(iodelay)); + outfile.write(reinterpret_cast(&tau), sizeof(tau)); outfile.write((char*)mod.chanregs, sizeof(int)*(mod.nchan)); outfile.close(); diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h index 54a104e031..8aec3cb472 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h @@ -119,7 +119,7 @@ class energyConversion \sa ::sls_detector_module mythenDetector::writeSettingsFile(string, sls_detector_module) */ - int writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int& iodelay, int& tau); + int writeSettingsFile(string fname, detectorType myDetectorType, sls_detector_module mod, int iodelay, int tau); /** allocates the momery for a detector module structure \param myDetectorType detector type (needed for number of channels, chips, dacs etc.) diff --git a/slsDetectorSoftware/slsDetectorAnalysis/fileIOStatic.h b/slsDetectorSoftware/slsDetectorAnalysis/fileIOStatic.h index 178f4b9b0c..ae909b06b4 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/fileIOStatic.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/fileIOStatic.h @@ -534,9 +534,7 @@ class fileIOStatic { static int readDataFile(int nch, string fname, double *data, double *err=NULL, double *ang=NULL, char dataformat='f') { \ ifstream infile; \ int iline=0; \ - int maxchans; \ string str; \ - maxchans=nch; \ infile.open(fname.c_str(), ios_base::in); \ if (infile.is_open()) { \ iline=readDataFile(nch, infile, data, err, ang, dataformat, 0); \ diff --git a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp index 5f331775f6..8d8a364525 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp @@ -879,10 +879,14 @@ void postProcessing::startThread(int delflag) { else ret = pthread_create(&dataProcessingThread, &tattr,startProcessDataNoDelete, (void*)this); + if (ret) + printf("ret %d\n", ret); + pthread_attr_destroy(&tattr); // scheduling parameters of target thread ret = pthread_setschedparam(dataProcessingThread, policy, ¶m); + } diff --git a/slsDetectorSoftware/threadFiles/ThreadPool.cpp b/slsDetectorSoftware/threadFiles/ThreadPool.cpp index e1d473ead5..2a1781d5ce 100644 --- a/slsDetectorSoftware/threadFiles/ThreadPool.cpp +++ b/slsDetectorSoftware/threadFiles/ThreadPool.cpp @@ -67,12 +67,13 @@ int ThreadPool::destroy_threadpool(){ /*cout << "Broadcasting STOP signal to all threads..." << endl;*/ m_task_cond_var.broadcast(); // notify all threads we are shttung down - int ret = -1; + //int ret = -1; for (int i = 0; i < m_pool_size; i++) { void* result; sem_post(&semStart); sem_post(&semDone); - ret = pthread_join(m_threads[i], &result); + //ret = + pthread_join(m_threads[i], &result); /*cout << "pthread_join() returned " << ret << ": " << strerror(errno) << endl;*/ m_task_cond_var.broadcast(); // try waking up a bunch of threads that are still waiting } From 4730c8c0a949f616bc0af4de1f3fbfd08603040f Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:31:49 +0200 Subject: [PATCH 24/48] updaterev --- slsDetectorSoftware/gitInfo.txt | 8 ++++---- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 22abc58a9c..684f07f1d3 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: 008ed7012306d2ab0911963d6b82c6fb23f5d94a -Revision: 1344 +Repsitory UUID: a73101093961c0619ba909bad883c79e680a3f22 +Revision: 1346 Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1344 -Last Changed Date: 2017-04-07 14:26:03 +0200 +Last Changed Rev: 1346 +Last Changed Date: 2017-04-11 13:31:32 +0200 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index a6363c728e..c6b6ee605d 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "008ed7012306d2ab0911963d6b82c6fb23f5d94a" -//#define SVNREV 0x1344 +#define SVNREPUUIDLIB "a73101093961c0619ba909bad883c79e680a3f22" +//#define SVNREV 0x1346 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1344 -#define SVNDATELIB 0x20170407 +#define SVNREVLIB 0x1346 +#define SVNDATELIB 0x20170411 // From 0c9ac8911a329a3bf913344463ef723d815db2e5 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:39:28 +0200 Subject: [PATCH 25/48] removing warnings shown from esrf debian --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 4 ++-- slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 93e544196a..20e6976d50 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -3728,7 +3728,7 @@ int slsDetector::updateDetectorNoWait() { // int ret=OK; enum detectorSettings t; - int thr, n, nm = 0; + int thr, n = 0, nm; // int it; int64_t retval;// tns=-1; char lastClientIP[INET_ADDRSTRLEN]; @@ -7806,7 +7806,7 @@ string slsDetector::getReceiverLastClientIP(){ int slsDetector::updateReceiverNoWait() { - int n,ind = 0; + int n = 0,ind; char path[MAX_STR_LENGTH]; char lastClientIP[INET_ADDRSTRLEN]; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index 0b846988a8..c510395348 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -5363,13 +5363,11 @@ string slsDetectorCommand::cmdPulse(int narg, char *args[], int action) { } - return string(""); -/* + if(retval == OK) return string(" successful"); else return string(" failed"); - */ } From 9cf5714a5b0ddbaff17e37b1e63d8557c999a12c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:39:35 +0200 Subject: [PATCH 26/48] removing warnings shown from esrf debian --- slsReceiverSoftware/src/UDPStandardImplementation.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 6075e0666f..98140d4e23 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1810,7 +1810,6 @@ void UDPStandardImplementation::startDataCallback(){ char buf[1000]; uint64_t acquisitionIndex = -1; uint64_t frameIndex = -1; - uint32_t subframeIndex = -1; #ifdef DEBUG int oldpnum = -1; #endif @@ -1834,7 +1833,6 @@ void UDPStandardImplementation::startDataCallback(){ //update frame details frameIndex = fnum; acquisitionIndex = fnum - startAcquisitionIndex; - if(dynamicRange == 32) subframeIndex = snum; int len = sprintf(buf,jsonFmt, SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ @@ -1954,7 +1952,6 @@ void UDPStandardImplementation::startDataCallback(){ //update frame details frameIndex = fnum; acquisitionIndex = fnum - startAcquisitionIndex; - if(dynamicRange == 32) subframeIndex = snum; int len = sprintf(buf,jsonFmt, SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ @@ -1992,7 +1989,6 @@ void UDPStandardImplementation::startDataCallback(){ //update frame details frameIndex = fnum; acquisitionIndex = fnum - startAcquisitionIndex; - if(dynamicRange == 32) subframeIndex = snum; int len = sprintf(buf,jsonFmt, SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ @@ -3305,7 +3301,6 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer int once = 0; int xmax = 0, ymax = 0; //max pixels in x and y direction int xmin = 1, ymin = 1; //min pixels in x and y direction - double tot, tl, tr, bl, br; //determining xmax and ymax switch(myDetectorType){ @@ -3351,11 +3346,6 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer for(int iy = ymin - 1; iy < ymax+1; iy++){ thisEvent=singlePhotonDetectorObject[ithread]->getEventType(buff[0], ix, iy, commonModeSubtractionEnable); if (nf>1000) { - tot=0; - tl=0; - tr=0; - bl=0; - br=0; if (thisEvent==PHOTON_MAX) { receiverData[ithread]->getFrameNumber(buff[0]); //iFrame=receiverData[ithread]->getFrameNumber(buff); From d7982e178e1950aeb1d2223043f33bdd35734810 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:39:53 +0200 Subject: [PATCH 27/48] updaterev --- slsDetectorSoftware/gitInfo.txt | 8 ++++---- slsDetectorSoftware/slsDetector/gitInfoLib.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 684f07f1d3..68f0d36c8c 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: a73101093961c0619ba909bad883c79e680a3f22 -Revision: 1346 +Repsitory UUID: 7a0a1ee8734440dc4e1e638d6fec1eaa9d2404ae +Revision: 1348 Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1346 -Last Changed Date: 2017-04-11 13:31:32 +0200 +Last Changed Rev: 1348 +Last Changed Date: 2017-04-11 13:39:28 +0200 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index c6b6ee605d..a08358465d 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "a73101093961c0619ba909bad883c79e680a3f22" -//#define SVNREV 0x1346 +#define SVNREPUUIDLIB "7a0a1ee8734440dc4e1e638d6fec1eaa9d2404ae" +//#define SVNREV 0x1348 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1346 +#define SVNREVLIB 0x1348 #define SVNDATELIB 0x20170411 // From 9468b9ca1e56f809f1ed17e0b7a5d2d55c83d485 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 11 Apr 2017 13:39:59 +0200 Subject: [PATCH 28/48] updaterev --- slsReceiverSoftware/gitInfo.txt | 8 ++++---- slsReceiverSoftware/include/gitInfoReceiver.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index 793f120513..e3052e62d4 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git -Repsitory UUID: 8d07417b37c1cc24c0350404c0e52baee1aa0dc7 -Revision: 519 +Repsitory UUID: db080a125daed36a1fa85b00df7a239e22ae5130 +Revision: 521 Branch: 2.3.1 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 519 -Last Changed Date: 2017-04-07 14:57:19 +0200 +Last Changed Rev: 521 +Last Changed Date: 2017-04-11 13:39:35 +0200 diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index bf5a17e702..1b3f7e886c 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "8d07417b37c1cc24c0350404c0e52baee1aa0dc7" -//#define SVNREV 0x519 +#define SVNREPUUID "db080a125daed36a1fa85b00df7a239e22ae5130" +//#define SVNREV 0x521 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x519 -#define SVNDATE 0x20170407 +#define SVNREV 0x521 +#define SVNDATE 0x20170411 // From 91b7a87557effcc6891a57b676cf7183fad6cc68 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 18 Apr 2017 15:32:01 +0200 Subject: [PATCH 29/48] just started changin frm ostringstream --- slsReceiverSoftware/include/UDPInterface.h | 2 +- .../include/UDPStandardImplementation.h | 3 + slsReceiverSoftware/include/genericSocket.h | 4 +- slsReceiverSoftware/include/logger.h | 281 +--- slsReceiverSoftware/include/slsReceiver.h | 2 +- .../include/slsReceiverTCPIPInterface.h | 2 +- .../src/UDPBaseImplementation.cpp | 253 ++-- slsReceiverSoftware/src/UDPInterface.cpp | 12 +- .../src/UDPStandardImplementation.cpp | 1282 +++++++++++------ slsReceiverSoftware/src/main.cpp | 1 - slsReceiverSoftware/src/slsReceiver.cpp | 18 +- .../src/slsReceiverTCPIPInterface.cpp | 188 +-- 12 files changed, 1177 insertions(+), 871 deletions(-) diff --git a/slsReceiverSoftware/include/UDPInterface.h b/slsReceiverSoftware/include/UDPInterface.h index adaa7e0dec..47e989ef85 100644 --- a/slsReceiverSoftware/include/UDPInterface.h +++ b/slsReceiverSoftware/include/UDPInterface.h @@ -21,7 +21,7 @@ #include "logger.h" -class UDPInterface { +class UDPInterface: public Logger { /* abstract class that defines the UDP interface of an sls detector data receiver. diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index a97ab3de64..1909d45ef7 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -831,6 +831,9 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase /** Progress (currentFrameNumber) Mutex */ pthread_mutex_t progressMutex; + char streambuf[MAX_NUMBER_OF_WRITER_THREADS][MAX_STR_LENGTH]; + char cstreambuf[MAX_STR_LENGTH]; + }; diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index 1e4f2b32ff..2cbe9259ad 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -111,8 +111,8 @@ enum communicationProtocol{ total_sent(0),// sender (client): where to? ip header_packet_size(0) { - memset(&serverAddress, 0, sizeof(serverAddress)); - memset(&clientAddress, 0, sizeof(clientAddress)); + memset(&serverAddress, 0,sizeof(serverAddress)); + memset(&clientAddress,0,sizeof(clientAddress)); // strcpy(hostname,host_ip_or_name); strcpy(lastClientIP,"none"); diff --git a/slsReceiverSoftware/include/logger.h b/slsReceiverSoftware/include/logger.h index ff1762c19a..6d4bd30041 100644 --- a/slsReceiverSoftware/include/logger.h +++ b/slsReceiverSoftware/include/logger.h @@ -1,5 +1,6 @@ -//#ifndef __LOG_H__ -//#define __LOG_H__ +#ifndef __LOG_H__ +#define __LOG_H__ + #include #include @@ -20,230 +21,66 @@ #define FILELOG_MAX_LEVEL logINFO #endif +#define REPORT_LEVEL logDEBUG5 -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) -#define MYCONCAT(x,y) -#define __AT__ string(__FILE__) + string("::") + string(__func__) + string("(): ") -#define __SHORT_FORM_OF_FILE__ \ -(strrchr(__FILE__,'/') \ -? strrchr(__FILE__,'/')+1 \ -: __FILE__ \ -) -#define __SHORT_AT__ string(__SHORT_FORM_OF_FILE__) + string("::") + string(__func__) + string("(): ") - -//":" TOSTRING(__LINE__) - -/* -void error(const char *location, const char *msg){ - printf("Error at %s: %s\n", location, msg); -} -*/ - -inline std::string NowTime(); - -enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5}; - -template class Log{ - public: - Log(); - virtual ~Log(); - std::ostringstream& Get(TLogLevel level = logINFO); - static TLogLevel& ReportingLevel(); - static std::string ToString(TLogLevel level); - static TLogLevel FromString(const std::string& level); - protected: - std::ostringstream os; - TLogLevel lev; - private: - Log(const Log&); - Log& operator =(const Log&); -}; - - -class Output2FILE { -public: - static FILE*& Stream(); - static void Output(const std::string& msg); - static void Output(const std::string& msg, TLogLevel level); -}; - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -# if defined (BUILDING_FILELOG_DLL) -# define FILELOG_DECLSPEC __declspec (dllexport) -# elif defined (USING_FILELOG_DLL) -# define FILELOG_DECLSPEC __declspec (dllimport) -# else -# define FILELOG_DECLSPEC -# endif // BUILDING_DBSIMPLE_DLL -#else -# define FILELOG_DECLSPEC -#endif // _WIN32 - -class FILELOG_DECLSPEC FILELog : public Log {}; -//typedef Log FILELog; - -#ifdef REST -#define FILE_LOG(level) \ - if (level > FILELOG_MAX_LEVEL) ; \ - else if (level > FILELog::ReportingLevel() || !Output2FILE::Stream()) ; \ - else FILELog().Get(level) -#else - #define FILE_LOG(level) \ - if (level > FILELOG_MAX_LEVEL) ; \ - else if (level > FILELog::ReportingLevel() || !Output2FILE::Stream()) ; \ - else FILELog().Get(level) -#endif - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -#include - - - -inline std::string NowTime() +#include -{ - const int MAX_LEN = 200; - char buffer[MAX_LEN]; - if (GetTimeFormatA(LOCALE_USER_DEFAULT, 0, 0, - "HH':'mm':'ss", buffer, MAX_LEN) == 0) - return "Error in NowTime()"; - char result[100] = {0}; - static DWORD first = GetTickCount(); - sprintf(result, "%s.%03ld", buffer, (long)(GetTickCount() - first) % 1000); - return result; -} +class Logger { +public: + Logger(){}; + + enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5}; + + + static void FILE_LOG(TLogLevel level, char* msg) + { + char buffer[11]; + const int buffer_len = sizeof(buffer); + time_t t; + time(&t); + tm r = {0}; + strftime(buffer, buffer_len, "%X", localtime_r(&t, &r)); + buffer[buffer_len - 1] = 0; + struct timeval tv; + gettimeofday(&tv, 0); + char result[100]; + const int result_len = sizeof(result); + snprintf(result, result_len, "%s.%03ld", buffer, (long)tv.tv_usec / 1000); + result[result_len - 1] = 0; + + + /* + const char* const slevel[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4","DEBUG5"}; + ostringstream os; + os << "- " << string(result); + os << " " << string(slevel[level]) << ": "; + // if (level > logDEBUG) + // os << std::string(level - logDEBUG, '\t'); + os << msg; + string smessage = os.str(); + + switch(level){ + case logERROR: cprintf(RED BOLD, "%s\n", smessage.c_str()); break; + case logWARNING: cprintf(YELLOW BOLD, "%s\n", smessage.c_str()); break; + case logINFO: cprintf(GRAY, "%s\n", smessage.c_str()); break; + default: break; + } + */ + + switch(level){ + case logERROR: cprintf(RED BOLD, "- %s ERROR: %s", result, msg); break; + case logWARNING: cprintf(YELLOW BOLD,"- %s WARNING: %s", result, msg); break; + case logINFO: cprintf(GRAY, "- %s INFO: %s", result, msg); break; + default: break; + } + + + fflush(stdout); + } -#else +}; -#include -inline std::string NowTime() -{ - char buffer[11]; - const int buffer_len = sizeof(buffer); - time_t t; - time(&t); - tm r = {0}; - strftime(buffer, buffer_len, "%X", localtime_r(&t, &r)); - buffer[buffer_len - 1] = 0; - struct timeval tv; - gettimeofday(&tv, 0); - char result[100]; - const int result_len = sizeof(result); - snprintf(result, result_len, "%s.%03ld", buffer, (long)tv.tv_usec / 1000); - result[result_len - 1] = 0; - return result; -} - -#endif //WIN32 - - -template Log::Log():lev(logDEBUG){} - -template std::ostringstream& Log::Get(TLogLevel level) -{ - lev = level; - os << "- " << NowTime(); - os << " " << ToString(level) << ": "; - if (level > logDEBUG) - os << std::string(level - logDEBUG, '\t'); - return os; -} - -template Log::~Log() -{ - os << std::endl; -#ifdef REST - T::Output( os.str()); -#else - T::Output( os.str(),lev); -#endif -} - -template TLogLevel& Log::ReportingLevel() -{ - static TLogLevel reportingLevel = logDEBUG5; - return reportingLevel; -} - -template std::string Log::ToString(TLogLevel level) -{ - static const char* const buffer[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4","DEBUG5"}; - return buffer[level]; -} - -template -TLogLevel Log::FromString(const std::string& level) -{ - if (level == "DEBUG5") - return logDEBUG5; - if (level == "DEBUG4") - return logDEBUG4; - if (level == "DEBUG3") - return logDEBUG3; - if (level == "DEBUG2") - return logDEBUG2; - if (level == "DEBUG1") - return logDEBUG1; - if (level == "DEBUG") - return logDEBUG; - if (level == "INFO") - return logINFO; - if (level == "WARNING") - return logWARNING; - if (level == "ERROR") - return logERROR; - Log().Get(logWARNING) << "Unknown logging level '" << level << "'. Using INFO level as default."; - return logINFO; -} - - -inline FILE*& Output2FILE::Stream() -{ - static FILE* pStream = stderr; - return pStream; -} - -inline void Output2FILE::Output(const std::string& msg) -{ - FILE* pStream = Stream(); - if (!pStream) - return; - fprintf(pStream, "%s", msg.c_str()); - fflush(pStream); -} - -inline void Output2FILE::Output(const std::string& msg, TLogLevel level) -{ - FILE* pStream = Stream(); - if (!pStream) - return; - bool out = true; - switch(level){ - case logERROR: cprintf(RED BOLD,"%s",msg.c_str()); break; - case logWARNING: cprintf(YELLOW BOLD,"%s",msg.c_str()); break; - case logINFO: cprintf(GRAY,"%s",msg.c_str());break; - // case logINFO: cprintf(DARKGRAY BOLD,"%s",msg.c_str());break; - default: fprintf(pStream,"%s",msg.c_str()); out = false; break; - } - fflush(out ? stdout : pStream); -} - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -# if defined (BUILDING_FILELOG_DLL) -# define FILELOG_DECLSPEC __declspec (dllexport) -# elif defined (USING_FILELOG_DLL) -# define FILELOG_DECLSPEC __declspec (dllimport) -# else -# define FILELOG_DECLSPEC -# endif // BUILDING_DBSIMPLE_DLL -#else -# define FILELOG_DECLSPEC -#endif // _WIN32 - - - -//#endif //__LOG_H__ +#endif //__LOG_H__ diff --git a/slsReceiverSoftware/include/slsReceiver.h b/slsReceiverSoftware/include/slsReceiver.h index 0dfd2b6a76..2d25235a8e 100644 --- a/slsReceiverSoftware/include/slsReceiver.h +++ b/slsReceiverSoftware/include/slsReceiver.h @@ -18,7 +18,7 @@ *@short creates the UDP and TCP class objects */ -class slsReceiver : private virtual slsReceiverDefs { +class slsReceiver : public Logger, private virtual slsReceiverDefs { public: /** diff --git a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h index f574773aaf..cfcb3b5e3f 100644 --- a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h +++ b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h @@ -17,7 +17,7 @@ *@short interface between receiver and client */ -class slsReceiverTCPIPInterface : private virtual slsReceiverDefs { +class slsReceiverTCPIPInterface : public Logger, private virtual slsReceiverDefs { public: /** diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index 5539b4d95e..dfae32bc26 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -19,7 +19,6 @@ using namespace std; * They access local cache of configuration or detector parameters ******* *************************************************************************/ UDPBaseImplementation::UDPBaseImplementation(){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; initializeMembers(); @@ -33,9 +32,7 @@ UDPBaseImplementation::UDPBaseImplementation(){ } void UDPBaseImplementation::initializeMembers(){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; - FILE_LOG(logDEBUG) << "Info: Initializing base members"; //**detector parameters*** myDetectorType = GENERIC; strcpy(detHostname,""); @@ -93,7 +90,6 @@ UDPBaseImplementation::~UDPBaseImplementation(){} /**initial parameters***/ char *UDPBaseImplementation::getDetectorHostname() const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; //not initialized if(!strlen(detHostname)) @@ -106,7 +102,6 @@ char *UDPBaseImplementation::getDetectorHostname() const{ } int UDPBaseImplementation::getFlippedData(int axis) const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; if(axis<0 || axis > 1) return -1; return flippedData[axis]; } @@ -114,7 +109,6 @@ int UDPBaseImplementation::getFlippedData(int axis) const{ /***file parameters***/ char *UDPBaseImplementation::getFileName() const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; //not initialized if(!strlen(fileName)) @@ -127,7 +121,6 @@ char *UDPBaseImplementation::getFileName() const{ } char *UDPBaseImplementation::getFilePath() const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; //not initialized if(!strlen(filePath)) @@ -139,25 +132,24 @@ char *UDPBaseImplementation::getFilePath() const{ return output; } -uint64_t UDPBaseImplementation::getFileIndex() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return fileIndex;} +uint64_t UDPBaseImplementation::getFileIndex() const{ return fileIndex;} -int UDPBaseImplementation::getScanTag() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return scanTag;} +int UDPBaseImplementation::getScanTag() const{ return scanTag;} -bool UDPBaseImplementation::getFrameIndexEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return frameIndexEnable;} +bool UDPBaseImplementation::getFrameIndexEnable() const{ return frameIndexEnable;} -bool UDPBaseImplementation::getFileWriteEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return fileWriteEnable;} +bool UDPBaseImplementation::getFileWriteEnable() const{ return fileWriteEnable;} -bool UDPBaseImplementation::getOverwriteEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return overwriteEnable;} +bool UDPBaseImplementation::getOverwriteEnable() const{ return overwriteEnable;} -bool UDPBaseImplementation::getDataCompressionEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return dataCompressionEnable;} +bool UDPBaseImplementation::getDataCompressionEnable() const{ return dataCompressionEnable;} /***acquisition count parameters***/ -uint64_t UDPBaseImplementation::getTotalFramesCaught() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return (totalPacketsCaught/packetsPerFrame);} +uint64_t UDPBaseImplementation::getTotalFramesCaught() const{ return (totalPacketsCaught/packetsPerFrame);} -uint64_t UDPBaseImplementation::getFramesCaught() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return (packetsCaught/packetsPerFrame);} +uint64_t UDPBaseImplementation::getFramesCaught() const{ return (packetsCaught/packetsPerFrame);} int64_t UDPBaseImplementation::getAcquisitionIndex() const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; if(!totalPacketsCaught) return -1; @@ -166,12 +158,12 @@ int64_t UDPBaseImplementation::getAcquisitionIndex() const{ /***connection parameters***/ -uint32_t UDPBaseImplementation::getUDPPortNumber() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return udpPortNum[0];} +uint32_t UDPBaseImplementation::getUDPPortNumber() const{ return udpPortNum[0];} -uint32_t UDPBaseImplementation::getUDPPortNumber2() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return udpPortNum[1];} +uint32_t UDPBaseImplementation::getUDPPortNumber2() const{ return udpPortNum[1];} char *UDPBaseImplementation::getEthernetInterface() const{ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + char* output = new char[MAX_STR_LENGTH](); strcpy(output,eth); @@ -181,30 +173,30 @@ char *UDPBaseImplementation::getEthernetInterface() const{ /***acquisition parameters***/ -int UDPBaseImplementation::getShortFrameEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return shortFrameEnable;} +int UDPBaseImplementation::getShortFrameEnable() const{ return shortFrameEnable;} -uint32_t UDPBaseImplementation::getFrameToGuiFrequency() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return frameToGuiFrequency;} +uint32_t UDPBaseImplementation::getFrameToGuiFrequency() const{ return frameToGuiFrequency;} -uint32_t UDPBaseImplementation::getFrameToGuiTimer() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return frameToGuiTimerinMS;} +uint32_t UDPBaseImplementation::getFrameToGuiTimer() const{ return frameToGuiTimerinMS;} -uint32_t UDPBaseImplementation::getDataStreamEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return dataStreamEnable;} +uint32_t UDPBaseImplementation::getDataStreamEnable() const{ return dataStreamEnable;} -uint64_t UDPBaseImplementation::getAcquisitionPeriod() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return acquisitionPeriod;} +uint64_t UDPBaseImplementation::getAcquisitionPeriod() const{ return acquisitionPeriod;} -uint64_t UDPBaseImplementation::getAcquisitionTime() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return acquisitionTime;} +uint64_t UDPBaseImplementation::getAcquisitionTime() const{ return acquisitionTime;} -uint64_t UDPBaseImplementation::getNumberOfFrames() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return numberOfFrames;} +uint64_t UDPBaseImplementation::getNumberOfFrames() const{ return numberOfFrames;} -uint32_t UDPBaseImplementation::getDynamicRange() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return dynamicRange;} +uint32_t UDPBaseImplementation::getDynamicRange() const{ return dynamicRange;} -bool UDPBaseImplementation::getTenGigaEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return tengigaEnable;} +bool UDPBaseImplementation::getTenGigaEnable() const{ return tengigaEnable;} -uint32_t UDPBaseImplementation::getFifoDepth() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return fifoDepth;} +uint32_t UDPBaseImplementation::getFifoDepth() const{ return fifoDepth;} /***receiver status***/ -slsReceiverDefs::runStatus UDPBaseImplementation::getStatus() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return status;} +slsReceiverDefs::runStatus UDPBaseImplementation::getStatus() const{ return status;} -int UDPBaseImplementation::getActivate() const{FILE_LOG(logDEBUG) << __AT__ << " starting"; return activated;} +int UDPBaseImplementation::getActivate() const{ return activated;} /************************************************************************* @@ -214,29 +206,35 @@ int UDPBaseImplementation::getActivate() const{FILE_LOG(logDEBUG) << __AT__ << " /**initial parameters***/ void UDPBaseImplementation::configure(map config_map){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } void UDPBaseImplementation::setFlippedData(int axis, int enable){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + if(axis<0 || axis>1) return; flippedData[axis] = enable==0?0:1; - FILE_LOG(logINFO) << "Flipped Data: " << flippedData[0] << " , " << flippedData[1]; + + ostringstream os; + os << "Flipped Data: " << flippedData[0] << " , " << flippedData[1]; + string message(os.str()); FILE_LOG(logINFO, message); } /***file parameters***/ void UDPBaseImplementation::setFileName(const char c[]){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; if(strlen(c)) strcpy(fileName, c); - FILE_LOG(logINFO) << "File name:" << fileName; + + ostringstream os; + os << "File name:" << fileName; + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setFilePath(const char c[]){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + if(strlen(c)){ //check if filepath exists @@ -245,55 +243,69 @@ void UDPBaseImplementation::setFilePath(const char c[]){ strcpy(filePath,c); else{ strcpy(filePath,""); - FILE_LOG(logWARNING) << "FilePath does not exist:" << filePath; + ostringstream os; + os << "FilePath does not exist:" << filePath; + string message(os.str()); FILE_LOG(logWARNING, message); } strcpy(filePath, c); } - FILE_LOG(logDEBUG) << "Info: File path:" << filePath; + /*FILE_LOG(logDEBUG) << "Info: File path:" << filePath;*/ } void UDPBaseImplementation::setFileIndex(const uint64_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + fileIndex = i; - FILE_LOG(logINFO) << "File Index:" << fileIndex; + ostringstream os; + os << "File Index:" << fileIndex; + string message(os.str()); FILE_LOG(logINFO, message); } //FIXME: needed? void UDPBaseImplementation::setScanTag(const int i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + scanTag = i; - FILE_LOG(logINFO) << "Scan Tag:" << scanTag; + ostringstream os; + os << "Scan Tag:" << scanTag; + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setFrameIndexEnable(const bool b){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + frameIndexEnable = b; - FILE_LOG(logINFO) << "Frame Index Enable: " << stringEnable(frameIndexEnable); + ostringstream os; + os << "Frame Index Enable: " << stringEnable(frameIndexEnable); + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setFileWriteEnable(const bool b){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + fileWriteEnable = b; - FILE_LOG(logINFO) << "File Write Enable: " << stringEnable(fileWriteEnable); + ostringstream os; + os << "File Write Enable: " << stringEnable(fileWriteEnable); + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setOverwriteEnable(const bool b){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + overwriteEnable = b; - FILE_LOG(logINFO) << "Overwrite Enable: " << stringEnable(overwriteEnable); + ostringstream os; + os << "Overwrite Enable: " << stringEnable(overwriteEnable); + string message(os.str()); FILE_LOG(logINFO, message); } int UDPBaseImplementation::setDataCompressionEnable(const bool b){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + dataCompressionEnable = b; - FILE_LOG(logINFO) << "Data Compression : " << stringEnable(dataCompressionEnable); + ostringstream os; + os << "Data Compression : " << stringEnable(dataCompressionEnable); + string message(os.str()); FILE_LOG(logINFO, message); //overridden methods might return FAIL return OK; @@ -302,58 +314,72 @@ int UDPBaseImplementation::setDataCompressionEnable(const bool b){ /***connection parameters***/ void UDPBaseImplementation::setUDPPortNumber(const uint32_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + udpPortNum[0] = i; - FILE_LOG(logINFO) << "UDP Port Number[0]:" << udpPortNum[0]; + ostringstream os; + os << "UDP Port Number[0]:" << udpPortNum[0]; + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setUDPPortNumber2(const uint32_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + udpPortNum[1] = i; - FILE_LOG(logINFO) << "UDP Port Number[1]:" << udpPortNum[1]; + ostringstream os; + os << "UDP Port Number[1]:" << udpPortNum[1]; + string message(os.str()); FILE_LOG(logINFO, message); } void UDPBaseImplementation::setEthernetInterface(const char* c){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + strcpy(eth, c); - FILE_LOG(logINFO) << "Ethernet Interface: " << eth; + ostringstream os; + os << "Ethernet Interface: " << eth; + string message(os.str()); FILE_LOG(logINFO, message); } /***acquisition parameters***/ void UDPBaseImplementation::setShortFrameEnable(const int i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + shortFrameEnable = i; - FILE_LOG(logINFO) << "Short Frame Enable: " << stringEnable(shortFrameEnable); + ostringstream os; + os << "Short Frame Enable: " << stringEnable(shortFrameEnable); + string message(os.str()); FILE_LOG(logINFO, message); } int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + frameToGuiFrequency = freq; - FILE_LOG(logINFO) << "Frame To Gui Frequency:" << frameToGuiFrequency; + ostringstream os; + os << "Frame To Gui Frequency:" << frameToGuiFrequency; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; } void UDPBaseImplementation::setFrameToGuiTimer(const uint32_t time_in_ms){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + frameToGuiTimerinMS = time_in_ms; - FILE_LOG(logINFO) << "Frame To Gui Timer:" << frameToGuiTimerinMS; + ostringstream os; + os << "Frame To Gui Timer:" << frameToGuiTimerinMS; + string message(os.str()); FILE_LOG(logINFO, message); } uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + dataStreamEnable = enable; - FILE_LOG(logINFO) << "Streaming Data from Receiver:" << dataStreamEnable; + ostringstream os; + os << "Streaming Data from Receiver:" << dataStreamEnable; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; @@ -361,60 +387,72 @@ uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){ int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + acquisitionPeriod = i; - FILE_LOG(logINFO) << "Acquisition Period:" << (double)acquisitionPeriod/(1E9) << "s"; + ostringstream os; + os << "Acquisition Period:" << (double)acquisitionPeriod/(1E9) << "s"; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; } int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + acquisitionTime = i; - FILE_LOG(logINFO) << "Acquisition Time:" << (double)acquisitionTime/(1E9) << "s"; + ostringstream os; + os << "Acquisition Time:" << (double)acquisitionTime/(1E9) << "s"; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; } int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + numberOfFrames = i; - FILE_LOG(logINFO) << "Number of Frames:" << numberOfFrames; + ostringstream os; + os << "Number of Frames:" << numberOfFrames; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; } int UDPBaseImplementation::setDynamicRange(const uint32_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + dynamicRange = i; - FILE_LOG(logINFO) << "Dynamic Range:" << dynamicRange; + ostringstream os; + os << "Dynamic Range:" << dynamicRange; + string message(os.str()); FILE_LOG(logINFO, message); //overrridden child classes might return FAIL return OK; } int UDPBaseImplementation::setTenGigaEnable(const bool b){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + tengigaEnable = b; - FILE_LOG(logINFO) << "Ten Giga Enable: " << stringEnable(tengigaEnable); + ostringstream os; + os << "Ten Giga Enable: " << stringEnable(tengigaEnable); + string message(os.str()); FILE_LOG(logINFO, message); //overridden functions might return FAIL return OK; } int UDPBaseImplementation::setFifoDepth(const uint32_t i){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + fifoDepth = i; - FILE_LOG(logINFO) << "Fifo Depth: " << i; + ostringstream os; + os << "Fifo Depth: " << i; + string message(os.str()); FILE_LOG(logINFO, message); //overridden functions might return FAIL return OK; @@ -428,79 +466,94 @@ int UDPBaseImplementation::setFifoDepth(const uint32_t i){ /***initial functions***/ int UDPBaseImplementation::setDetectorType(const detectorType d){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + myDetectorType = d; //if eiger, set numberofListeningThreads = 2; - FILE_LOG(logINFO) << "Detector Type:" << getDetectorType(d); + ostringstream os; + os << "Detector Type:" << getDetectorType(d); + string message(os.str()); FILE_LOG(logINFO, message); return OK; } void UDPBaseImplementation::initialize(const char *c){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + if(strlen(c)) strcpy(detHostname, c); - FILE_LOG(logINFO) << "Detector Hostname:" << detHostname; + ostringstream os; + os << "Detector Hostname:" << detHostname; + string message(os.str()); FILE_LOG(logINFO, message); } /***acquisition functions***/ void UDPBaseImplementation::resetAcquisitionCount(){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + totalPacketsCaught = 0; - FILE_LOG(logINFO) << "totalPacketsCaught:" << totalPacketsCaught; + ostringstream os; + os << "totalPacketsCaught:" << totalPacketsCaught; + string message(os.str()); FILE_LOG(logINFO, message); } int UDPBaseImplementation::startReceiver(char *c){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); return OK; } void UDPBaseImplementation::stopReceiver(){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } void UDPBaseImplementation::startReadout(){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } int UDPBaseImplementation::shutDownUDPSockets(){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); //overridden functions might return FAIL return OK; } void UDPBaseImplementation::readFrame(int ithread, char* c,char** raw, int64_t &startAcquisitionIndex, int64_t &startFrameIndex){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } //FIXME: needed, isnt stopReceiver enough? void UDPBaseImplementation::abort(){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } void UDPBaseImplementation::closeFile(int ithread){ - FILE_LOG(logWARNING) << __AT__ << " doing nothing..."; - FILE_LOG(logERROR) << __AT__ << " must be overridden by child classes"; + ostringstream os; + os << " must be overridden by child classes"; + string message(os.str()); FILE_LOG(logERROR, message); } int UDPBaseImplementation::setActivate(int enable){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + if(enable != -1){ activated = enable; - FILE_LOG(logINFO) << "Activation: " << stringEnable(activated); + ostringstream os; + os << "Activation: " << stringEnable(activated); + string message(os.str()); FILE_LOG(logINFO, message); } return activated; diff --git a/slsReceiverSoftware/src/UDPInterface.cpp b/slsReceiverSoftware/src/UDPInterface.cpp index a6bd2cfaca..749be3b711 100644 --- a/slsReceiverSoftware/src/UDPInterface.cpp +++ b/slsReceiverSoftware/src/UDPInterface.cpp @@ -23,17 +23,23 @@ using namespace std; UDPInterface * UDPInterface::create(string receiver_type){ if (receiver_type == "standard"){ - FILE_LOG(logINFO) << "Starting " << receiver_type; + ostringstream os; + os << "Starting " << receiver_type; + string message(os.str()); FILE_LOG(logINFO, message); return new UDPStandardImplementation(); } #ifdef REST else if (receiver_type == "REST"){ - FILE_LOG(logINFO) << "Starting " << receiver_type; + ostringstream os; + os << "Starting " << receiver_type; + string message(os.str()); FILE_LOG(logINFO, message); return new UDPRESTImplementation(); } #endif else{ - FILE_LOG(logWARNING) << "[ERROR] UDP interface not supported, using standard implementation"; + ostringstream os; + os << "[ERROR] UDP interface not supported, using standard implementation"; + string message(os.str()); FILE_LOG(logWARNING, message); return new UDPBaseImplementation(); } } diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 98140d4e23..ee8bf034eb 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -3,6 +3,8 @@ * @short does all the functions for a receiver, set/get parameters, start/stop etc. ***********************************************/ +sprintf(cstreambuf, "%s", " \0"); +FILE_LOG(logDEBUG, cstreambuf); #include "UDPStandardImplementation.h" @@ -32,10 +34,14 @@ using namespace std; *************************************************************************/ UDPStandardImplementation::UDPStandardImplementation(){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + initializeMembers(); + for(int i= 0; i < MAX_NUMBER_OF_WRITER_THREADS; ++i) + memset(streambuf[i], 0, MAX_STR_LENGTH ); + memset(cstreambuf, 0, MAX_STR_LENGTH ); + //***mutex*** pthread_mutex_init(&statusMutex,NULL); pthread_mutex_init(&writeMutex,NULL); @@ -45,9 +51,11 @@ UDPStandardImplementation::UDPStandardImplementation(){ //to increase socket receiver buffer size and max length of input queue by changing kernel settings if(myDetectorType == EIGER); else if(system("echo $((100*1024*1024)) > /proc/sys/net/core/rmem_max")){ - FILE_LOG(logDEBUG) << "Warning: No root permission to change socket receiver buffer size in file /proc/sys/net/core/rmem_max"; + sprintf(cstreambuf, "%s", "Warning: No root permission to change socket receiver buffer size in file /proc/sys/net/core/rmem_max \0"); + FILE_LOG(logDEBUG, cstreambuf); }else if(system("echo 250000 > /proc/sys/net/core/netdev_max_backlog")){ - FILE_LOG(logDEBUG) << "Warning: No root permission to change max length of input queue in file /proc/sys/net/core/netdev_max_backlog"; + sprintf(cstreambuf, "%s", "Warning: No root permission to change max length of input queue in file /proc/sys/net/core/netdev_max_backlog \0"); + FILE_LOG(logDEBUG, cstreambuf); } /** permanent setting by heiner @@ -61,7 +69,7 @@ UDPStandardImplementation::UDPStandardImplementation(){ } UDPStandardImplementation::~UDPStandardImplementation(){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + for(int i=0;iShutDownSocket(); - FILE_LOG(logINFO) << "Shut down UDP Socket " << i; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Shut down UDP Socket " << i; + string message(os.str()); FILE_LOG(logINFO, message); + } delete udpSocket[i]; udpSocket[i] = 0; } @@ -1114,9 +1321,14 @@ int UDPStandardImplementation::shutDownUDPSockets(){ * Post:udp sockets closed, status is transmitting * */ void UDPStandardImplementation::startReadout(){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); - FILE_LOG(logDEBUG) << "Transmitting last data"; + { + ostringstream os; + os << "Transmitting last data"; + string message(os.str()); FILE_LOG(logDEBUG, message); + } if(status == RUNNING){ @@ -1168,8 +1380,13 @@ void UDPStandardImplementation::startReadout(){ pthread_mutex_lock(&statusMutex); status = TRANSMITTING; pthread_mutex_unlock(&statusMutex); - - FILE_LOG(logINFO) << "Status: Transmitting"; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Status: Transmitting"; + string message(os.str()); FILE_LOG(logINFO, message); + } } //shut down udp sockets and make listeners push dummy (end) packets for writers @@ -1180,21 +1397,24 @@ void UDPStandardImplementation::startReadout(){ /**make this better by asking all of it at once*/ void UDPStandardImplementation::readFrame(int ithread, char* c,char** raw, int64_t &startAcq, int64_t &startFrame){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + } void UDPStandardImplementation::closeFile(int ithread){ - FILE_LOG(logDEBUG) << __AT__ << " called for " << ithread ; - //normal if(!dataCompressionEnable){ if(sfilefd[ithread]){ -#ifdef DEBUG4 - FILE_LOG(logDEBUG4) << "Going to close file: " << fileno(sfilefd)); -#endif + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Going to close file: " << fileno(sfilefd[ithread]); + string message(os.str()); FILE_LOG(logDEBUG4, message); + } + fflush(sfilefd[ithread]); fclose(sfilefd[ithread]); sfilefd[ithread] = 0; @@ -1205,9 +1425,13 @@ void UDPStandardImplementation::closeFile(int ithread){ else{ #if (defined(MYROOT1) && defined(ALLFILE_DEBUG)) || !defined(MYROOT1) if(sfilefd[0]){ -#ifdef DEBUG4 - FILE_LOG(logDEBUG4) << "sfilefd: " << (int)sfilefd[i]; -#endif + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "sfilefd: " << fileno(sfilefd[0]); + string message(os.str()); FILE_LOG(logDEBUG4, message); + } fclose(sfilefd[0]); sfilefd[0] = 0; } @@ -1243,11 +1467,17 @@ void UDPStandardImplementation::closeFile(int ithread){ //eiger only int UDPStandardImplementation::setActivate(int enable){ - FILE_LOG(logDEBUG) << __AT__ << " starting"; + if(enable != -1){ activated = enable; - FILE_LOG(logINFO) << "Activation: " << stringEnable(activated); + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Activation: " << stringEnable(activated); + string message(os.str()); FILE_LOG(logINFO, message); + } } for(int i=0; inumberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1))*packetsPerFrame - totalPacketsInFile[ithread]) - :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread])*packetsPerFrame - totalPacketsInFile[ithread]), - (long long int)totalPacketsInFile[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousFile[ithread] - ); + ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1))*packetsPerFrame - totalPacketsInFile[ithread]) + :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread])*packetsPerFrame - totalPacketsInFile[ithread]), + (long long int)totalPacketsInFile[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousFile[ithread] + ); }else{ cprintf(BLUE,"File:%s" "\nLost:%lld" @@ -1636,12 +2058,12 @@ int UDPStandardImplementation::createNewFile(int ithread){ "\tPFrame#:%lld\n", completeFileName[ithread], ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) - ?(long long int)(numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) - :(long long int)(frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]), - (long long int)totalPacketsInFile[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousFile[ithread] - ); + ?(long long int)(numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) + :(long long int)(frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]), + (long long int)totalPacketsInFile[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousFile[ithread] + ); } }else @@ -1670,29 +2092,41 @@ int UDPStandardImplementation::createNewFile(int ithread){ int UDPStandardImplementation::createCompressionFile(int ithread, int iframe){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + #ifdef MYROOT1 char temp[MAX_STR_LENGTH]; - //create file name for gui purposes, and set up acquistion parameters - sprintf(temp, "%s/%s_fxxx_%d_%d.root", filePath,fileNamePerThread[ithread],fileIndex,ithread); - //file - myFile[ithread] = new TFile(temp,"RECREATE");/** later return error if it exists */ - cprintf(GREEN,"Writing_Thread %d: Created Compression File: %s\n",ithread, temp); - //tree - sprintf(temp, "%s_fxxx_%d_%d",fileNamePerThread[ithread],fileIndex,ithread); - myTree[ithread]=singlePhotonDetectorObject[ithread]->initEventTree(temp, &iframe); - //resets the pedestalSubtraction array and the commonModeSubtraction - singlePhotonDetectorObject[ithread]->newDataSet(); - if(myFile[ithread]==NULL){ - FILE_LOG(logERROR) << "File Null"; - return FAIL; + //create file name for gui purposes, and set up acquistion parameters + sprintf(temp, "%s/%s_fxxx_%d_%d.root", filePath,fileNamePerThread[ithread],fileIndex,ithread); + //file + myFile[ithread] = new TFile(temp,"RECREATE");/** later return error if it exists */ + cprintf(GREEN,"Writing_Thread %d: Created Compression File: %s\n",ithread, temp); + //tree + sprintf(temp, "%s_fxxx_%d_%d",fileNamePerThread[ithread],fileIndex,ithread); + myTree[ithread]=singlePhotonDetectorObject[ithread]->initEventTree(temp, &iframe); + //resets the pedestalSubtraction array and the commonModeSubtraction + singlePhotonDetectorObject[ithread]->newDataSet(); + if(myFile[ithread]==NULL){ + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "File Null"; + string message(os.str()); FILE_LOG(logERROR, message); } - if(!myFile[ithread]->IsOpen()){ - FILE_LOG(logERROR) << "File Not Open"; - return FAIL; + return FAIL; + } + if(!myFile[ithread]->IsOpen()){ + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "File Not Open"; + string message(os.str()); FILE_LOG(logERROR, message); } - return OK; + return FAIL; + } + return OK; #endif return FAIL; } @@ -1700,7 +2134,7 @@ int UDPStandardImplementation::createCompressionFile(int ithread, int iframe){ void* UDPStandardImplementation::startDataCallbackThread(void* this_pointer){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + ((UDPStandardImplementation*)this_pointer)->startDataCallback(); return this_pointer; } @@ -1708,7 +2142,7 @@ void* UDPStandardImplementation::startDataCallbackThread(void* this_pointer){ void* UDPStandardImplementation::startListeningThread(void* this_pointer){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + ((UDPStandardImplementation*)this_pointer)->startListening(); return this_pointer; } @@ -1716,7 +2150,7 @@ void* UDPStandardImplementation::startListeningThread(void* this_pointer){ void* UDPStandardImplementation::startWritingThread(void* this_pointer){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + ((UDPStandardImplementation*)this_pointer)->startWriting(); return this_pointer; } @@ -1725,7 +2159,7 @@ void* UDPStandardImplementation::startWritingThread(void* this_pointer){ void UDPStandardImplementation::startDataCallback(){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //set current thread value index int ithread = currentThreadIndex; @@ -1743,8 +2177,15 @@ void UDPStandardImplementation::startDataCallback(){ zmq_setsockopt(zmqsocket, ZMQ_LINGER, &val,sizeof(val)); // wait for the unsent packets before closing socket //val = 10; //zmq_setsockopt(zmqsocket,ZMQ_SNDHWM,&val,sizeof(val)); //set SEND HIGH WATER MARK (8-9ms slower) - zmq_bind(zmqsocket,hostName); // bind - FILE_LOG(logINFO) << "Thread" << ithread << ": ZMQ Server at " << hostName; + zmq_bind(zmqsocket,hostName); + // bind + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Thread" << ithread << ": ZMQ Server at " << hostName; + string message(os.str()); FILE_LOG(logINFO, message); + } int headersize=0; @@ -1800,14 +2241,13 @@ void UDPStandardImplementation::startDataCallback(){ "\"roundRNumber\":%u, " "\"detType\":%u, " "\"version\":%u" - "}"; + "}\0"; int npixelsx=0, npixelsy=0; switch(myDetectorType) { case JUNGFRAU: npixelsx = JFRAU_PIXELS_IN_ONE_ROW; npixelsy = JFRAU_PIXELS_IN_ONE_COL; break; case EIGER: npixelsx = EIGER_PIXELS_IN_ONE_ROW; npixelsy = EIGER_PIXELS_IN_ONE_COL; break; default:break; /* will not work for other detectors*/ } - char buf[1000]; uint64_t acquisitionIndex = -1; uint64_t frameIndex = -1; #ifdef DEBUG @@ -1827,23 +2267,6 @@ void UDPStandardImplementation::startDataCallback(){ //end if acquistion if(guiNumPackets[ithread] == dummyPacketValue){ - //sending previous half frames if any - if(!excludeMissingPackets && newFrame){ - //send header - //update frame details - frameIndex = fnum; - acquisitionIndex = fnum - startAcquisitionIndex; - int len = sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ - zmq_send(zmqsocket, buf,len, ZMQ_SNDMORE); - //send data - zmq_send(zmqsocket, buffer, oneframesize, 0); - newFrame = false; - } - - - //send final header //update frame details #ifdef DEBUG @@ -1852,13 +2275,16 @@ void UDPStandardImplementation::startDataCallback(){ frameIndex = -1; acquisitionIndex = -1; - int len = sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + { + char buf[1000]="";memset(buf,0,1000); + int len = sprintf(buf,jsonFmt, + SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - zmq_send(zmqsocket, buf,len, ZMQ_SNDMORE); + zmq_send(zmqsocket, buf,1000, 0); + } //send final data - zmq_send (zmqsocket, "end", 3, 0); + zmq_send (zmqsocket, "end\0", 4, 0); pthread_mutex_lock(&statusMutex); dataCallbackThreadsMask^=(1<frameNumber; frameIndex = fnum - startFrameIndex; acquisitionIndex = fnum - startAcquisitionIndex; + { + char buf[1000]="";memset(buf,0,1000); + int len = sprintf(buf,jsonFmt, + SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], + header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, + header->modId, header->xCoord, header->yCoord, header->zCoord, header->debug, header->roundRNumber, header->detType, header->version); - int len = sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, - header->modId, header->xCoord, header->yCoord, header->zCoord, header->debug, header->roundRNumber, header->detType, header->version); - - zmq_send(zmqsocket, buf,len, ZMQ_SNDMORE); + zmq_send(zmqsocket, buf,1000, 0); + } //send data zmq_send(zmqsocket, (latestData[ithread]+sizeof(sls_detector_header)), bufferSize, 0); //start clock after sending @@ -1913,107 +2341,8 @@ void UDPStandardImplementation::startDataCallback(){ //moench, jctb else{ - - size = guiNumPackets[ithread]*onePacketSize; - datapacketscaught+=guiNumPackets[ithread]; - offset=0; - - //copy packet by packet -getting rid of headers, -in the right order(padding missing packets) - while(offset < size){ - - //until getting frame number is not error - while((size>0) && (getFrameandPacketNumber(ithread, latestData[ithread]+offset, fnum, pnum,snum,bid)==FAIL)){ - offset+= onePacketSize; - } - //if(!ithread) cout<< ithread <<" fnum:"<< fnum<<" pnum:"<= size) - break; - - if(!frameToGuiFrequency) - currentfnum = fnum; - - - //last packet of same frame - if(fnum == currentfnum && pnum == (packetsPerFrame-1)){ -#ifdef DEBUG - oldpnum=0; -#endif - memcpy(buffer+(pnum*oneDataSize), latestData[ithread]+offset+headersize,oneDataSize); - offset+= onePacketSize; - //send header - //update frame details - frameIndex = fnum; - acquisitionIndex = fnum - startAcquisitionIndex; - int len = sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ - zmq_send(zmqsocket, buf,len, ZMQ_SNDMORE); - //send data - zmq_send(zmqsocket, buffer, oneframesize, 0); - newFrame = false; -#ifdef DEBUG - if(!ithread)cprintf(BLUE,"%d sent (last packet)\n",ithread); -#endif - currentfnum++; - //start clock after sending - if(!frameToGuiFrequency){ - randomSendNow = false; - clock_gettime(CLOCK_REALTIME, &begin); - } - memset(buffer,0xFF,oneframesize); - - } - //same frame (not last) or next frame - else { - //next frame -#ifdef DEBUG - int once = true; -#endif - while(fnum > currentfnum){ -#ifdef DEBUG - if(once){ - if((fnum-currentfnum-1)>1) cprintf(RED,"%d Complete sub image missing:%d (cfnum:%d nfnum:%d)\n", - ithread,fnum-currentfnum-1,currentfnum,fnum); - once = false; - } -#endif - //send header - //update frame details - frameIndex = fnum; - acquisitionIndex = fnum - startAcquisitionIndex; - int len = sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );/* will not work for other detectors*/ - zmq_send(zmqsocket, buf,len, ZMQ_SNDMORE); - //send data - zmq_send(zmqsocket, buffer, oneframesize, 0); - newFrame = false; -#ifdef DEBUG - cprintf(BLUE,"%d sent (last packet of previous frame)\n",ithread); -#endif - currentfnum++; - //start clock after sending - if(!frameToGuiFrequency){ - randomSendNow = false; - clock_gettime(CLOCK_REALTIME, &begin); - } - memset(buffer,0xFF,oneframesize); - } - - memcpy(buffer+(pnum*oneDataSize), latestData[ithread]+offset+headersize,oneDataSize); - offset+= onePacketSize; - newFrame = true; - } - - } + cprintf(BG_RED, "should not be in here, only for moench, jctb. Exiting\n"); + exit(-1); } @@ -2046,7 +2375,7 @@ void UDPStandardImplementation::startDataCallback(){ void UDPStandardImplementation::startListening(){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //set current thread value index int ithread = currentThreadIndex; @@ -2081,7 +2410,13 @@ void UDPStandardImplementation::startListening(){ //udpsocket doesnt exist if(activated && !udpSocket[ithread]){ - FILE_LOG(logERROR) << "Listening_Thread " << ithread << ": UDP Socket not created or shut down earlier"; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Listening_Thread " << ithread << ": UDP Socket not created or shut down earlier"; + string message(os.str()); FILE_LOG(logERROR, message); + } stopListening(ithread,0); continue; } @@ -2128,7 +2463,7 @@ void UDPStandardImplementation::startListening(){ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, char* temp){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + int receivedSize = 0; @@ -2163,7 +2498,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch int UDPStandardImplementation::prepareAndListenBufferDeactivated(int ithread){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //last if(currentFrameNumber[ithread] == numberOfFrames) @@ -2187,7 +2522,7 @@ int UDPStandardImplementation::prepareAndListenBufferDeactivated(int ithread){ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + int headerlength = 0; uint32_t LASTPNUM = 0; @@ -2279,7 +2614,7 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) totalIgnoredPacketCount[ithread] += (pnum + 1); } else if(myDetectorType == EIGER) - fnum = fi; //update currentfnum for eiger (next packets should have currentfnum value) + fnum = fi; //update currentfnum for eiger (next packets should have currentfnum value) #ifdef VERBOSE if(!ithread) cout << "next currentpnum :" << pnum << endl; #endif @@ -2343,10 +2678,10 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) #ifdef VERBOSE if(!ithread) - cprintf(BLUE, - "framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", - header->frameNumber, header->expLength, header->packetNumber, - header->bunchId, header->xCoord, header->detType, header->version); + cprintf(BLUE, + "framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", + header->frameNumber, header->expLength, header->packetNumber, + header->bunchId, header->xCoord, header->detType, header->version); #endif //write packet count to buffer @@ -2357,7 +2692,7 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) void UDPStandardImplementation::startFrameIndices(int ithread){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + jfrau_packet_header_t* header=0; @@ -2375,7 +2710,7 @@ void UDPStandardImplementation::startFrameIndices(int ithread){ & (frameIndexMask)) >> frameIndexOffset); }else{ startFrameIndex = ((((uint32_t)(*((uint32_t*)(buffer[ithread]+fifoBufferHeaderSize)))) - & (frameIndexMask)) >> frameIndexOffset); + & (frameIndexMask)) >> frameIndexOffset); } break; } @@ -2401,7 +2736,7 @@ void UDPStandardImplementation::startFrameIndices(int ithread){ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + #ifdef DEBUG4 cprintf(BLUE,"Listening_Thread %d: Stop Listening\nStatus: %s numbytes:%d\n", ithread, runStatusType(status).c_str(),numbytes); @@ -2409,7 +2744,13 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ //free empty buffer if(numbytes <= 0){ - FILE_LOG(logINFO) << "Listening "<< ithread << ": End of Acquisition"; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Listening "<< ithread << ": End of Acquisition"; + string message(os.str()); FILE_LOG(logINFO, message); + } while(!fifoFree[ithread]->push(buffer[ithread])); } @@ -2443,7 +2784,13 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ listeningThreadsMask^=(1<push(wbuffer)); @@ -2730,64 +3088,64 @@ void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer){ //Print packet loss //if(totalWritingPacketCountFromLastCheck[ithread]){ #ifdef VERBOSE - if(numberofWriterThreads>1){ - printf("Thread:%d" - "\tLost:%lld" - "\t\tPackets:%lld" - "\tFrame#:%lld" - "\tPFrame#:%lld\n", - ithread, - ((frameNumberInPreviousCheck[ithread]+1+(maxFramesPerFile/progressFrequency))>numberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) + if(numberofWriterThreads>1){ + printf("Thread:%d" + "\tLost:%lld" + "\t\tPackets:%lld" + "\tFrame#:%lld" + "\tPFrame#:%lld\n", + ithread, + ((frameNumberInPreviousCheck[ithread]+1+(maxFramesPerFile/progressFrequency))>numberOfFrames) + ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), - (long long int)totalWritingPacketCountFromLastCheck[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousCheck[ithread] - ); - }else{ - printf("Lost:%lld" - "\t\tPackets:%lld" - "\tFrame#:%lld" - "\tPFrame#:%lld\n", - ((frameNumberInPreviousCheck[ithread]+1+(maxFramesPerFile/progressFrequency))>numberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) + (long long int)totalWritingPacketCountFromLastCheck[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousCheck[ithread] + ); + }else{ + printf("Lost:%lld" + "\t\tPackets:%lld" + "\tFrame#:%lld" + "\tPFrame#:%lld\n", + ((frameNumberInPreviousCheck[ithread]+1+(maxFramesPerFile/progressFrequency))>numberOfFrames) + ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), - (long long int)totalWritingPacketCountFromLastCheck[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousCheck[ithread] - ); - } - - if(numberofWriterThreads>1){ - cprintf(BLUE,"File:%s" - "\nThread:%d" - "\tLost:%lld" - "\t\tPackets:%lld" - "\tFrame#:%lld" - "\tPFrame#:%lld\n", - completeFileName[ithread],ithread, - ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1))*packetsPerFrame - totalPacketsInFile[ithread]) - :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread])*packetsPerFrame - totalPacketsInFile[ithread]), - (long long int)totalPacketsInFile[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousFile[ithread] - ); - }else{ - cprintf(BLUE,"File:%s" - "\nLost:%lld" - "\t\tPackets:%lld" - "\tFrame#:%lld" - "\tPFrame#:%lld\n", - completeFileName[ithread], - ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) - ?(long long int)(numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) - :(long long int)(frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]), - (long long int)totalPacketsInFile[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousFile[ithread] - ); - } + (long long int)totalWritingPacketCountFromLastCheck[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousCheck[ithread] + ); + } + + if(numberofWriterThreads>1){ + cprintf(BLUE,"File:%s" + "\nThread:%d" + "\tLost:%lld" + "\t\tPackets:%lld" + "\tFrame#:%lld" + "\tPFrame#:%lld\n", + completeFileName[ithread],ithread, + ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) + ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1))*packetsPerFrame - totalPacketsInFile[ithread]) + :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread])*packetsPerFrame - totalPacketsInFile[ithread]), + (long long int)totalPacketsInFile[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousFile[ithread] + ); + }else{ + cprintf(BLUE,"File:%s" + "\nLost:%lld" + "\t\tPackets:%lld" + "\tFrame#:%lld" + "\tPFrame#:%lld\n", + completeFileName[ithread], + ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) + ?(long long int)(numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) + :(long long int)(frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]), + (long long int)totalPacketsInFile[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousFile[ithread] + ); + } #endif //} @@ -2817,7 +3175,13 @@ void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer){ pthread_mutex_unlock(&(statusMutex)); //statistics - FILE_LOG(logINFO) << "Status: Run Finished"; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Status: Run Finished"; + string message(os.str()); FILE_LOG(logINFO, message); + } for(int i=0;inumberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) - :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), - (long long int)totalWritingPacketCountFromLastCheck[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousCheck[ithread] + ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) + :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), + (long long int)totalWritingPacketCountFromLastCheck[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousCheck[ithread] ); }else{ printf("Lost:%lld" @@ -2994,11 +3358,11 @@ void UDPStandardImplementation::handleCompleteFramesOnly(int ithread, char* wbuf "\tFrame#:%lld" "\tPFrame#:%lld\n", ((frameNumberInPreviousCheck[ithread]+1+(maxFramesPerFile/progressFrequency))>numberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) - :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), - (long long int)totalWritingPacketCountFromLastCheck[ithread], - (long long int)currentFrameNumber[ithread], - (long long int)frameNumberInPreviousCheck[ithread] + ?(long long int)((numberOfFrames-(frameNumberInPreviousCheck[ithread]+1))*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]) + :(long long int)((frameNumberInPreviousCheck[ithread]+(maxFramesPerFile/progressFrequency) - frameNumberInPreviousCheck[ithread])*packetsPerFrame - totalWritingPacketCountFromLastCheck[ithread]), + (long long int)totalWritingPacketCountFromLastCheck[ithread], + (long long int)currentFrameNumber[ithread], + (long long int)frameNumberInPreviousCheck[ithread] ); } //reset counters for each new file @@ -3053,7 +3417,7 @@ void UDPStandardImplementation::handleCompleteFramesOnly(int ithread, char* wbuf void UDPStandardImplementation::writeFileWithoutCompression(int ithread, char* wbuffer,uint32_t numpackets){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //if write enabled if((fileWriteEnable) && (sfilefd[ithread])){ @@ -3205,16 +3569,16 @@ void UDPStandardImplementation::updateFileHeader(int ithread){ activated, (long long int)(totalPacketsInFile[ithread]/packetsPerFrame), ((frameNumberInPreviousFile[ithread]+1+maxFramesPerFile)>numberOfFrames) - ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) - (totalPacketsInFile[ithread]/packetsPerFrame)) - :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]) - (totalPacketsInFile[ithread]/packetsPerFrame)), - dynamicRange,tengigaEnable, - bufferSize, - //only for eiger right now - EIGER_PIXELS_IN_ONE_ROW,EIGER_PIXELS_IN_ONE_COL, - (long long int)numberOfFrames, - (long long int)acquisitionTime, - (long long int)acquisitionPeriod, - ctime(&t)); + ?(long long int)((numberOfFrames-(frameNumberInPreviousFile[ithread]+1)) - (totalPacketsInFile[ithread]/packetsPerFrame)) + :(long long int)((frameNumberInPreviousFile[ithread]+maxFramesPerFile - frameNumberInPreviousFile[ithread]) - (totalPacketsInFile[ithread]/packetsPerFrame)), + dynamicRange,tengigaEnable, + bufferSize, + //only for eiger right now + EIGER_PIXELS_IN_ONE_ROW,EIGER_PIXELS_IN_ONE_COL, + (long long int)numberOfFrames, + (long long int)acquisitionTime, + (long long int)acquisitionPeriod, + ctime(&t)); if(strlen(fileHeader[ithread]) > FILE_HEADER_SIZE) cprintf(BG_RED,"File Header Size %d is too small for fixed file header size %d\n",(int)strlen(fileHeader[ithread]),(int)FILE_HEADER_SIZE); @@ -3223,7 +3587,7 @@ void UDPStandardImplementation::updateFileHeader(int ithread){ //called only if datacallback enabled void UDPStandardImplementation::copyFrameToGui(int ithread, char* buffer, uint32_t numpackets){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //if nthe frame, wait for your turn (1st frame always shown as its zero) if(frameToGuiFrequency && ((frametoGuiCounter[ithread])%frameToGuiFrequency)); @@ -3266,7 +3630,7 @@ void UDPStandardImplementation::copyFrameToGui(int ithread, char* buffer, uint32 void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer, uint64_t &nf){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //get frame number uint64_t tempframenumber=-1; @@ -3394,7 +3758,7 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer while(!fifoFree[0]->push(wbuffer)); #ifdef EVERYFIFODEBUG if(fifoFree[0]->getSemValue()<100) - cprintf(GREEN,"FifoFree[%d]: value:%d, push 0x%x\n",0,fifoFree[0]->getSemValue(),(void*)(wbuffer)); + cprintf(GREEN,"FifoFree[%d]: value:%d, push 0x%x\n",0,fifoFree[0]->getSemValue(),(void*)(wbuffer)); #endif #ifdef DEBUG5 cprintf(GREEN,"Writing_Thread %d: Compression free pushed into fifofree %p for listerner 0\n", ithread, (void*)(wbuffer)); @@ -3404,7 +3768,7 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer int UDPStandardImplementation::getFrameandPacketNumber(int ithread, char* wbuffer, uint64_t &framenumber, uint32_t &packetnumber,uint32_t &subframenumber, uint64_t &bunchid){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + eiger_packet_footer_t* footer=0; eiger_packet_header_t* e_header=0; @@ -3422,7 +3786,25 @@ int UDPStandardImplementation::getFrameandPacketNumber(int ithread, char* wbuffe //error in frame number sent by fpga if(((uint32_t)(*( (uint64_t*) footer)))==0){ framenumber = 0; - FILE_LOG(logERROR) << "Fifo "<< ithread << ": Frame Number is zero from firmware."; + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + { + ostringstream os; + os << "Fifo "<< ithread << ": Frame Number is zero from firmware."; + string message(os.str()); FILE_LOG(logERROR, message); + + + } + if(((uint32_t)(*( (uint64_t*) footer)))==0) + { + sprintf(cstreambuf, "%s", " \0"); + FILE_LOG(logDEBUG, cstreambuf); + packetnumber = (*( (uint16_t*) footer->packetNumber))-1; + ostringstream os; + os << "Fifo "<< ithread << ": Frame Number is still zero from firmware. and pnum:" << packetnumber << "udp port num:" << udpPortNum[ithread]; + string message(os.str()); FILE_LOG(logERROR, message); + + } return FAIL; } packetnumber = (*( (uint16_t*) footer->packetNumber))-1; @@ -3477,7 +3859,7 @@ int UDPStandardImplementation::getFrameandPacketNumber(int ithread, char* wbuffe int UDPStandardImplementation::writeUptoFrameNumber(int ithread, char* wbuffer, int &offset, uint64_t nextFrameNumber, uint32_t numpackets, int &numPacketsWritten){ - FILE_LOG(logDEBUG) << __AT__ << " called"; + //if(ithread) cout<<"at writeUptoFrameNumber " << nextFrameNumber<< endl; diff --git a/slsReceiverSoftware/src/main.cpp b/slsReceiverSoftware/src/main.cpp index b4e5ef142f..bced35a06d 100644 --- a/slsReceiverSoftware/src/main.cpp +++ b/slsReceiverSoftware/src/main.cpp @@ -104,7 +104,6 @@ int main(int argc, char *argv[]) { //start tcp server thread if(receiver->start() == slsReceiverDefs::OK){ - FILE_LOG(logDEBUG1) << "DONE!" << endl; string str; cin>>str; //wait and look for an exit keyword diff --git a/slsReceiverSoftware/src/slsReceiver.cpp b/slsReceiverSoftware/src/slsReceiver.cpp index 4a28ab8e10..1f1678c6ce 100644 --- a/slsReceiverSoftware/src/slsReceiver.cpp +++ b/slsReceiverSoftware/src/slsReceiver.cpp @@ -106,23 +106,31 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){ if( !fname.empty() ){ try{ - FILE_LOG(logINFO) << "config file name " << fname; + ostringstream os; + os << "config file name " << fname; + string message(os.str()); FILE_LOG(logDEBUG, message); success = read_config_file(fname, &tcpip_port_no, &configuration_map); //VERBOSE_PRINT("Read configuration file of " + iline + " lines"); } catch(...){ - FILE_LOG(logERROR) << "Error opening configuration file " << fname ; - success = FAIL; + ostringstream os; + os << "Error opening configuration file " << fname ; + string message(os.str()); FILE_LOG(logERROR, message); + success = FAIL; } } if(success != OK){ - FILE_LOG(logERROR) << "Failed: see output above for more information " ; + ostringstream os; + os << "Failed: see output above for more information " ; + string message(os.str()); FILE_LOG(logERROR, message); } if (success==OK){ - FILE_LOG(logINFO) << "SLS Receiver starting " << udp_interface_type << " on port " << tcpip_port_no << endl; + ostringstream os; + os << "SLS Receiver starting " << udp_interface_type << " on port " << tcpip_port_no << endl; + string message(os.str()); FILE_LOG(logDEBUG, message); #ifdef REST udp_interface = UDPInterface::create(udp_interface_type); udp_interface->configure(configuration_map); diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index 8f4fd537a5..ea68631fd1 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -28,17 +28,17 @@ slsReceiverTCPIPInterface::~slsReceiverTCPIPInterface() { } slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn): - myDetectorType(GOTTHARD), - receiverBase(rbase), - ret(OK), - lockStatus(0), - shortFrame(-1), - packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME), - dynamicrange(16), - killTCPServerThread(0), - tenGigaEnable(0), - portNumber(DEFAULT_PORTNO+2), - mySock(NULL){ + myDetectorType(GOTTHARD), + receiverBase(rbase), + ret(OK), + lockStatus(0), + shortFrame(-1), + packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME), + dynamicrange(16), + killTCPServerThread(0), + tenGigaEnable(0), + portNumber(DEFAULT_PORTNO+2), + mySock(NULL){ strcpy(SET_RECEIVER_ERR_MESSAGE,"Receiver not set up. Please use rx_hostname first.\n"); @@ -126,14 +126,22 @@ int slsReceiverTCPIPInterface::setPortNumber(int pn){ int slsReceiverTCPIPInterface::start(){ - FILE_LOG(logDEBUG) << "Creating TCP Server Thread" << endl; + { + ostringstream os; + os << "Creating TCP Server Thread" << endl; + string message(os.str()); FILE_LOG(logDEBUG, message); + } killTCPServerThread = 0; if(pthread_create(&TCPServer_thread, NULL,startTCPServerThread, (void*) this)){ cout << "Could not create TCP Server thread" << endl; return FAIL; } //#ifdef VERYVERBOSE - FILE_LOG(logDEBUG) << "TCP Server thread created successfully." << endl; + { + ostringstream os; + os << "TCP Server thread created successfully." << endl; + string message(os.str()); FILE_LOG(logDEBUG, message); + } //#endif return OK; } @@ -387,23 +395,27 @@ int slsReceiverTCPIPInterface::set_detector_type(){ receiverBase->registerCallBackRawDataReady(rawDataReadyCallBack,pRawDataReady); } #endif - myDetectorType = dr; - ret=receiverBase->setDetectorType(myDetectorType); - retval = myDetectorType; + myDetectorType = dr; + ret=receiverBase->setDetectorType(myDetectorType); + retval = myDetectorType; } - + } } //#ifdef VERYVERBOSE if(ret!=FAIL) - FILE_LOG(logDEBUG) << "detector type " << dr; + { + ostringstream os; + os << "detector type " << dr; + string message(os.str()); FILE_LOG(logDEBUG, message); + } else cprintf(RED, "%s\n", mess); //#endif #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -470,7 +482,7 @@ int slsReceiverTCPIPInterface::set_file_name() { if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -545,7 +557,7 @@ int slsReceiverTCPIPInterface::set_file_dir() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -617,7 +629,7 @@ int slsReceiverTCPIPInterface::set_file_index() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -695,7 +707,7 @@ int slsReceiverTCPIPInterface::set_frame_index() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -759,12 +771,16 @@ int slsReceiverTCPIPInterface::setup_udp(){ receiverBase->setUDPPortNumber2(udpport2); //setup udpip //get ethernet interface or IP to listen to - FILE_LOG(logINFO) << "Receiver UDP IP: " << args[0]; + { + ostringstream os; + os << "Receiver UDP IP: " << args[0]; + string message(os.str()); FILE_LOG(logINFO, message); + } temp = genericSocket::ipToName(args[0]); if(temp=="none"){ ret = FAIL; strcpy(mess, "Failed to get ethernet interface or IP\n"); - FILE_LOG(logERROR) << mess; + FILE_LOG(logERROR, string(mess)); } else{ strcpy(eth,temp.c_str()); @@ -785,7 +801,9 @@ int slsReceiverTCPIPInterface::setup_udp(){ } else{ strcpy(retval,temp.c_str()); - FILE_LOG(logINFO) << "Reciever MAC Address: " << retval; + ostringstream os; + os << "Reciever MAC Address: " << retval; + string message(os.str()); FILE_LOG(logINFO, message); } } } @@ -793,14 +811,14 @@ int slsReceiverTCPIPInterface::setup_udp(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } // send answer mySock->SendDataOnly(&ret,sizeof(ret)); if(ret==FAIL){ - FILE_LOG(logERROR) << mess; + FILE_LOG(logERROR, string(mess)); mySock->SendDataOnly(mess,sizeof(mess)); } mySock->SendDataOnly(retval,MAX_STR_LENGTH); @@ -849,7 +867,7 @@ int slsReceiverTCPIPInterface::start_receiver(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -897,7 +915,7 @@ int slsReceiverTCPIPInterface::stop_receiver(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -928,7 +946,7 @@ int slsReceiverTCPIPInterface::get_status(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -959,7 +977,7 @@ int slsReceiverTCPIPInterface::get_frames_caught(){ }else retval=receiverBase->getTotalFramesCaught(); #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -991,7 +1009,7 @@ int slsReceiverTCPIPInterface::get_frame_index(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1036,7 +1054,7 @@ int slsReceiverTCPIPInterface::reset_frames_caught(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1105,7 +1123,7 @@ int slsReceiverTCPIPInterface::set_short_frame() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1287,7 +1305,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1468,7 +1486,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1622,7 +1640,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1657,7 +1675,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){ int slsReceiverTCPIPInterface::eiger_read_frame(){ ret=OK; -/* + /* char fName[MAX_STR_LENGTH]=""; int acquisitionIndex = -1; int frameIndex= -1; @@ -1889,7 +1907,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -1910,7 +1928,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ delete [] retval; delete [] origVal; delete [] raw; -*/ + */ return ret; } @@ -2052,7 +2070,7 @@ int slsReceiverTCPIPInterface::jungfrau_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2130,7 +2148,7 @@ int slsReceiverTCPIPInterface::set_read_frequency(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2196,7 +2214,7 @@ int slsReceiverTCPIPInterface::set_read_receiver_timer(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2259,7 +2277,7 @@ int slsReceiverTCPIPInterface::set_data_stream_enable(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2319,7 +2337,7 @@ int slsReceiverTCPIPInterface::enable_file_write(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2347,7 +2365,7 @@ int slsReceiverTCPIPInterface::get_id(){ #endif if(mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2371,43 +2389,43 @@ int64_t slsReceiverTCPIPInterface::getReceiverVersion(){ int slsReceiverTCPIPInterface::start_readout(){cprintf(BLUE,"In start readout!\n"); - ret=OK; - enum runStatus retval; +ret=OK; +enum runStatus retval; - // execute action if the arguments correctly arrived +// execute action if the arguments correctly arrived #ifdef SLS_RECEIVER_UDP_FUNCTIONS - if (receiverBase == NULL){ - strcpy(mess,SET_RECEIVER_ERR_MESSAGE); - ret=FAIL; - } - /*else if(receiverBase->getStatus()!= IDLE){ +if (receiverBase == NULL){ + strcpy(mess,SET_RECEIVER_ERR_MESSAGE); + ret=FAIL; +} +/*else if(receiverBase->getStatus()!= IDLE){ strcpy(mess,"Can not start receiver readout while receiver not idle\n"); ret = FAIL; }*/ - else{ - receiverBase->startReadout(); - retval = receiverBase->getStatus(); - if((retval == TRANSMITTING) || (retval == RUN_FINISHED) || (retval == IDLE)) - ret = OK; - else - ret = FAIL; - } +else{ + receiverBase->startReadout(); + retval = receiverBase->getStatus(); + if((retval == TRANSMITTING) || (retval == RUN_FINISHED) || (retval == IDLE)) + ret = OK; + else + ret = FAIL; +} #endif - if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; - ret=FORCE_UPDATE; - } +if(ret==OK && mySock->differentClients){ + FILE_LOG(logDEBUG,"Force update" ); + ret=FORCE_UPDATE; +} - // send answer - mySock->SendDataOnly(&ret,sizeof(ret)); - if(ret==FAIL){ - cprintf(RED,"%s\n",mess); - mySock->SendDataOnly(mess,sizeof(mess)); - } - mySock->SendDataOnly(&retval,sizeof(retval)); - //return ok/fail - return ret; +// send answer +mySock->SendDataOnly(&ret,sizeof(ret)); +if(ret==FAIL){ + cprintf(RED,"%s\n",mess); + mySock->SendDataOnly(mess,sizeof(mess)); +} +mySock->SendDataOnly(&retval,sizeof(retval)); +//return ok/fail +return ret; } @@ -2483,7 +2501,7 @@ int slsReceiverTCPIPInterface::set_timer() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2555,7 +2573,7 @@ int slsReceiverTCPIPInterface::enable_compression() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2621,7 +2639,7 @@ int slsReceiverTCPIPInterface::set_detector_hostname() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2722,7 +2740,7 @@ int slsReceiverTCPIPInterface::set_dynamic_range() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2790,7 +2808,7 @@ int slsReceiverTCPIPInterface::enable_overwrite() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2860,7 +2878,7 @@ int slsReceiverTCPIPInterface::enable_tengiga() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -2932,7 +2950,7 @@ int slsReceiverTCPIPInterface::set_fifo_depth() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -3006,7 +3024,7 @@ int slsReceiverTCPIPInterface::set_activate() { if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } @@ -3070,7 +3088,7 @@ int slsReceiverTCPIPInterface::set_flipped_data(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG) << "Force update"; + FILE_LOG(logDEBUG,"Force update" ); ret=FORCE_UPDATE; } From df0fdb7ecb9fca30a257239c0b52673b648b7255 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 10:16:45 +0200 Subject: [PATCH 30/48] changes without ostringstream done --- Makefile | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Makefile diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 From f405aa173370459be890def5638ecef89a236218 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 10:17:30 +0200 Subject: [PATCH 31/48] split zmq_msg_t so its not reused --- .../multiSlsDetector/multiSlsDetector.cpp | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index d792ab0c21..3ac129dddd 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5159,25 +5159,27 @@ int multiSlsDetector::createReceivingDataSockets(const bool destroy){ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, const int size, uint64_t &acqIndex, uint64_t &frameIndex, uint32_t &subframeIndex, string &filename){ - zmq_msg_t message; + zmq_msg_t header_message; //scan header------------------------------------------------------------------- - zmq_msg_init (&message); + zmq_msg_init (&header_message); //cprintf(BLUE,"%d going to receive message\n", isocket); - int len = zmq_msg_recv(&message, zmqsocket[isocket], 0); + int len = zmq_msg_recv(&header_message, zmqsocket[isocket], 0); if (len == -1) { cprintf(BG_RED,"Could not read header for socket %d\n",isocket); - zmq_msg_close(&message); + zmq_msg_close(&header_message); cprintf(RED, "%d message null\n",isocket); return FAIL; } - // error if you print it - // cprintf(BLUE,"%d header len:%d value:%s\n",isocket, len, (char*)zmq_msg_data(&message)); - //cprintf(BLUE,"%d header %d\n",isocket,len); + //cprintf(BLUE,"%d header len:%d value:%s\n",isocket, len, (char*)zmq_msg_data(&header_message)); + rapidjson::Document d; - d.Parse( (char*)zmq_msg_data(&message), zmq_msg_size(&message)); + rapidjson::ParseResult result = d.Parse( (char*)zmq_msg_data(&header_message), len); + if (!result) { + cprintf(RED,"%d Could not parse. len:%d: Message:%s \n", isocket, len, (char*)zmq_msg_data(&header_message) ); + } #ifdef VERYVERBOSE // htype is an array of strings rapidjson::Value::Array htype = d["htype"].GetArray(); @@ -5193,7 +5195,7 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, cout << isocket << "type: " << d["type"].GetString() << endl; #endif - if(d["acqIndex"].GetUint64()!= (long long unsigned int)-1){ //!isocket && + if(d["acqIndex"].GetUint64()!= (uint64_t)-1){ //!isocket && acqIndex = d["acqIndex"].GetUint64(); frameIndex = d["fIndex"].GetUint64(); subframeIndex = -1; @@ -5210,17 +5212,19 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, if(frameIndex == (long long unsigned int)-1) cprintf(RED,"multi frame index -1!!\n"); } // close the message - zmq_msg_close(&message); + zmq_msg_close(&header_message); //scan data------------------------------------------------------------------- - zmq_msg_init (&message); - len = zmq_msg_recv(&message, zmqsocket[isocket], 0); - //cprintf(BLUE,"%d data %d\n",isocket,len); - - //end of socket ("end") - if(len == 3){ - //cprintf(RED,"%d Received end of acquisition\n", isocket); + zmq_msg_t data_message; + zmq_msg_init (&data_message); + len = zmq_msg_recv(&data_message, zmqsocket[isocket], 0); + //cprintf(GREEN,"%d data %d\n",isocket,len); + + //end of socket ("end\0") + if(len == 4){ + zmq_msg_close(&data_message); // close the message + //cprintf(RED,"%d Received end of acquisition len:%d\n", isocket, len); return FAIL; } @@ -5232,8 +5236,8 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, //actual image else{ //actual data - //cprintf(BLUE,"%d actual dataaa\n",isocket); - memcpy((char*)image,(char*)zmq_msg_data(&message),size); + // cprintf(GREEN,"%d actual dataaa\n",isocket); + memcpy((char*)image,(char*)zmq_msg_data(&data_message),size); //jungfrau masking adcval if(masking){ @@ -5244,7 +5248,7 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, } } - zmq_msg_close(&message); // close the message + zmq_msg_close(&data_message); // close the message return OK; } From 3b4b2d707f176b8d48582a9229d626b1cb5ce25a Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 10:17:39 +0200 Subject: [PATCH 32/48] changes without ostringstream done --- .../include/UDPStandardImplementation.h | 2 - slsReceiverSoftware/include/logger.h | 17 +- .../src/UDPBaseImplementation.cpp | 230 ++-- slsReceiverSoftware/src/UDPInterface.cpp | 15 +- .../src/UDPStandardImplementation.cpp | 1072 ++++++----------- slsReceiverSoftware/src/slsReceiver.cpp | 25 +- .../src/slsReceiverTCPIPInterface.cpp | 110 +- 7 files changed, 557 insertions(+), 914 deletions(-) diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index 1909d45ef7..0352dee455 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -831,8 +831,6 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase /** Progress (currentFrameNumber) Mutex */ pthread_mutex_t progressMutex; - char streambuf[MAX_NUMBER_OF_WRITER_THREADS][MAX_STR_LENGTH]; - char cstreambuf[MAX_STR_LENGTH]; }; diff --git a/slsReceiverSoftware/include/logger.h b/slsReceiverSoftware/include/logger.h index 6d4bd30041..35d48473d0 100644 --- a/slsReceiverSoftware/include/logger.h +++ b/slsReceiverSoftware/include/logger.h @@ -14,7 +14,7 @@ #elif VERYVERBOSE #define FILELOG_MAX_LEVEL logDEBUG4 #elif VERBOSE -#define FILELOG_MAX_LEVEL logDEBUG +#define FILELOG_MAX_LEVEL logDEBUG1 #endif #ifndef FILELOG_MAX_LEVEL @@ -31,11 +31,14 @@ class Logger { public: Logger(){}; - enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5}; + enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5}; - static void FILE_LOG(TLogLevel level, char* msg) + static void FILE_LOG(TLogLevel level, char const* msg) { + + if(level > FILELOG_MAX_LEVEL) return; + char buffer[11]; const int buffer_len = sizeof(buffer); time_t t; @@ -70,10 +73,10 @@ class Logger { */ switch(level){ - case logERROR: cprintf(RED BOLD, "- %s ERROR: %s", result, msg); break; - case logWARNING: cprintf(YELLOW BOLD,"- %s WARNING: %s", result, msg); break; - case logINFO: cprintf(GRAY, "- %s INFO: %s", result, msg); break; - default: break; + case logERROR: cprintf(RED BOLD, "- %s ERROR: %s \n", result, msg); break; + case logWARNING: cprintf(YELLOW BOLD,"- %s WARNING: %s \n", result, msg); break; + case logINFO: cprintf(GRAY, "- %s INFO: %s \n", result, msg); break; + default: cprintf(GRAY, "- %s DEBUG: %s \n", result, msg); break; } diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index dfae32bc26..2235e480d6 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -206,9 +206,7 @@ int UDPBaseImplementation::getActivate() const{ return activated;} /**initial parameters***/ void UDPBaseImplementation::configure(map config_map){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + FILE_LOG(logERROR, " must be overridden by child classes"); } void UDPBaseImplementation::setFlippedData(int axis, int enable){ @@ -216,9 +214,9 @@ void UDPBaseImplementation::setFlippedData(int axis, int enable){ if(axis<0 || axis>1) return; flippedData[axis] = enable==0?0:1; - ostringstream os; - os << "Flipped Data: " << flippedData[0] << " , " << flippedData[1]; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Flipped Data: %d , %d ", flippedData[0], flippedData[1]); + FILE_LOG(logINFO, cstreambuf); } @@ -228,14 +226,13 @@ void UDPBaseImplementation::setFileName(const char c[]){ if(strlen(c)) strcpy(fileName, c); - ostringstream os; - os << "File name:" << fileName; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "File name: %s ", fileName); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setFilePath(const char c[]){ - if(strlen(c)){ //check if filepath exists struct stat st; @@ -243,69 +240,67 @@ void UDPBaseImplementation::setFilePath(const char c[]){ strcpy(filePath,c); else{ strcpy(filePath,""); - ostringstream os; - os << "FilePath does not exist:" << filePath; - string message(os.str()); FILE_LOG(logWARNING, message); + + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "FilePath does not exist: %s ", filePath); + FILE_LOG(logWARNING, cstreambuf); } strcpy(filePath, c); } - /*FILE_LOG(logDEBUG) << "Info: File path:" << filePath;*/ + /*{ + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "File path:: %s ", filePath); + FILE_LOG(logDEBUG, cstreambuf); + }*/ } void UDPBaseImplementation::setFileIndex(const uint64_t i){ - fileIndex = i; - ostringstream os; - os << "File Index:" << fileIndex; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "File Index: %lu ", fileIndex); + FILE_LOG(logINFO, cstreambuf); } //FIXME: needed? void UDPBaseImplementation::setScanTag(const int i){ - scanTag = i; - ostringstream os; - os << "Scan Tag:" << scanTag; - string message(os.str()); FILE_LOG(logINFO, message); - + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Scan Tag: %d ", scanTag); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setFrameIndexEnable(const bool b){ - frameIndexEnable = b; - ostringstream os; - os << "Frame Index Enable: " << stringEnable(frameIndexEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Frame Index Enable: %s ", stringEnable(frameIndexEnable).c_str()); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setFileWriteEnable(const bool b){ - fileWriteEnable = b; - ostringstream os; - os << "File Write Enable: " << stringEnable(fileWriteEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "File Write Enable: %s ", stringEnable(fileWriteEnable).c_str()); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setOverwriteEnable(const bool b){ - overwriteEnable = b; - ostringstream os; - os << "Overwrite Enable: " << stringEnable(overwriteEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Overwrite Enable: %s ", stringEnable(overwriteEnable).c_str()); + FILE_LOG(logINFO, cstreambuf); } int UDPBaseImplementation::setDataCompressionEnable(const bool b){ - dataCompressionEnable = b; - ostringstream os; - os << "Data Compression : " << stringEnable(dataCompressionEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Data Compression: %s ", stringEnable(dataCompressionEnable).c_str()); + FILE_LOG(logINFO, cstreambuf); //overridden methods might return FAIL return OK; @@ -315,49 +310,44 @@ int UDPBaseImplementation::setDataCompressionEnable(const bool b){ /***connection parameters***/ void UDPBaseImplementation::setUDPPortNumber(const uint32_t i){ - udpPortNum[0] = i; - ostringstream os; - os << "UDP Port Number[0]:" << udpPortNum[0]; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "UDP Port Number[0]: %u ", udpPortNum[0]); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setUDPPortNumber2(const uint32_t i){ - udpPortNum[1] = i; - ostringstream os; - os << "UDP Port Number[1]:" << udpPortNum[1]; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "UDP Port Number[1]: %u ", udpPortNum[1]); + FILE_LOG(logINFO, cstreambuf); } void UDPBaseImplementation::setEthernetInterface(const char* c){ - strcpy(eth, c); - ostringstream os; - os << "Ethernet Interface: " << eth; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Ethernet Interface: %s ", eth); + FILE_LOG(logINFO, cstreambuf); } /***acquisition parameters***/ void UDPBaseImplementation::setShortFrameEnable(const int i){ - shortFrameEnable = i; - ostringstream os; - os << "Short Frame Enable: " << stringEnable(shortFrameEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Short Frame Enable: %d ", shortFrameEnable); + FILE_LOG(logINFO, cstreambuf); } int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){ - frameToGuiFrequency = freq; - ostringstream os; - os << "Frame To Gui Frequency:" << frameToGuiFrequency; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Frame To Gui Frequency: %u ", frameToGuiFrequency); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -365,21 +355,19 @@ int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){ void UDPBaseImplementation::setFrameToGuiTimer(const uint32_t time_in_ms){ - frameToGuiTimerinMS = time_in_ms; - ostringstream os; - os << "Frame To Gui Timer:" << frameToGuiTimerinMS; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Frame To Gui Timer: %u ", frameToGuiTimerinMS); + FILE_LOG(logINFO, cstreambuf); } uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){ - dataStreamEnable = enable; - ostringstream os; - os << "Streaming Data from Receiver:" << dataStreamEnable; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Streaming Data from Receiver: %d ", dataStreamEnable); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -388,11 +376,10 @@ uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){ int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){ - acquisitionPeriod = i; - ostringstream os; - os << "Acquisition Period:" << (double)acquisitionPeriod/(1E9) << "s"; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Acquisition Period: %f s ", (double)acquisitionPeriod/(1E9)); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -400,11 +387,10 @@ int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){ int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){ - acquisitionTime = i; - ostringstream os; - os << "Acquisition Time:" << (double)acquisitionTime/(1E9) << "s"; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Acquisition Time: %f s ", (double)acquisitionTime/(1E9)); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -412,11 +398,10 @@ int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){ int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){ - numberOfFrames = i; - ostringstream os; - os << "Number of Frames:" << numberOfFrames; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Number of Frames: %lu ", numberOfFrames); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -424,11 +409,10 @@ int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){ int UDPBaseImplementation::setDynamicRange(const uint32_t i){ - dynamicRange = i; - ostringstream os; - os << "Dynamic Range:" << dynamicRange; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Dynamic Range: %u ", dynamicRange); + FILE_LOG(logINFO, cstreambuf); //overrridden child classes might return FAIL return OK; @@ -436,11 +420,10 @@ int UDPBaseImplementation::setDynamicRange(const uint32_t i){ int UDPBaseImplementation::setTenGigaEnable(const bool b){ - tengigaEnable = b; - ostringstream os; - os << "Ten Giga Enable: " << stringEnable(tengigaEnable); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Ten Giga Enable: %s ", stringEnable(tengigaEnable).c_str()); + FILE_LOG(logINFO, cstreambuf); //overridden functions might return FAIL return OK; @@ -448,11 +431,10 @@ int UDPBaseImplementation::setTenGigaEnable(const bool b){ int UDPBaseImplementation::setFifoDepth(const uint32_t i){ - fifoDepth = i; - ostringstream os; - os << "Fifo Depth: " << i; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Fifo Depth: %u ", i); + FILE_LOG(logINFO, cstreambuf); //overridden functions might return FAIL return OK; @@ -467,23 +449,23 @@ int UDPBaseImplementation::setFifoDepth(const uint32_t i){ /***initial functions***/ int UDPBaseImplementation::setDetectorType(const detectorType d){ - myDetectorType = d; //if eiger, set numberofListeningThreads = 2; - ostringstream os; - os << "Detector Type:" << getDetectorType(d); - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Detector Type: %s ", getDetectorType(d).c_str()); + FILE_LOG(logINFO, cstreambuf); + return OK; } void UDPBaseImplementation::initialize(const char *c){ - if(strlen(c)) strcpy(detHostname, c); - ostringstream os; - os << "Detector Hostname:" << detHostname; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Detector Hostname: %s ", detHostname); + FILE_LOG(logINFO, cstreambuf); + } @@ -492,68 +474,62 @@ void UDPBaseImplementation::resetAcquisitionCount(){ totalPacketsCaught = 0; - ostringstream os; - os << "totalPacketsCaught:" << totalPacketsCaught; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Total Packets Caught: %lu ", totalPacketsCaught); + FILE_LOG(logINFO, cstreambuf); } int UDPBaseImplementation::startReceiver(char *c){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); + return OK; } void UDPBaseImplementation::stopReceiver(){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); } void UDPBaseImplementation::startReadout(){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); } int UDPBaseImplementation::shutDownUDPSockets(){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); //overridden functions might return FAIL return OK; } void UDPBaseImplementation::readFrame(int ithread, char* c,char** raw, int64_t &startAcquisitionIndex, int64_t &startFrameIndex){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); } //FIXME: needed, isnt stopReceiver enough? void UDPBaseImplementation::abort(){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); } void UDPBaseImplementation::closeFile(int ithread){ - ostringstream os; - os << " must be overridden by child classes"; - string message(os.str()); FILE_LOG(logERROR, message); + + FILE_LOG(logERROR, " must be overridden by child classes"); } int UDPBaseImplementation::setActivate(int enable){ - if(enable != -1){ activated = enable; - ostringstream os; - os << "Activation: " << stringEnable(activated); - string message(os.str()); FILE_LOG(logINFO, message); + + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Activation: %s ", stringEnable(activated).c_str()); + FILE_LOG(logINFO, cstreambuf); } return activated; diff --git a/slsReceiverSoftware/src/UDPInterface.cpp b/slsReceiverSoftware/src/UDPInterface.cpp index 749be3b711..193c6e3e35 100644 --- a/slsReceiverSoftware/src/UDPInterface.cpp +++ b/slsReceiverSoftware/src/UDPInterface.cpp @@ -22,24 +22,21 @@ using namespace std; UDPInterface * UDPInterface::create(string receiver_type){ + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Starting %s ", receiver_type.c_str()); + if (receiver_type == "standard"){ - ostringstream os; - os << "Starting " << receiver_type; - string message(os.str()); FILE_LOG(logINFO, message); + FILE_LOG(logINFO, cstreambuf); return new UDPStandardImplementation(); } #ifdef REST else if (receiver_type == "REST"){ - ostringstream os; - os << "Starting " << receiver_type; - string message(os.str()); FILE_LOG(logINFO, message); + FILE_LOG(logINFO, cstreambuf); return new UDPRESTImplementation(); } #endif else{ - ostringstream os; - os << "[ERROR] UDP interface not supported, using standard implementation"; - string message(os.str()); FILE_LOG(logWARNING, message); + FILE_LOG(logWARNING, "[ERROR] UDP interface not supported, using standard implementation"); return new UDPBaseImplementation(); } } diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index ee8bf034eb..820ed27065 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -3,9 +3,6 @@ * @short does all the functions for a receiver, set/get parameters, start/stop etc. ***********************************************/ -sprintf(cstreambuf, "%s", " \0"); -FILE_LOG(logDEBUG, cstreambuf); - #include "UDPStandardImplementation.h" #include "moench02ModuleData.h" @@ -38,10 +35,6 @@ UDPStandardImplementation::UDPStandardImplementation(){ initializeMembers(); - for(int i= 0; i < MAX_NUMBER_OF_WRITER_THREADS; ++i) - memset(streambuf[i], 0, MAX_STR_LENGTH ); - memset(cstreambuf, 0, MAX_STR_LENGTH ); - //***mutex*** pthread_mutex_init(&statusMutex,NULL); pthread_mutex_init(&writeMutex,NULL); @@ -51,11 +44,9 @@ UDPStandardImplementation::UDPStandardImplementation(){ //to increase socket receiver buffer size and max length of input queue by changing kernel settings if(myDetectorType == EIGER); else if(system("echo $((100*1024*1024)) > /proc/sys/net/core/rmem_max")){ - sprintf(cstreambuf, "%s", "Warning: No root permission to change socket receiver buffer size in file /proc/sys/net/core/rmem_max \0"); - FILE_LOG(logDEBUG, cstreambuf); + FILE_LOG(logDEBUG1, "Warning: No root permission to change socket receiver buffer size in file /proc/sys/net/core/rmem_max"); }else if(system("echo 250000 > /proc/sys/net/core/netdev_max_backlog")){ - sprintf(cstreambuf, "%s", "Warning: No root permission to change max length of input queue in file /proc/sys/net/core/netdev_max_backlog \0"); - FILE_LOG(logDEBUG, cstreambuf); + FILE_LOG(logDEBUG1, "Warning: No root permission to change max length of input queue in file /proc/sys/net/core/netdev_max_backlog "); } /** permanent setting by heiner @@ -84,8 +75,7 @@ UDPStandardImplementation::~UDPStandardImplementation(){ /***initial parameters***/ void UDPStandardImplementation::deleteMembers(){ - sprintf(cstreambuf, "%s", "Deleting member pointers \0"); - FILE_LOG(logDEBUG, cstreambuf); + FILE_LOG(logDEBUG1, "Deleting member pointers "); shutDownUDPSockets(); for(int i=0;iShutDownSocket(); - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Shut down UDP Socket " << i; - string message(os.str()); FILE_LOG(logINFO, message); - } + + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Shut down UDP Sock %d ", i); + FILE_LOG(logINFO, cstreambuf); + delete udpSocket[i]; udpSocket[i] = 0; } @@ -1321,14 +1190,8 @@ int UDPStandardImplementation::shutDownUDPSockets(){ * Post:udp sockets closed, status is transmitting * */ void UDPStandardImplementation::startReadout(){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Transmitting last data"; - string message(os.str()); FILE_LOG(logDEBUG, message); - } + FILE_LOG(logDEBUG1, "Transmitting last data "); if(status == RUNNING){ @@ -1353,7 +1216,7 @@ void UDPStandardImplementation::startReadout(){ //(as one listens to many at a time, shouldnt cut off in between) while((prev != totalP) || (prevReceivedInBuffer!= currentReceivedInBuffer)){ #ifdef DEBUG5 - cprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d PrevBuffer:%d currentBuffer:%d\n",prev,totalP,prevReceivedInBuffer,currentReceivedInBuffer); + cprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d PrevBuffer:%d currentBuffer:\n",prev,totalP,prevReceivedInBuffer,currentReceivedInBuffer); #endif //usleep(2*1000*1000); @@ -1380,13 +1243,9 @@ void UDPStandardImplementation::startReadout(){ pthread_mutex_lock(&statusMutex); status = TRANSMITTING; pthread_mutex_unlock(&statusMutex); - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Status: Transmitting"; - string message(os.str()); FILE_LOG(logINFO, message); - } + + FILE_LOG(logINFO, "Status: Transmitting "); + } //shut down udp sockets and make listeners push dummy (end) packets for writers @@ -1407,13 +1266,9 @@ void UDPStandardImplementation::closeFile(int ithread){ //normal if(!dataCompressionEnable){ if(sfilefd[ithread]){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Going to close file: " << fileno(sfilefd[ithread]); - string message(os.str()); FILE_LOG(logDEBUG4, message); - } + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Going to close file: %d ", fileno(sfilefd[ithread])); + FILE_LOG(logDEBUG4, cstreambuf); fflush(sfilefd[ithread]); fclose(sfilefd[ithread]); @@ -1425,13 +1280,10 @@ void UDPStandardImplementation::closeFile(int ithread){ else{ #if (defined(MYROOT1) && defined(ALLFILE_DEBUG)) || !defined(MYROOT1) if(sfilefd[0]){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "sfilefd: " << fileno(sfilefd[0]); - string message(os.str()); FILE_LOG(logDEBUG4, message); - } + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "sfilefd: %d ", fileno(sfilefd[0])); + FILE_LOG(logDEBUG4, cstreambuf); + fclose(sfilefd[0]); sfilefd[0] = 0; } @@ -1471,13 +1323,9 @@ int UDPStandardImplementation::setActivate(int enable){ if(enable != -1){ activated = enable; - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Activation: " << stringEnable(activated); - string message(os.str()); FILE_LOG(logINFO, message); - } + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Activation: %s ", stringEnable(activated).c_str()); + FILE_LOG(logINFO, cstreambuf); } for(int i=0; inewDataSet(); if(myFile[ithread]==NULL){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "File Null"; - string message(os.str()); FILE_LOG(logERROR, message); - } + FILE_LOG(logERROR, "File Null "); return FAIL; } if(!myFile[ithread]->IsOpen()){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "File Not Open"; - string message(os.str()); FILE_LOG(logERROR, message); - } + FILE_LOG(logERROR, "File Not Open "); return FAIL; } return OK; @@ -2179,15 +1891,12 @@ void UDPStandardImplementation::startDataCallback(){ //zmq_setsockopt(zmqsocket,ZMQ_SNDHWM,&val,sizeof(val)); //set SEND HIGH WATER MARK (8-9ms slower) zmq_bind(zmqsocket,hostName); // bind - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); { - ostringstream os; - os << "Thread" << ithread << ": ZMQ Server at " << hostName; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Thread %d: ZMQ Server at %s ", ithread, hostName); + FILE_LOG(logINFO, cstreambuf); } - int headersize=0; switch(myDetectorType){ case EIGER: @@ -2207,17 +1916,7 @@ void UDPStandardImplementation::startDataCallback(){ int oneframesize = oneDataSize * packetsPerFrame; char* buffer = new char[packetsPerFrame*oneDataSize](); memset(buffer,0xFF,oneframesize); - int size = 0; - int offset = 0; - uint32_t currentfnum = 0; - uint64_t fnum = 0; - uint32_t pnum = 0; - uint32_t snum = 0; - uint64_t bid = 0; bool randomSendNow = true; - bool newFrame = false; - - //header details const char *jsonFmt ="{" @@ -2241,7 +1940,7 @@ void UDPStandardImplementation::startDataCallback(){ "\"roundRNumber\":%u, " "\"detType\":%u, " "\"version\":%u" - "}\0"; + "}\n"; int npixelsx=0, npixelsy=0; switch(myDetectorType) { case JUNGFRAU: npixelsx = JFRAU_PIXELS_IN_ONE_ROW; npixelsy = JFRAU_PIXELS_IN_ONE_COL; break; @@ -2253,7 +1952,6 @@ void UDPStandardImplementation::startDataCallback(){ #ifdef DEBUG int oldpnum = -1; #endif - int datapacketscaught = 0; /* inner loop - loop for each buffer */ //until mask reset (dummy pcaket got by writer) @@ -2277,14 +1975,14 @@ void UDPStandardImplementation::startDataCallback(){ acquisitionIndex = -1; { char buf[1000]="";memset(buf,0,1000); - int len = sprintf(buf,jsonFmt, + sprintf(buf,jsonFmt, SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); zmq_send(zmqsocket, buf,1000, 0); } //send final data - zmq_send (zmqsocket, "end\0", 4, 0); + zmq_send (zmqsocket, "end\n", 4, 0); pthread_mutex_lock(&statusMutex); dataCallbackThreadsMask^=(1<frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, header->modId, header->xCoord, header->yCoord, header->zCoord, header->debug, header->roundRNumber, header->detType, header->version); @@ -2410,12 +2108,10 @@ void UDPStandardImplementation::startListening(){ //udpsocket doesnt exist if(activated && !udpSocket[ithread]){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); { - ostringstream os; - os << "Listening_Thread " << ithread << ": UDP Socket not created or shut down earlier"; - string message(os.str()); FILE_LOG(logERROR, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Listening_Thread %d: UDP Socket not created or shut down earlier ", ithread); + FILE_LOG(logERROR, cstreambuf); } stopListening(ithread,0); continue; @@ -2744,13 +2440,9 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ //free empty buffer if(numbytes <= 0){ - sprintf(cstreambuf, "%s", " \0"); - FILE_LOG(logDEBUG, cstreambuf); - { - ostringstream os; - os << "Listening "<< ithread << ": End of Acquisition"; - string message(os.str()); FILE_LOG(logINFO, message); - } + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Listening %d: End of Acquisition", ithread); + FILE_LOG(logINFO, cstreambuf); while(!fifoFree[ithread]->push(buffer[ithread])); } @@ -2784,12 +2476,10 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ listeningThreadsMask^=(1<packetNumber))-1; - ostringstream os; - os << "Fifo "<< ithread << ": Frame Number is still zero from firmware. and pnum:" << packetnumber << "udp port num:" << udpPortNum[ithread]; - string message(os.str()); FILE_LOG(logERROR, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Fifo %d: Frame Number is zero from firmware. ", ithread); + FILE_LOG(logERROR, cstreambuf); - } return FAIL; } packetnumber = (*( (uint16_t*) footer->packetNumber))-1; diff --git a/slsReceiverSoftware/src/slsReceiver.cpp b/slsReceiverSoftware/src/slsReceiver.cpp index 1f1678c6ce..343cd8559a 100644 --- a/slsReceiverSoftware/src/slsReceiver.cpp +++ b/slsReceiverSoftware/src/slsReceiver.cpp @@ -106,31 +106,32 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){ if( !fname.empty() ){ try{ - ostringstream os; - os << "config file name " << fname; - string message(os.str()); FILE_LOG(logDEBUG, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "config file name : %s ",fname.c_str()); + FILE_LOG(logDEBUG1, cstreambuf); + success = read_config_file(fname, &tcpip_port_no, &configuration_map); //VERBOSE_PRINT("Read configuration file of " + iline + " lines"); } catch(...){ - ostringstream os; - os << "Error opening configuration file " << fname ; - string message(os.str()); FILE_LOG(logERROR, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Error opening configuration file : %s ",fname.c_str()); + FILE_LOG(logERROR, cstreambuf); + success = FAIL; } } if(success != OK){ - ostringstream os; - os << "Failed: see output above for more information " ; - string message(os.str()); FILE_LOG(logERROR, message); + FILE_LOG(logERROR, "Failed: see output above for more information "); } if (success==OK){ - ostringstream os; - os << "SLS Receiver starting " << udp_interface_type << " on port " << tcpip_port_no << endl; - string message(os.str()); FILE_LOG(logDEBUG, message); + + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "SLS Receiver starting %s on port %d ",udp_interface_type.c_str(), tcpip_port_no); + FILE_LOG(logDEBUG1, cstreambuf); #ifdef REST udp_interface = UDPInterface::create(udp_interface_type); udp_interface->configure(configuration_map); diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index ea68631fd1..1840f7715a 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -126,22 +126,17 @@ int slsReceiverTCPIPInterface::setPortNumber(int pn){ int slsReceiverTCPIPInterface::start(){ - { - ostringstream os; - os << "Creating TCP Server Thread" << endl; - string message(os.str()); FILE_LOG(logDEBUG, message); - } + + FILE_LOG(logDEBUG1, "Creating TCP Server Thread"); + killTCPServerThread = 0; if(pthread_create(&TCPServer_thread, NULL,startTCPServerThread, (void*) this)){ cout << "Could not create TCP Server thread" << endl; return FAIL; } //#ifdef VERYVERBOSE - { - ostringstream os; - os << "TCP Server thread created successfully." << endl; - string message(os.str()); FILE_LOG(logDEBUG, message); - } + FILE_LOG(logDEBUG1, "TCP Server thread created successfully."); + //#endif return OK; } @@ -402,20 +397,20 @@ int slsReceiverTCPIPInterface::set_detector_type(){ } } - //#ifdef VERYVERBOSE +//#ifdef VERYVERBOSE if(ret!=FAIL) { - ostringstream os; - os << "detector type " << dr; - string message(os.str()); FILE_LOG(logDEBUG, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Detector Type %d ", (int)dr); + FILE_LOG(logDEBUG1, cstreambuf); } else cprintf(RED, "%s\n", mess); - //#endif +//#endif #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -482,7 +477,7 @@ int slsReceiverTCPIPInterface::set_file_name() { if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -557,7 +552,7 @@ int slsReceiverTCPIPInterface::set_file_dir() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -629,7 +624,7 @@ int slsReceiverTCPIPInterface::set_file_index() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -707,7 +702,7 @@ int slsReceiverTCPIPInterface::set_frame_index() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -772,15 +767,15 @@ int slsReceiverTCPIPInterface::setup_udp(){ //setup udpip //get ethernet interface or IP to listen to { - ostringstream os; - os << "Receiver UDP IP: " << args[0]; - string message(os.str()); FILE_LOG(logINFO, message); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Receiver UDP IP: %s ",args[0]); + FILE_LOG(logINFO, cstreambuf); } temp = genericSocket::ipToName(args[0]); if(temp=="none"){ ret = FAIL; strcpy(mess, "Failed to get ethernet interface or IP\n"); - FILE_LOG(logERROR, string(mess)); + FILE_LOG(logERROR, "Failed to get ethernet interface or IP "); } else{ strcpy(eth,temp.c_str()); @@ -801,9 +796,10 @@ int slsReceiverTCPIPInterface::setup_udp(){ } else{ strcpy(retval,temp.c_str()); - ostringstream os; - os << "Reciever MAC Address: " << retval; - string message(os.str()); FILE_LOG(logINFO, message); + + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "Reciever MAC Address: %s ",retval); + FILE_LOG(logINFO, cstreambuf); } } } @@ -811,14 +807,16 @@ int slsReceiverTCPIPInterface::setup_udp(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } // send answer mySock->SendDataOnly(&ret,sizeof(ret)); if(ret==FAIL){ - FILE_LOG(logERROR, string(mess)); + char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); + sprintf(cstreambuf, "%s ", mess); + FILE_LOG(logERROR, cstreambuf); mySock->SendDataOnly(mess,sizeof(mess)); } mySock->SendDataOnly(retval,MAX_STR_LENGTH); @@ -867,7 +865,7 @@ int slsReceiverTCPIPInterface::start_receiver(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -915,7 +913,7 @@ int slsReceiverTCPIPInterface::stop_receiver(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -946,7 +944,7 @@ int slsReceiverTCPIPInterface::get_status(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -977,7 +975,7 @@ int slsReceiverTCPIPInterface::get_frames_caught(){ }else retval=receiverBase->getTotalFramesCaught(); #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1009,7 +1007,7 @@ int slsReceiverTCPIPInterface::get_frame_index(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1054,7 +1052,7 @@ int slsReceiverTCPIPInterface::reset_frames_caught(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1123,7 +1121,7 @@ int slsReceiverTCPIPInterface::set_short_frame() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1305,7 +1303,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1486,7 +1484,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1640,7 +1638,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -1907,7 +1905,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2070,7 +2068,7 @@ int slsReceiverTCPIPInterface::jungfrau_read_frame(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2148,7 +2146,7 @@ int slsReceiverTCPIPInterface::set_read_frequency(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2214,7 +2212,7 @@ int slsReceiverTCPIPInterface::set_read_receiver_timer(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2277,7 +2275,7 @@ int slsReceiverTCPIPInterface::set_data_stream_enable(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2337,7 +2335,7 @@ int slsReceiverTCPIPInterface::enable_file_write(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2365,7 +2363,7 @@ int slsReceiverTCPIPInterface::get_id(){ #endif if(mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2413,7 +2411,7 @@ else{ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2501,7 +2499,7 @@ int slsReceiverTCPIPInterface::set_timer() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2573,7 +2571,7 @@ int slsReceiverTCPIPInterface::enable_compression() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2639,7 +2637,7 @@ int slsReceiverTCPIPInterface::set_detector_hostname() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2740,7 +2738,7 @@ int slsReceiverTCPIPInterface::set_dynamic_range() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2808,7 +2806,7 @@ int slsReceiverTCPIPInterface::enable_overwrite() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2878,7 +2876,7 @@ int slsReceiverTCPIPInterface::enable_tengiga() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -2950,7 +2948,7 @@ int slsReceiverTCPIPInterface::set_fifo_depth() { #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -3024,7 +3022,7 @@ int slsReceiverTCPIPInterface::set_activate() { if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } @@ -3088,7 +3086,7 @@ int slsReceiverTCPIPInterface::set_flipped_data(){ #endif if(ret==OK && mySock->differentClients){ - FILE_LOG(logDEBUG,"Force update" ); + FILE_LOG(logDEBUG1,"Force update" ); ret=FORCE_UPDATE; } From 0f3a63f101b14d5df20ea09706fc0330791d1237 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 17:42:38 +0200 Subject: [PATCH 33/48] changed zmq default port starting at 40001 to be able to view in wireshark and removed headersize for warning --- slsReceiverSoftware/include/genericSocket.h | 2 +- slsReceiverSoftware/src/UDPStandardImplementation.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index 2cbe9259ad..2f151de43e 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -81,7 +81,7 @@ using namespace std; #define DEFAULT_BACKLOG 5 #define DEFAULT_UDP_PORTNO 50001 #define DEFAULT_GUI_PORTNO 65000 -#define DEFAULT_ZMQ_PORTNO 70001 +#define DEFAULT_ZMQ_PORTNO 40001 diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 820ed27065..ece4363f1c 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1897,7 +1897,6 @@ void UDPStandardImplementation::startDataCallback(){ FILE_LOG(logINFO, cstreambuf); } - int headersize=0; switch(myDetectorType){ case EIGER: headersize = EIGER_DATA_PACKET_HEADER_SIZE; break; From b1de501befc149fc41dfb6481de9f2a9a9ef7162 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 17:59:46 +0200 Subject: [PATCH 34/48] updaterev --- slsDetectorSoftware/gitInfo.txt | 10 +++++----- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 68f0d36c8c..39f94001e1 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: 7a0a1ee8734440dc4e1e638d6fec1eaa9d2404ae -Revision: 1348 -Branch: 2.3.1 +Repsitory UUID: 41acb4c1ab89fe85b049c329adb539c3ad5b107a +Revision: 1350 +Branch: 2.3.2 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1348 -Last Changed Date: 2017-04-11 13:39:28 +0200 +Last Changed Rev: 1350 +Last Changed Date: 2017-04-19 10:17:30 +0200 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index a08358465d..ef27d91d61 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "7a0a1ee8734440dc4e1e638d6fec1eaa9d2404ae" -//#define SVNREV 0x1348 +#define SVNREPUUIDLIB "41acb4c1ab89fe85b049c329adb539c3ad5b107a" +//#define SVNREV 0x1350 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1348 -#define SVNDATELIB 0x20170411 +#define SVNREVLIB 0x1350 +#define SVNDATELIB 0x20170419 // From 75ddf535dc96168d069ca9ae8faf33edd134a018 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 19 Apr 2017 17:59:53 +0200 Subject: [PATCH 35/48] updaterev --- slsReceiverSoftware/gitInfo.txt | 10 +++++----- slsReceiverSoftware/include/gitInfoReceiver.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index e3052e62d4..4588a64571 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git -Repsitory UUID: db080a125daed36a1fa85b00df7a239e22ae5130 -Revision: 521 -Branch: 2.3.1 +Repsitory UUID: 9c7ef694925368efd5108b674f577b104a97f01f +Revision: 525 +Branch: 2.3.2 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 521 -Last Changed Date: 2017-04-11 13:39:35 +0200 +Last Changed Rev: 525 +Last Changed Date: 2017-04-19 17:42:38 +0200 diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index 1b3f7e886c..069dc38d1e 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "db080a125daed36a1fa85b00df7a239e22ae5130" -//#define SVNREV 0x521 +#define SVNREPUUID "9c7ef694925368efd5108b674f577b104a97f01f" +//#define SVNREV 0x525 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x521 -#define SVNDATE 0x20170411 +#define SVNREV 0x525 +#define SVNDATE 0x20170419 // From 0ba537e4796bafe53809835c5d2b987df46bae90 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 20 Apr 2017 08:26:16 +0200 Subject: [PATCH 36/48] removed headersize compile error --- slsReceiverSoftware/src/UDPStandardImplementation.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index ece4363f1c..5108e7b927 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1897,13 +1897,6 @@ void UDPStandardImplementation::startDataCallback(){ FILE_LOG(logINFO, cstreambuf); } - switch(myDetectorType){ - case EIGER: - headersize = EIGER_DATA_PACKET_HEADER_SIZE; break; - default: - headersize = 0; break; - } - //let calling function know thread started and obtained current (after sockets created) if(!zmqThreadStarted) zmqThreadStarted = true; From b6b0df62b604b2d34713433ab468ac4502521798 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 20 Apr 2017 08:26:29 +0200 Subject: [PATCH 37/48] updaterev --- slsReceiverSoftware/gitInfo.txt | 8 ++++---- slsReceiverSoftware/include/gitInfoReceiver.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index 4588a64571..f1d69d5c5a 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git -Repsitory UUID: 9c7ef694925368efd5108b674f577b104a97f01f -Revision: 525 +Repsitory UUID: 239415ea0db2b9cdccd9bce80f0c78216115ffea +Revision: 527 Branch: 2.3.2 Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 525 -Last Changed Date: 2017-04-19 17:42:38 +0200 +Last Changed Rev: 527 +Last Changed Date: 2017-04-20 08:26:16 +0200 diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index 069dc38d1e..8a16cca19d 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "9c7ef694925368efd5108b674f577b104a97f01f" -//#define SVNREV 0x525 +#define SVNREPUUID "239415ea0db2b9cdccd9bce80f0c78216115ffea" +//#define SVNREV 0x527 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x525 -#define SVNDATE 0x20170419 +#define SVNREV 0x527 +#define SVNDATE 0x20170420 // From 9e2f2697c7a77f4108d053c8e1243b0020689c0e Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 27 Apr 2017 13:58:25 +0200 Subject: [PATCH 38/48] crazy amount of changes, both necessary and unnecessary;need to narrow down the real change later --- .../multiSlsDetector/multiSlsDetector.cpp | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 3ac129dddd..595e27bc4c 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5158,7 +5158,7 @@ int multiSlsDetector::createReceivingDataSockets(const bool destroy){ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, const int size, uint64_t &acqIndex, uint64_t &frameIndex, uint32_t &subframeIndex, string &filename){ - + bool data = true; zmq_msg_t header_message; //scan header------------------------------------------------------------------- @@ -5179,6 +5179,14 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, rapidjson::ParseResult result = d.Parse( (char*)zmq_msg_data(&header_message), len); if (!result) { cprintf(RED,"%d Could not parse. len:%d: Message:%s \n", isocket, len, (char*)zmq_msg_data(&header_message) ); + fflush( stdout ); + char* buf = (char*)zmq_msg_data(&header_message); + for(int i= 0;i < len; ++i) { + cprintf(RED,"%02x ",buf[i]); + } + printf("\n"); + fflush( stdout ); + } #ifdef VERYVERBOSE // htype is an array of strings @@ -5195,38 +5203,47 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, cout << isocket << "type: " << d["type"].GetString() << endl; #endif - if(d["acqIndex"].GetUint64()!= (uint64_t)-1){ //!isocket && + int temp = d["data"].GetUint64(); + data = temp?true:false; + if(data){ //!isocket && acqIndex = d["acqIndex"].GetUint64(); frameIndex = d["fIndex"].GetUint64(); subframeIndex = -1; if(d["bitmode"].GetInt()==32 && d["detType"].GetUint()== EIGER) { subframeIndex = d["expLength"].GetUint(); } - filename = d["fname"].GetString(); + filename.assign(d["fname"].GetString()); #ifdef VERYVERBOSE cout << "Acquisition index: " << acqIndex << endl; cout << "Frame index: " << frameIndex << endl; cout << "Subframe index: " << subframeIndex << endl; cout << "File name: " << filename << endl; #endif - if(frameIndex == (long long unsigned int)-1) cprintf(RED,"multi frame index -1!!\n"); + // if(frameIndex == (long long unsigned int)-1) cprintf(RED,"multi frame index -1!!\n"); } // close the message zmq_msg_close(&header_message); + //end of acquisition + if(!data){ + //cprintf(RED,"%d Received end of acquisition \n", isocket); + return FAIL; + } + + //scan data------------------------------------------------------------------- zmq_msg_t data_message; zmq_msg_init (&data_message); len = zmq_msg_recv(&data_message, zmqsocket[isocket], 0); - //cprintf(GREEN,"%d data %d\n",isocket,len); + //cprintf(GREEN,"%d data %d\n",isocket,len); fflush(stdout); //end of socket ("end\0") - if(len == 4){ + /* if(len == 4){ zmq_msg_close(&data_message); // close the message //cprintf(RED,"%d Received end of acquisition len:%d\n", isocket, len); return FAIL; - } + }*/ //crappy image if (len < size ) { @@ -5345,7 +5362,7 @@ void multiSlsDetector::readFrameFromReceiver(){ //get individual images if(FAIL == getData(isocket, jungfrau, image, expectedslssize, currentAcquisitionIndex,currentFrameIndex,currentSubFrameIndex,currentFileName)){ - dataThreadMask^=(1< Date: Thu, 27 Apr 2017 14:05:04 +0200 Subject: [PATCH 39/48] crazy amount of changes, both necessary and unnecessary;need to narrow down the real change later --- slsReceiverSoftware/include/genericSocket.h | 57 +++- .../src/UDPBaseImplementation.cpp | 101 ++++--- .../src/UDPStandardImplementation.cpp | 268 ++++++++++-------- 3 files changed, 255 insertions(+), 171 deletions(-) diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index 2f151de43e..485e8903ad 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -100,7 +100,6 @@ enum communicationProtocol{ genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) : - // portno(port_number), protocol(p), is_a_server(0), socketDescriptor(-1), @@ -109,11 +108,15 @@ enum communicationProtocol{ nsending(0), nsent(0), total_sent(0),// sender (client): where to? ip - header_packet_size(0) + header_packet_size(0), + portno(port_number) { memset(&serverAddress, 0,sizeof(serverAddress)); memset(&clientAddress,0,sizeof(clientAddress)); // strcpy(hostname,host_ip_or_name); + memset(lastClientIP, 0, INET_ADDRSTRLEN); + memset(thisClientIP, 0, INET_ADDRSTRLEN); + memset(dummyClientIP, 0, INET_ADDRSTRLEN); strcpy(lastClientIP,"none"); strcpy(thisClientIP,"none1"); @@ -164,7 +167,6 @@ enum communicationProtocol{ */ genericSocket(unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE, const char *eth=NULL, int hsize=0): - //portno(port_number), protocol(p), is_a_server(1), socketDescriptor(-1), @@ -173,7 +175,8 @@ enum communicationProtocol{ nsending(0), nsent(0), total_sent(0), - header_packet_size(hsize) + header_packet_size(hsize), + portno(port_number) { memset(&serverAddress, 0, sizeof(serverAddress)); @@ -181,7 +184,9 @@ enum communicationProtocol{ /* // you can specify an IP address: */ /* // or you can let it automatically select one: */ /* myaddr.sin_addr.s_addr = INADDR_ANY; */ - + memset(lastClientIP, 0, INET_ADDRSTRLEN); + memset(thisClientIP, 0, INET_ADDRSTRLEN); + memset(dummyClientIP, 0, INET_ADDRSTRLEN); strcpy(lastClientIP,"none"); strcpy(thisClientIP,"none1"); @@ -610,6 +615,7 @@ enum communicationProtocol{ break; case UDP: + if (socketDescriptor<0) return -1; //if length given, listens to length, else listens for packetsize till length is reached if(length){ @@ -632,12 +638,30 @@ enum communicationProtocol{ else{ //normal nsending=packet_size; + /* if(portno%2){ + cprintf(BLUE,"%d total_sent set to zero:%d\n",portno, total_sent);fflush(stdout); + }else{ + cprintf(GREEN,"%d total_sent set to zero:%d\n",portno, total_sent);fflush(stdout); + }*/ while(1){ nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length); - if(nsent<=0 || nsent == packet_size) + /* if(portno%2){ + cprintf(BLUE,"%d nsent:%d total_sent:%d\n", portno, nsent, total_sent);fflush(stdout); + }else{ + cprintf(GREEN,"%d nsent:%d total_sent:%d\n", portno, nsent, total_sent);fflush(stdout); + }*/ + if((nsent<=0) || (nsent == packet_size)) { + + /* if(portno%2){ + cprintf(BLUE,"%d breaking out of loop %d\n",portno, nsent);fflush(stdout); + }else{ + cprintf(GREEN,"%d breaking out of loop %d\n",portno, nsent);fflush(stdout); + }*/ break; - if(nsent != packet_size && nsent != header_packet_size) - cprintf(RED,"Incomplete Packet size %d\n",nsent); + } + if(nsent != packet_size && nsent != header_packet_size){ + cprintf(RED,"%d Incomplete Packet size %d\n",portno, nsent);fflush(stdout); + } } //nsent = 1040; total_sent+=nsent; @@ -649,8 +673,13 @@ enum communicationProtocol{ #ifdef VERY_VERBOSE cout << "sent "<< total_sent << " Bytes" << endl; #endif - - + /*if(protocol == UDP){ + if(portno%2){ + cprintf(BLUE,"%d exiting total sent %d\n",portno, total_sent);fflush(stdout); + }else{ + cprintf(GREEN,"%d exiting total sent %d\n",portno, total_sent);fflush(stdout); + } + }*/ return total_sent; @@ -723,11 +752,11 @@ enum communicationProtocol{ private: - - int nsending; - int nsent; - int total_sent; + volatile int nsending; + volatile int nsent; + volatile int total_sent; int header_packet_size; + const int portno; // pthread_mutex_t mp; diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index 2235e480d6..c5c706ce1f 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -35,7 +35,7 @@ void UDPBaseImplementation::initializeMembers(){ //**detector parameters*** myDetectorType = GENERIC; - strcpy(detHostname,""); + memset(detHostname,0,MAX_STR_LENGTH); packetsPerFrame = 0; acquisitionPeriod = 0; acquisitionTime = 0; @@ -51,14 +51,15 @@ void UDPBaseImplementation::initializeMembers(){ activated = true; //***connection parameters*** - strcpy(eth,""); + memset(eth,0,MAX_STR_LENGTH); for(int i=0;iShutDownSocket(); char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Shut down UDP Sock %d ", i); + snprintf(cstreambuf, MAX_STR_LENGTH, "Shut down UDP Sock %d ", i); FILE_LOG(logINFO, cstreambuf); delete udpSocket[i]; @@ -1267,7 +1279,7 @@ void UDPStandardImplementation::closeFile(int ithread){ if(!dataCompressionEnable){ if(sfilefd[ithread]){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Going to close file: %d ", fileno(sfilefd[ithread])); + snprintf(cstreambuf, MAX_STR_LENGTH, "Going to close file: %d ", fileno(sfilefd[ithread])); FILE_LOG(logDEBUG4, cstreambuf); fflush(sfilefd[ithread]); @@ -1281,7 +1293,7 @@ void UDPStandardImplementation::closeFile(int ithread){ #if (defined(MYROOT1) && defined(ALLFILE_DEBUG)) || !defined(MYROOT1) if(sfilefd[0]){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "sfilefd: %d ", fileno(sfilefd[0])); + snprintf(cstreambuf, MAX_STR_LENGTH, "sfilefd: %d ", fileno(sfilefd[0])); FILE_LOG(logDEBUG4, cstreambuf); fclose(sfilefd[0]); @@ -1324,7 +1336,7 @@ int UDPStandardImplementation::setActivate(int enable){ if(enable != -1){ activated = enable; char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Activation: %s ", stringEnable(activated).c_str()); + snprintf(cstreambuf, MAX_STR_LENGTH, "Activation: %s ", stringEnable(activated).c_str()); FILE_LOG(logINFO, cstreambuf); } @@ -1382,7 +1394,7 @@ int UDPStandardImplementation::createDataCallbackThreads(bool destroy){ currentThreadIndex = i; if(pthread_create(&dataCallbackThreads[i], NULL,startDataCallbackThread, (void*) this)){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Could not create data call back thread with index %d ", i); + snprintf(cstreambuf, MAX_STR_LENGTH, "Could not create data call back thread with index %d ", i); FILE_LOG(logERROR, cstreambuf); return FAIL; } @@ -1448,7 +1460,7 @@ int UDPStandardImplementation::createListeningThreads(bool destroy){ currentThreadIndex = i; if(pthread_create(&listeningThreads[i], NULL,startListeningThread, (void*) this)){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Could not create listening thread with index %d ", i); + snprintf(cstreambuf, MAX_STR_LENGTH, "Could not create listening thread with index %d ", i); FILE_LOG(logERROR, cstreambuf); return FAIL; } @@ -1514,7 +1526,7 @@ int UDPStandardImplementation::createWriterThreads(bool destroy){ currentThreadIndex = i; if(pthread_create(&writingThreads[i], NULL,startWritingThread, (void*) this)){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Could not create writer thread with index %d ", i); + snprintf(cstreambuf, MAX_STR_LENGTH, "Could not create writer thread with index %d ", i); FILE_LOG(logERROR, cstreambuf); return FAIL; } @@ -1595,8 +1607,9 @@ int UDPStandardImplementation::createUDPSockets(){ //if eth is mistaken with ip address - if (strchr(eth,'.') != NULL) - strcpy(eth,""); + if (strchr(eth,'.') != NULL){ + memset(eth,0,MAX_STR_LENGTH); + } shutDownUDPSockets(); int headerpacketsize = 0; @@ -1614,7 +1627,7 @@ int UDPStandardImplementation::createUDPSockets(){ else{ { char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Ethernet Interface: %s", eth); + snprintf(cstreambuf, MAX_STR_LENGTH, "Ethernet Interface: %s", eth); FILE_LOG(logINFO, cstreambuf); } for(int i=0;iinitEventTree(temp, &iframe); //resets the pedestalSubtraction array and the commonModeSubtraction singlePhotonDetectorObject[ithread]->newDataSet(); @@ -1878,9 +1893,10 @@ void UDPStandardImplementation::startDataCallback(){ struct timespec begin,end; // server address to bind - char hostName[100] = "tcp://*:";//"tcp://127.0.0.1:"; + char hostName[100]; + memset(hostName,0,100); int portno = DEFAULT_ZMQ_PORTNO + (detID*numberofListeningThreads+ithread); - sprintf(hostName,"%s%d",hostName,portno); + snprintf(hostName,100,"tcp://*:%d",portno);//"tcp://127.0.0.1:"; //socket details void *context = zmq_ctx_new(); @@ -1893,7 +1909,7 @@ void UDPStandardImplementation::startDataCallback(){ // bind { char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Thread %d: ZMQ Server at %s ", ithread, hostName); + snprintf(cstreambuf, MAX_STR_LENGTH, "Thread %d: ZMQ Server at %s ", ithread, hostName); FILE_LOG(logINFO, cstreambuf); } @@ -1905,19 +1921,18 @@ void UDPStandardImplementation::startDataCallback(){ //infinite loop, exited only to change dynamic range, 10G parameters etc (then recreated again) while(true){ - int oneframesize = oneDataSize * packetsPerFrame; - char* buffer = new char[packetsPerFrame*oneDataSize](); - memset(buffer,0xFF,oneframesize); bool randomSendNow = true; //header details const char *jsonFmt ="{" - "\"jsonversion\":%u, " - "\"acqIndex\":%llu, " - "\"fIndex\":%llu, " - "\"bitmode\":%d, " - "\"shape\":[%d, %d], " - "\"fname\":\"%s\", " + "\"jsonversion\":%u, " + "\"acqIndex\":%llu, " + "\"fIndex\":%llu, " + "\"bitmode\":%d, " + "\"shapex\": %d, " + "\"shapey\": %d, " + "\"fname\":\"%s\", " + "\"data\": %d, " "\"frameNumber\":%llu, " "\"expLength\":%u, " @@ -1932,15 +1947,14 @@ void UDPStandardImplementation::startDataCallback(){ "\"roundRNumber\":%u, " "\"detType\":%u, " "\"version\":%u" - "}\n"; + + "}\n\0"; int npixelsx=0, npixelsy=0; switch(myDetectorType) { case JUNGFRAU: npixelsx = JFRAU_PIXELS_IN_ONE_ROW; npixelsy = JFRAU_PIXELS_IN_ONE_COL; break; case EIGER: npixelsx = EIGER_PIXELS_IN_ONE_ROW; npixelsy = EIGER_PIXELS_IN_ONE_COL; break; default:break; /* will not work for other detectors*/ } - uint64_t acquisitionIndex = -1; - uint64_t frameIndex = -1; #ifdef DEBUG int oldpnum = -1; #endif @@ -1963,19 +1977,22 @@ void UDPStandardImplementation::startDataCallback(){ cprintf(BLUE,"%d sending dummy\n"); #endif - frameIndex = -1; - acquisitionIndex = -1; { - char buf[1000]="";memset(buf,0,1000); - sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + char buf[MAX_STR_LENGTH]="";memset(buf,0xFF,1000); + int len = snprintf(buf,MAX_STR_LENGTH, jsonFmt, + SLS_DETECTOR_JSON_HEADER_VERSION,0,0,0,0,0, "", 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + //cprintf(BLUE,"%d:Dummy:%s.\n",ithread, buf);fflush(stdout); + zmq_send_const(zmqsocket, buf, len, 0);//ZMQ_SNDMORE); - zmq_send(zmqsocket, buf,1000, 0); } + cprintf(BLUE,"%d dummy\n",ithread); + /* { //send final data - zmq_send (zmqsocket, "end\n", 4, 0); - + char buf[MAX_STR_LENGTH]="";memset(buf,0xFF,0); + int len = snprintf(buf,MAX_STR_LENGTH,"%s","end\n"); + zmq_send_const(zmqsocket, buf,len, 0); + }*/ pthread_mutex_lock(&statusMutex); dataCallbackThreadsMask^=(1<frameNumber; - frameIndex = fnum - startFrameIndex; - acquisitionIndex = fnum - startAcquisitionIndex; + uint64_t frameIndex = fnum - startFrameIndex; + uint64_t acquisitionIndex = fnum - startAcquisitionIndex; + { - char buf[1000]="";memset(buf,0,1000); - sprintf(buf,jsonFmt, - SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread], - header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, - header->modId, header->xCoord, header->yCoord, header->zCoord, header->debug, header->roundRNumber, header->detType, header->version); + char buf[MAX_STR_LENGTH]="";memset(buf,0xFF,1000); + int len = snprintf(buf,MAX_STR_LENGTH,jsonFmt, + SLS_DETECTOR_JSON_HEADER_VERSION, acquisitionIndex, frameIndex, dynamicRange, npixelsx, npixelsy,completeFileName[ithread],1, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - zmq_send(zmqsocket, buf,1000, 0); + + header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, + header->modId, header->xCoord, header->yCoord, header->zCoord, header->debug, header->roundRNumber, header->detType, header->version + ); + //cprintf(BLUE,"%d:%s.\n",ithread, buf);fflush(stdout); + zmq_send_const(zmqsocket, buf,len, ZMQ_SNDMORE); } //send data - zmq_send(zmqsocket, (latestData[ithread]+sizeof(sls_detector_header)), bufferSize, 0); + zmq_send_const(zmqsocket,(latestData[ithread]+sizeof(sls_detector_header)), bufferSize, 0); //start clock after sending if(!frameToGuiFrequency){ randomSendNow = false; @@ -2039,8 +2061,6 @@ void UDPStandardImplementation::startDataCallback(){ }/*--end of loop for each buffer (inner loop)*/ - //free resources - delete[] buffer; //end of acquisition, wait for next acquisition/change of parameters sem_wait(&dataCallbackSemaphore[ithread]); @@ -2088,6 +2108,7 @@ void UDPStandardImplementation::startListening(){ carryonBufferSize = 0; if(tempBuffer){delete []tempBuffer;tempBuffer=0;} tempBuffer = new char[onePacketSize * (packetsPerFrame - 1)](); //store maximum of 1 packets less in a frame + memset(tempBuffer,0,onePacketSize * (packetsPerFrame - 1)); } /* inner loop - loop for each buffer */ @@ -2102,7 +2123,7 @@ void UDPStandardImplementation::startListening(){ if(activated && !udpSocket[ithread]){ { char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Listening_Thread %d: UDP Socket not created or shut down earlier ", ithread); + snprintf(cstreambuf, MAX_STR_LENGTH, "Listening_Thread %d: UDP Socket not created or shut down earlier ", ithread); FILE_LOG(logERROR, cstreambuf); } stopListening(ithread,0); @@ -2249,6 +2270,11 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) //read first packet pnum = FIRSTPNUM; //first packet number to validate if(status != TRANSMITTING) rc = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset); + /*if(!ithread){ + cprintf(BLUE,"%d first rc:%d\n",ithread, rc);fflush(stdout); + }else{ + cprintf(GREEN,"%d first rc:%d\n",ithread, rc);fflush(stdout); + }*/ if(rc <= 0) return 0; if(getFrameandPacketNumber(ithread,buffer[ithread] + offset,fi,pi,si,bi) == FAIL){ pi = ALL_MASK_32; //got 0 from fpga @@ -2276,7 +2302,7 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) if(!ithread) cout << "correct packet" << endl; #endif //copy only data - memcpy(buffer[ithread] + offset,buffer[ithread] + offset + headerlength, oneDataSize); + memmove(buffer[ithread] + offset,buffer[ithread] + offset + headerlength, oneDataSize); offset+=oneDataSize; //if complete frame @@ -2364,13 +2390,21 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) header->detType = (uint8_t) myDetectorType; header->version = (uint8_t) SLS_DETECTOR_HEADER_VERSION; -#ifdef VERBOSE - if(!ithread) + //#ifdef VERBOSE + //if(!ithread) + + /*if(!ithread) { cprintf(BLUE, - "framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", - header->frameNumber, header->expLength, header->packetNumber, - header->bunchId, header->xCoord, header->detType, header->version); -#endif + "%d framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", + ithread, header->frameNumber, header->expLength, header->packetNumber, + header->bunchId, header->xCoord, header->detType, header->version);fflush(stdout); + }else{ + cprintf(GREEN, + "%d framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", + ithread, header->frameNumber, header->expLength, header->packetNumber, + header->bunchId, header->xCoord, header->detType, header->version);fflush(stdout); + }*/ + //#endif //write packet count to buffer *((uint32_t*)(buffer[ithread])) = packetsPerFrame; @@ -2433,7 +2467,7 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ //free empty buffer if(numbytes <= 0){ char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Listening %d: End of Acquisition", ithread); + snprintf(cstreambuf, MAX_STR_LENGTH, "Listening %d: End of Acquisition", ithread); FILE_LOG(logINFO, cstreambuf); while(!fifoFree[ithread]->push(buffer[ithread])); } @@ -2470,7 +2504,7 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){ //#ifdef DEBUG4 { char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH); - sprintf(cstreambuf, "Listening Thread of %u got %d packets ", udpPortNum[ithread], totalListeningPacketCount[ithread]); + snprintf(cstreambuf, MAX_STR_LENGTH, "Listening Thread of %u got %d packets ", udpPortNum[ithread], totalListeningPacketCount[ithread]); FILE_LOG(logINFO, cstreambuf); } //#endif @@ -2667,6 +2701,7 @@ void UDPStandardImplementation::waitWritingBufferForNextAcquisition(int ithread) //create file if((1<subFrameNumber); + snprintf(cstreambuf, MAX_STR_LENGTH, "Fifo %d: Frame Number is zero from firmware. subnum: %u, fnum:%u, pnum:%u ", ithread, subframenumber, + (uint32_t)(*( (uint64_t*) footer)),(*( (uint16_t*) footer->packetNumber))-1); FILE_LOG(logERROR, cstreambuf); - return FAIL; } packetnumber = (*( (uint16_t*) footer->packetNumber))-1; From 6a80bc5b54dc18450f31186e42a01444a5a1109c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 27 Jun 2017 13:00:38 +0200 Subject: [PATCH 40/48] new feature, set threshold without uploading trimbits --- .../commonFiles/communication_funcs.c | 10 +++ ....0.16.2 => eigerDetectorServerv2.3.4.16.0} | Bin 280601 -> 284169 bytes .../slsDetectorFunctionList.c | 64 +++++++++++------- .../multiSlsDetector/multiSlsDetector.cpp | 6 +- .../multiSlsDetector/multiSlsDetector.h | 3 +- .../slsDetector/slsDetector.cpp | 51 ++++++++------ slsDetectorSoftware/slsDetector/slsDetector.h | 9 ++- .../slsDetector/slsDetectorActions.h | 2 +- .../slsDetector/slsDetectorBase.h | 2 +- .../slsDetector/slsDetectorCommand.cpp | 28 +++++++- .../slsDetector/slsDetectorUtils.h | 2 +- .../slsDetectorAnalysis/energyConversion.cpp | 24 ++++--- .../slsDetectorAnalysis/energyConversion.h | 6 +- slsDetectorSoftware/threadFiles/Task.h | 6 +- 14 files changed, 141 insertions(+), 72 deletions(-) rename slsDetectorSoftware/eigerDetectorServer/bin/{eigerDetectorServerv2.3.0.16.2 => eigerDetectorServerv2.3.4.16.0} (56%) diff --git a/slsDetectorSoftware/commonFiles/communication_funcs.c b/slsDetectorSoftware/commonFiles/communication_funcs.c index 54ee6bb141..4dc18ae5c9 100755 --- a/slsDetectorSoftware/commonFiles/communication_funcs.c +++ b/slsDetectorSoftware/commonFiles/communication_funcs.c @@ -561,6 +561,15 @@ int receiveModuleGeneral(int file_des, sls_detector_module* myMod, int receiveA myMod->chipregs=chipptr; myMod->chanregs=chanptr; +#ifdef EIGERD + //feature to exclude sending of trimbtis, nchips=0,nchans=0 in that case + if(myMod->nchip == 0 && myMod->nchan == 0) { + receiveAll=0; + nchipold=0; + nchanold=0; + } +#endif + nChips=myMod->nchip; nchipdiff=nChips-nchipold; if (nchipold!=nChips) { @@ -571,6 +580,7 @@ int receiveModuleGeneral(int file_des, sls_detector_module* myMod, int receiveA printf("received %d chips\n",nChips); #endif + nChans=myMod->nchan; nchandiff=nChans-nchanold; if (nchanold!=nChans) { diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.3.0.16.2 b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.3.4.16.0 similarity index 56% rename from slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.3.0.16.2 rename to slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.3.4.16.0 index 59f65ff9a078a59b3b027332a07f97c3759577fe..43cf5bbacd0e4f1b08126feb57b1a7311083febf 100755 GIT binary patch delta 52994 zcmeFae_T~n)<1ss0TFJ9S3^WZxRN0%>cwAyf}*J%f1{yk{<<0}7%D237RDv9u(Z&F z9xQ)Qqh*a1aV>Pl3LBfzQp2JdoX3hLn@1;`!5MlUn?djAz4qSc{z7}^`+YsH@Ar@I z*VpTK_FjAMwbx#I?X}ikd!Nhh@=jY0cPdX%f2!EtYw^fm*cBCzqO?;O{#Wq7TCG@v z#G@!`ouc;70ld8|S5cmfa{g>TIn1*EfK?TbE110*q-u5gk>DrP+E9H+yJFU;A8GfT zS{v>f8}fcoagC-ZVUg60HK;aJQSQ1^ro$Cwh)f@u2O_!%_!0E1n(2H+2{O}#iV|$5 zi$J`YE>)BeGrbi=o9PNg3GJd3^Nx?~0TE`w0Y$mPOdnR1a5H^GQ979EBl}!!XkgiqgqUUsRONX8Mw%+-at-qW?%U)1oL{%yg@wM9K6!!HUw=OouB`hcPgFw=(> zWuTcpq9}GVeOyse%=Ae`8DyrRBD) z601W;d{rGjs>vE${AF`i$*9`M;;*6#MttRV7jJ3K%-o|Sk8syU>J=UOs%TNyVQNUV zHT9uts~#Egm|Bygmq)~@ue_vJM?{5aC(&CM{Y*q+-&cN2#fqwqSE5rLilPO*@?(*s z`}*>DCAKPFNy=7&M-~MIt;ZO?(_=fv#Jn<{ifI_=Fg9JWs&)rqdu6+x)iJ8?!PTDP zeaw#H;G#Q%);sU0spC!dDOm)wE62k1@{Y4qybgEnqj%^MM#)%f%&?le6q~|$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x&q7dHP(u)0Tt2#jzphIvmHg0GBeZCpoeL{B?|R zD|mY;=nagY!QYhFQ4NMJ?sy(ApToo8#9^Zg@27x)6xm&P#Hv%7E`s3K$&l$^D zvD`3;O*5f5??Sl;%;#-3wy%P7kCHS8N^dd?z%9$QfrtsulDwlE(Ocxu^KhO@SpoV? z#+Q&hJRP`_@fAyPOAHOQFUPA;wYSkkpz^qPwJIT9^fA{eC7olE-F3H3DeycHyGq4~Lr>F+t z6%JoP5Wn?+acb1jw*VIji@RawX{KL>&7lVT(;1`4?lf^=y$kR(GR{gj+~-6k~`rLB!GSWSCmB(f4}$q>weKJ z5>3!kZDIN%l4oi`A7Z?kwjc4vkLubcKOvc5(3Cu2sf8s?XDu;D*2x6-tHjcYj;9zhF z@!*9u5vQ)h8+AX#B~C`7xcB4}vEL4s>$qYhT-#QN<#x@8-6Dt*WR+WHvCwzXGO_B0mkbY-v9sr diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index 1302037fe6..5d3a13cd40 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -627,25 +627,30 @@ int setModule(sls_detector_module myMod, int delay){ for(i=0;iserialnumber=srcMod->serialnumber; } - if ((srcMod->nchip)>(destMod->nchip)) { + //no trimbit feature + if (destMod->nchip && ((srcMod->nchip)>(destMod->nchip))) { printf("Number of chip of source is larger than number of chips of destination\n"); return FAIL; } - if ((srcMod->nchan)>(destMod->nchan)) { + //no trimbit feature + if (destMod->nchan && ((srcMod->nchan)>(destMod->nchan))) { printf("Number of channels of source is larger than number of channels of destination\n"); return FAIL; } @@ -1164,14 +1171,21 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod){ if (srcMod->offset>=0) destMod->offset=srcMod->offset; - for (ichip=0; ichip<(srcMod->nchip); ichip++) { - if (*((srcMod->chipregs)+ichip)>=0) - *((destMod->chipregs)+ichip)=*((srcMod->chipregs)+ichip); - } - for (ichan=0; ichan<(srcMod->nchan); ichan++) { - if (*((srcMod->chanregs)+ichan)>=0) - *((destMod->chanregs)+ichan)=*((srcMod->chanregs)+ichan); + if((destMod->nchip!=0) || (destMod->nchan!=0)) { + for (ichip=0; ichip<(srcMod->nchip); ichip++) { + if (*((srcMod->chipregs)+ichip)>=0) + *((destMod->chipregs)+ichip)=*((srcMod->chipregs)+ichip); + } + for (ichan=0; ichan<(srcMod->nchan); ichan++) { + if (*((srcMod->chanregs)+ichan)>=0) + *((destMod->chanregs)+ichan)=*((srcMod->chanregs)+ichan); + } } +#ifdef VERBOSE + printf("Not Copying trimbits\n"); +#endif + + for (idac=0; idac<(srcMod->ndac); idac++) { if (*((srcMod->dacs)+idac)>=0) *((destMod->dacs)+idac)=*((srcMod->dacs)+idac); diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 3ac129dddd..b018e88334 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -1139,7 +1139,7 @@ int multiSlsDetector::getThresholdEnergy(int pos) { } -int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings isettings) { +int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings isettings, int tb) { int posmin, posmax; int ret=-100; @@ -1160,8 +1160,8 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise for(int idet=posmin; idet(&slsDetector::setThresholdEnergy, - detectors[idet],e_eV,-1,isettings,iret[idet])); + Task* task = new Task(new func4_t(&slsDetector::setThresholdEnergy, + detectors[idet],e_eV,-1,isettings,tb, iret[idet])); threadpool->add_task(task); } } diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h index 0fe1a164be..3eca95a8c3 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h @@ -453,9 +453,10 @@ class multiSlsDetector : public slsDetectorUtils { \param e_eV threshold in eV \param imod module number (-1 all) \param isettings ev. change settings + \param tb 1 to include trimbits, 0 to exclude \returns current threshold value for imod in ev (-1 failed) */ - int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS); + int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS, int tb=1); /** get detector settings diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 20e6976d50..6aa864fae2 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2886,7 +2886,7 @@ int slsDetector::setModule(int reg, int imod){ }; -int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval, int* offsetval){ +int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval, int* offsetval, int tb){ int fnum=F_SET_MODULE; int retval; @@ -2903,6 +2903,11 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int if (thisDetector->onlineFlag==ONLINE_FLAG) { if (connectControl() == OK){ controlSocket->SendDataOnly(&fnum,sizeof(fnum)); + //to exclude trimbits + if(!tb) { + module.nchan=0; + module.nchip=0; + } sendModule(&module); //not included in module @@ -2936,23 +2941,29 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int if (ret!=FAIL) { if (detectorModules) { if (imod>=0 && imodnMod[X]*thisDetector->nMod[Y]) { - (detectorModules+imod)->nchan=module.nchan; - (detectorModules+imod)->nchip=module.nchip; + if(tb) { + (detectorModules+imod)->nchan=module.nchan; + (detectorModules+imod)->nchip=module.nchip; + } (detectorModules+imod)->ndac=module.ndac; (detectorModules+imod)->nadc=module.nadc; - thisDetector->nChips=module.nchip; - thisDetector->nChans=module.nchan/module.nchip; + if(tb) { + thisDetector->nChips=module.nchip; + thisDetector->nChans=module.nchan/module.nchip; + } thisDetector->nDacs=module.ndac; thisDetector->nAdcs=module.nadc; if(thisDetector->myDetectorType != JUNGFRAU){ - for (int ichip=0; ichipnChips; ichip++) { - if (chipregs) - chipregs[ichip+thisDetector->nChips*imod]=module.chipregs[ichip]; - - if (chanregs) { - for (int i=0; inChans; i++) { - chanregs[i+ichip*thisDetector->nChans+thisDetector->nChips*thisDetector->nChans*imod]=module.chanregs[ichip*thisDetector->nChans+i]; + if(tb) { + for (int ichip=0; ichipnChips; ichip++) { + if (chipregs) + chipregs[ichip+thisDetector->nChips*imod]=module.chipregs[ichip]; + + if (chanregs) { + for (int i=0; inChans; i++) { + chanregs[i+ichip*thisDetector->nChans+thisDetector->nChips*thisDetector->nChans*imod]=module.chanregs[ichip*thisDetector->nChans+i]; + } } } } @@ -3182,11 +3193,11 @@ int slsDetector::getThresholdEnergy(int imod){ return thisDetector->currentThresholdEV; }; -int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isettings){ +int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isettings, int tb){ //currently only for eiger if (thisDetector->myDetectorType == EIGER) { - setThresholdEnergyAndSettings(e_eV,isettings); + setThresholdEnergyAndSettings(e_eV,isettings,tb); return thisDetector->currentThresholdEV; } @@ -3226,7 +3237,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti -int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isettings) { +int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isettings, int tb) { //if settings provided, use that, else use the shared memory variable detectorSettings is = ((isettings != GET_SETTINGS) ? isettings: thisDetector->currentSettings); @@ -3292,7 +3303,7 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti #endif //read the files myMod=createModule(); - if (NULL == readSettingsFile(settingsfname,thisDetector->myDetectorType, iodelay, tau, myMod)) { + if (NULL == readSettingsFile(settingsfname,thisDetector->myDetectorType, iodelay, tau, myMod, tb)) { if(myMod)deleteModule(myMod); return FAIL; } @@ -3327,13 +3338,13 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti int tau1 = -1; //not included in the module int iodelay2 = -1; //not included in the module int tau2 = -1; //not included in the module - if (NULL == readSettingsFile(settingsfname1,thisDetector->myDetectorType, iodelay1, tau1, myMod1)) { + if (NULL == readSettingsFile(settingsfname1,thisDetector->myDetectorType, iodelay1, tau1, myMod1, tb)) { setErrorMask((getErrorMask())|(SETTINGS_FILE_NOT_OPEN)); deleteModule(myMod1); deleteModule(myMod2); return FAIL; } - if (NULL == readSettingsFile(settingsfname2,thisDetector->myDetectorType, iodelay2, tau2, myMod2)) { + if (NULL == readSettingsFile(settingsfname2,thisDetector->myDetectorType, iodelay2, tau2, myMod2, tb)) { setErrorMask((getErrorMask())|(SETTINGS_FILE_NOT_OPEN)); deleteModule(myMod1); deleteModule(myMod2); @@ -3349,7 +3360,7 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti iodelay = iodelay1; //interpolate module - myMod = interpolateTrim(thisDetector->myDetectorType, myMod1, myMod2, e_eV, trim1, trim2); + myMod = interpolateTrim(thisDetector->myDetectorType, myMod1, myMod2, e_eV, trim1, trim2, tb); if (myMod == NULL) { printf("Could not interpolate, different dac values in files\n"); setErrorMask((getErrorMask())|(SETTINGS_NOT_SET)); @@ -3365,7 +3376,7 @@ int slsDetector::setThresholdEnergyAndSettings(int e_eV, detectorSettings isetti myMod->module=0; myMod->reg=thisDetector->currentSettings; - setModule(*myMod, iodelay, tau, e_eV, 0, 0); + setModule(*myMod, iodelay, tau, e_eV, 0, 0, tb); deleteModule(myMod); if (getSettings(-1) != is){ printf( "Could not set settings in detector \n" ); diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index fa3cc8e258..90daa44930 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -953,10 +953,11 @@ class slsDetector : public slsDetectorUtils, public energyConversion { \param e_eV threashold in eV (detector specific) \param gainval pointer to extra gain values \param offsetval pointer to extra offset values + \param tb 1 to include trimbits, 0 to exclude (used for eiger) \returns current register value \sa ::sls_detector_module */ - int setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval=0, int* offsetval=0); + int setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval=0, int* offsetval=0, int tb=1); //virtual int setModule(sls_detector_module module); /** @@ -987,17 +988,19 @@ class slsDetector : public slsDetectorUtils, public energyConversion { \param e_eV threshold in eV \param imod module number (-1 all) \param isettings ev. change settings + \param tb 1 to include trimbits, 0 to exclude \returns current threshold value for imod in ev (-1 failed) */ - int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS); + int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS, int tb=1); /** set threshold energy \param e_eV threshold in eV \param isettings ev. change settings + \param tb 1 to include trimbits, 0 to exclude \returns OK if successful, else FAIL */ - int setThresholdEnergyAndSettings(int e_eV, detectorSettings isettings); + int setThresholdEnergyAndSettings(int e_eV, detectorSettings isettings, int tb=1); /** get detector settings diff --git a/slsDetectorSoftware/slsDetector/slsDetectorActions.h b/slsDetectorSoftware/slsDetector/slsDetectorActions.h index a920854b8c..a0db618784 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorActions.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorActions.h @@ -210,7 +210,7 @@ class slsDetectorActions : public virtual slsDetectorBase /* *\/ */ /* virtual detectorType getDetectorsType(int pos=-1)=0; */ - virtual int setThresholdEnergy(int, int im=-1, detectorSettings isettings=GET_SETTINGS)=0; + virtual int setThresholdEnergy(int, int im=-1, detectorSettings isettings=GET_SETTINGS, int tb=1)=0; virtual int setChannel(int64_t, int ich=-1, int ichip=-1, int imod=-1)=0; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorBase.h b/slsDetectorSoftware/slsDetector/slsDetectorBase.h index 119c0554dc..0cbc4c14d4 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorBase.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorBase.h @@ -429,7 +429,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef virtual externalCommunicationMode setExternalCommunicationMode(externalCommunicationMode pol=GET_EXTERNAL_COMMUNICATION_MODE)=0; int setTimingMode(int i=-1){return slsDetectorUsers::getTimingMode( externalCommunicationType( setExternalCommunicationMode(externalCommunicationType( slsDetectorUsers::getTimingMode(i) ) ) ) );}; - virtual int setThresholdEnergy(int e_eV, int imod, detectorSettings isettings=GET_SETTINGS)=0; + virtual int setThresholdEnergy(int e_eV, int imod, detectorSettings isettings=GET_SETTINGS, int tb=1)=0; int setThresholdEnergy(int e_eV){return setThresholdEnergy(e_eV,-1);}; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index c510395348..bc67deecaf 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -552,6 +552,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; i++; + descrToFuncMap[i].m_pFuncName="thresholdnotb"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; + i++; + descrToFuncMap[i].m_pFuncName="trimbits"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; i++; @@ -3289,10 +3293,10 @@ string slsDetectorCommand::cmdSettings(int narg, char *args[], int action) { return myDet->getDetectorSettings(myDet->getSettings()); } else if (cmd=="threshold") { if (action==PUT_ACTION) { - detectorType type = myDet->getDetectorsType(); if (!sscanf(args[1],"%d",&val)) { return string("invalid threshold value"); } + detectorType type = myDet->getDetectorsType(); if (type != EIGER || (type == EIGER && narg<=2)) { myDet->setThresholdEnergy(val); } else { @@ -3304,6 +3308,25 @@ string slsDetectorCommand::cmdSettings(int narg, char *args[], int action) { } sprintf(ans,"%d",myDet->getThresholdEnergy()); return string(ans); + } else if (cmd=="thresholdnotb") { + if (action==PUT_ACTION) { + if (!sscanf(args[1],"%d",&val)) { + return string("invalid threshold value"); + } + detectorType type = myDet->getDetectorsType(); + if (type != EIGER) + return string("not implemented for this detector"); + if (narg<=2) { + myDet->setThresholdEnergy(val, -1, GET_SETTINGS, 0); + } else { + detectorSettings sett= myDet->getDetectorSettings(string(args[2])); + if(sett == -1) + return string("invalid settings value"); + myDet->setThresholdEnergy(val, -1, sett, 0); + } + } + sprintf(ans,"%d",myDet->getThresholdEnergy()); + return string(ans); } else if (cmd=="trimbits") { if (narg>=2) { string sval=string(args[1]); @@ -3386,7 +3409,8 @@ string slsDetectorCommand::helpSettings(int narg, char *args[], int action) { if (action==PUT_ACTION || action==HELP_ACTION) { os << "settings s \n sets the settings of the detector - can be standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain" "lownoise, dynamichg0,fixgain1,fixgain2,forceswitchg1, forceswitchg2"<< std::endl; - os << "threshold eV\n sets the detector threshold in eV"<< std::endl; + os << "threshold eV [sett]\n sets the detector threshold in eV. If sett is provided for eiger, uses settings sett"<< std::endl; + os << "thresholdnotb eV [sett]\n sets the detector threshold in eV without loading trimbits. If sett is provided for eiger, uses settings sett"<< std::endl; os << "trimbits fname\n loads the trimfile fname to the detector. If no extension is specified, the serial number of each module will be attached."<< std::endl; os << "trim:mode fname\n trims the detector according to mode (can be noise, beam, improve, fix) and saves the resulting trimbits to file fname."<< std::endl; os << "trimval i \n sets all the trimbits to i" << std::endl; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h index cc354b737c..81da358eee 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h @@ -421,7 +421,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing { // double* convertAngles(){return convertAngles(currentPosition);}; // virtual double* convertAngles(double pos)=0; - virtual int setThresholdEnergy(int, int im=-1, detectorSettings isettings=GET_SETTINGS)=0; + virtual int setThresholdEnergy(int, int im=-1, detectorSettings isettings=GET_SETTINGS, int tb=1)=0; virtual int setChannel(int64_t, int ich=-1, int ichip=-1, int imod=-1)=0; virtual double getRateCorrectionTau()=0; diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp index 2b1a384028..40a673f88f 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp @@ -138,7 +138,7 @@ int energyConversion::writeCalibrationFile(string fname, int *gain, int *offset) -slsDetectorDefs::sls_detector_module* energyConversion::interpolateTrim(detectorType myDetectorType, sls_detector_module* a, sls_detector_module* b, const int energy, const int e1, const int e2){ +slsDetectorDefs::sls_detector_module* energyConversion::interpolateTrim(detectorType myDetectorType, sls_detector_module* a, sls_detector_module* b, const int energy, const int e1, const int e2, int tb){ // only implemented for eiger currently (in terms of which dacs) if(myDetectorType != EIGER) { printf("Interpolation of Trim values not implemented for this detector!\n"); @@ -168,8 +168,10 @@ slsDetectorDefs::sls_detector_module* energyConversion::interpolateTrim(detector } //Interpolate all trimbits - for (int i = 0; inchan; i++) - myMod->chanregs[i] = linearInterpolation(energy, e1, e2, a->chanregs[i], b->chanregs[i]); + if(tb) { + for (int i = 0; inchan; i++) + myMod->chanregs[i] = linearInterpolation(energy, e1, e2, a->chanregs[i], b->chanregs[i]); + } return myMod; } @@ -180,7 +182,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::interpolateTrim(detector /* I/O */ -slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string fname, detectorType myDetectorType, int& iodelay, int& tau, sls_detector_module* myMod){ +slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string fname, detectorType myDetectorType, int& iodelay, int& tau, sls_detector_module* myMod, int tb){ @@ -372,19 +374,21 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string infile.read((char*) myMod->dacs,sizeof(dacs_t)*(myMod->ndac)); infile.read((char*)&iodelay,sizeof(iodelay)); infile.read((char*)&tau,sizeof(tau)); - infile.read((char*) myMod->chanregs,sizeof(int)*(myMod->nchan)); #ifdef VERBOSE for(int i=0;indac;i++) printf( "dac %d:%d \n", i, myMod->dacs[i] ); printf( "iodelay:%d \n", iodelay ); printf( "tau:%d \n", tau ); #endif - if(infile.eof()){ - printf( "Error, could not load trimbits end of file reached: %s \n\n", myfname.c_str() ); - if (nflag) - deleteModule(myMod); + if(tb) { + infile.read((char*) myMod->chanregs,sizeof(int)*(myMod->nchan)); + if(infile.eof()){ + printf( "Error, could not load trimbits end of file reached: %s \n\n", myfname.c_str() ); + if (nflag) + deleteModule(myMod); - return NULL; + return NULL; + } } infile.close(); strcpy(settingsFile,fname.c_str()); diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h index 8aec3cb472..608246e6e0 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h @@ -88,9 +88,10 @@ class energyConversion \param energy energy to trim at \param e1 reference trim value \param e2 reference trim value + \param tb 1 to include trimbits, 0 to exclude (used for eiger) \returns the pointer to the module structure with interpolated values or NULL if error */ - sls_detector_module* interpolateTrim(detectorType myDetectorType, sls_detector_module* a, sls_detector_module* b, const int energy, const int e1, const int e2); + sls_detector_module* interpolateTrim(detectorType myDetectorType, sls_detector_module* a, sls_detector_module* b, const int energy, const int e1, const int e2, int tb=1); @@ -103,10 +104,11 @@ class energyConversion \param iodelay io delay (detector specific) \param tau tau (detector specific) \param myMod pointer to the module structure which has to be set.
If it is NULL a new module structure will be created + \param tb 1 to include trimbits, 0 to exclude (used for eiger) \returns the pointer to myMod or NULL if reading the file failed */ - sls_detector_module* readSettingsFile(string fname, detectorType myDetectorType, int& iodelay, int& tau, sls_detector_module* myMod=NULL); + sls_detector_module* readSettingsFile(string fname, detectorType myDetectorType, int& iodelay, int& tau, sls_detector_module* myMod=NULL, int tb=1); /** writes a trim/settings file diff --git a/slsDetectorSoftware/threadFiles/Task.h b/slsDetectorSoftware/threadFiles/Task.h index e90deb9c2f..5ce30d9a51 100644 --- a/slsDetectorSoftware/threadFiles/Task.h +++ b/slsDetectorSoftware/threadFiles/Task.h @@ -129,8 +129,8 @@ class Task: public virtual slsDetectorDefs{ Task(func2_t * t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(t),m12(0),m13(0){}; /* Return: void, Param: none */ Task(func00_t * t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(t),m13(0){}; - /* Return: int, Param: int,int,detectorSettings */ - Task(func3_t * t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(t){}; + /* Return: int, Param: int,int,detectorSettings,int */ + Task(func4_t * t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(t){}; @@ -178,7 +178,7 @@ class Task: public virtual slsDetectorDefs{ /* Return: void, Param: none */ func00_t * m12; /* Return: int, Param: int,int,detectorSettings */ - func3_t * m13; + func4_t * m13; }; From 64183d8d6a2f37ec8ecca4ad386a8e5ce41f3652 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 11:27:06 +0100 Subject: [PATCH 41/48] gotthard server bug fix: updated a register for token timing for revision 2 boards --- .../gotthardDetectorServer/gitInfo.txt | 12 ++++++------ .../gotthardDetectorServer/gitInfoGotthard.h | 10 +++++----- ...3.1.4.0 => gotthardDetectorServerv3.1.5.0} | Bin 128260 -> 128260 bytes .../gotthardDetectorServer/server_defs.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) rename slsDetectorSoftware/gotthardDetectorServer/{gotthardDetectorServerv3.1.4.0 => gotthardDetectorServerv3.1.5.0} (99%) diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt index cce3edd897..99aaa17977 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960 -Revision: 225 -Branch: 3.1.4-rc -Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3483 -Last Changed Date: 2018-07-25 14:56:37.000000002 +0200 ./firmware_funcs.c +Repsitory UUID: 287efde54ae1e0ac2613728af3dd638e86a46d6b +Revision: 226 +Branch: 3.1.5-rc +Last Changed Author: GitHub_GitHub +Last Changed Rev: 3494 +Last Changed Date: 2018-11-30 11:16:03.000000002 +0100 ./server_defs.h diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h index 336fd0b23d..861e245e4e 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "d69d69e8928f90b053a0e5ffccb9cfc4e9c5f960" -#define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3483 -#define GITDATE 0x20180725 -#define GITBRANCH "3.1.4-rc" +#define GITREPUUID "287efde54ae1e0ac2613728af3dd638e86a46d6b" +#define GITAUTH "GitHub_GitHub" +#define GITREV 0x3494 +#define GITDATE 0x20181130 +#define GITBRANCH "3.1.5-rc" diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.4.0 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.5.0 similarity index 99% rename from slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.4.0 rename to slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.1.5.0 index 36cb06c83200f475093232c6180f0ac3e8f6aaa0..2497fdb09bfee0a27bfada78ae799f53125b42eb 100755 GIT binary patch delta 41 xcmZp9#oqFYeS!u{3?m=gbjDeX5*uC0xETdD@8;GtV=@qIe&)FSnIogzW&jmN4PO8N delta 41 xcmZp9#oqFYeS!u{bYxe>bjDeX5*uC0xEc93@8;GtV^U>re&)FSnIogzW&k=-4vqi- diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h index 6dc6bf59d2..29a3db6298 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h +++ b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h @@ -42,7 +42,7 @@ #define TOKEN_RESTART_DELAY 0x88000000 #define TOKEN_RESTART_DELAY_ROI 0x1b000000 #define TOKEN_TIMING_REV1 0x1f16 -#define TOKEN_TIMING_REV2 0x1f0f +#define TOKEN_TIMING_REV2 0x1f10 #define DEFAULT_PHASE_SHIFT 120 #define DEFAULT_IP_PACKETSIZE 0x0522 From 6d04c14bd6a382b125c44eef7e7b8ce7e1c7458e Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 11:35:31 +0100 Subject: [PATCH 42/48] users: added stopped to getrunstatus list --- slsDetectorSoftware/slsDetector/slsDetectorBase.h | 1 + 1 file changed, 1 insertion(+) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorBase.h b/slsDetectorSoftware/slsDetector/slsDetectorBase.h index b9b604c4e1..0965101ea0 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorBase.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorBase.h @@ -817,6 +817,7 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0; case RUNNING: return string("running");\ case TRANSMITTING: return string("data"); \ case RUN_FINISHED: return string("finished"); \ + case STOPPED: return string("stopped");\ default: return string("idle"); \ }}; From 512e1a3136aa0187709a31496c33a801ce668f4a Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 14:39:01 +0100 Subject: [PATCH 43/48] users bug fix:getting id(version) for single/multi detector, added resetframescaught in users --- .../multiSlsDetector/multiSlsDetector.cpp | 11 +++++++++- .../slsDetector/slsDetectorBase.h | 8 +++---- .../slsDetector/slsDetectorUsers.cpp | 20 ++++++++++------- .../slsDetector/slsDetectorUsers.h | 22 ++++++++++++++----- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 42518e7180..677ca5a97a 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -4501,7 +4501,16 @@ int64_t multiSlsDetector::getId(idMode mode, int imod) { } } - return -1; + ret = -100; int64_t ret1; + for (int idet=0; idetnumberOfDetectors; ++idet) + if (detectors[idet]){ + ret1=detectors[idet]->getId(mode, imod); + if(ret==-100) + ret=ret1; + else if (ret!=ret1) + ret=-1; + } + return ret; } diff --git a/slsDetectorSoftware/slsDetector/slsDetectorBase.h b/slsDetectorSoftware/slsDetector/slsDetectorBase.h index 0965101ea0..db62c22bb2 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorBase.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorBase.h @@ -345,11 +345,11 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef \returns id */ virtual int64_t getId(idMode mode, int imod=0)=0; - int64_t getModuleFirmwareVersion(){return getId(MODULE_FIRMWARE_VERSION,-1);}; + int64_t getModuleFirmwareVersion(int imod=-1){return getId(MODULE_FIRMWARE_VERSION,imod);}; int64_t getModuleSerialNumber(int imod=-1){return getId(MODULE_SERIAL_NUMBER,imod);}; - int64_t getDetectorFirmwareVersion(){return getId(DETECTOR_FIRMWARE_VERSION,-1);}; - int64_t getDetectorSerialNumber(){return getId(DETECTOR_SERIAL_NUMBER,-1);}; - int64_t getDetectorSoftwareVersion(){return getId(DETECTOR_SOFTWARE_VERSION,-1);}; + int64_t getDetectorFirmwareVersion(int imod=-1){return getId(DETECTOR_FIRMWARE_VERSION,imod);}; + int64_t getDetectorSerialNumber(int imod=-1){return getId(DETECTOR_SERIAL_NUMBER,imod);}; + int64_t getDetectorSoftwareVersion(int imod=-1){return getId(DETECTOR_SOFTWARE_VERSION,imod);}; int64_t getThisSoftwareVersion(){return getId(THIS_SOFTWARE_VERSION,-1);}; /** diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp index d4a5e41df3..a15a0c31d8 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp @@ -258,24 +258,24 @@ int slsDetectorUsers::setClientDataStreamingInPort(int i){ return myDetector->setClientDataStreamingInPort(i); } -int64_t slsDetectorUsers::getModuleFirmwareVersion(){ - return myDetector->getModuleFirmwareVersion(); +int64_t slsDetectorUsers::getModuleFirmwareVersion(int imod){ + return myDetector->getModuleFirmwareVersion(imod); } int64_t slsDetectorUsers::getModuleSerialNumber(int imod){ return myDetector->getModuleSerialNumber(imod); } -int64_t slsDetectorUsers::getDetectorFirmwareVersion(){ - return myDetector->getDetectorFirmwareVersion(); +int64_t slsDetectorUsers::getDetectorFirmwareVersion(int imod){ + return myDetector->getDetectorFirmwareVersion(imod); } -int64_t slsDetectorUsers::getDetectorSerialNumber(){ - return myDetector->getDetectorSerialNumber(); +int64_t slsDetectorUsers::getDetectorSerialNumber(int imod){ + return myDetector->getDetectorSerialNumber(imod); } -int64_t slsDetectorUsers::getDetectorSoftwareVersion(){ - return myDetector->getDetectorSoftwareVersion(); +int64_t slsDetectorUsers::getDetectorSoftwareVersion(int imod){ + return myDetector->getDetectorSoftwareVersion(imod); } int64_t slsDetectorUsers::getThisSoftwareVersion(){ @@ -389,3 +389,7 @@ int slsDetectorUsers::setReceiverSilentMode(int i) { int slsDetectorUsers::setHighVoltage(int i) { return myDetector->setHighVoltage(i); } + +int slsDetectorUsers::resetFramesCaughtInReceiver() { + return myDetector->resetFramesCaught(); +} diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h index 159a709243..83c3056b8e 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h @@ -483,12 +483,13 @@ class slsDetectorUsers /** get get Module Firmware Version + @param imod module number \returns id */ - int64_t getModuleFirmwareVersion(); + int64_t getModuleFirmwareVersion(int imod=-1); /** - get get Module Serial Number + get get Module Serial Number (mythen only) @param imod module number \returns id */ @@ -496,21 +497,24 @@ class slsDetectorUsers /** get get Detector Firmware Version + @param imod module number \returns id */ - int64_t getDetectorFirmwareVersion(); + int64_t getDetectorFirmwareVersion(int imod=-1); /** get get Detector Serial Number + @param imod module number \returns id */ - int64_t getDetectorSerialNumber(); + int64_t getDetectorSerialNumber(int imod=-1); /** get get Detector Software Version + @param imod module number \returns id */ - int64_t getDetectorSoftwareVersion(); + int64_t getDetectorSoftwareVersion(int imod=-1); /** get this Software Version @@ -659,6 +663,13 @@ class slsDetectorUsers */ int setHighVoltage(int i); + /** + * reset frames caught in receiver + * should be called before startReceiver() + * @returns OK or FAIL + */ +int resetFramesCaughtInReceiver(); + /************************************************************************ STATIC FUNCTIONS @@ -677,6 +688,7 @@ class slsDetectorUsers case 3: return string("finished"); \ case 4: return string("data"); \ case 5: return string("running"); \ + case 6: return string("stopped"); \ default: return string("unknown"); \ }}; From e094e41d89d91e341bc6cf272b4570145a82446b Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 15:24:43 +0100 Subject: [PATCH 44/48] updated releases.txt --- RELEASE.txt | 73 ++++++++++++++--------------------------------------- 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 0f20971509..86800d57dc 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,72 +1,37 @@ -SLS Detector Package 3.1.4 released on 2018-08-17 +SLS Detector Package 3.1.5 released on 2018-11-30 ================================================= INTRODUCTION -This document describes the differences between 3.1.4 into 3.1.3 releases. +This document describes the differences between 3.1.5 into 3.1.4 releases. Topics Concerning ================== - - get settings in users class - - HDF5 in Receiver - - gotthard timer accuracy + - gotthard adc channel shifted by one + - users class: get version, status, resetframescaught Resolved Issues =============== - - Client - ------ - 1. Users class setSettings(-1) gave undefined settings. Has been fixed. - - 2. Users class timers give more precise values now. - - 3. When deleting slsDetector object, Stop socket deletion includes a close on - default file descriptor zero (which it didn't open, just set for flag). - This is fixed with temporary solution, to connect stop socket at checkOnline - to set file descriptor to the right one. Later releases will use exception - to handle constructor error flags. - - - Detector Server - --------------- - 1. (Gotthard) Timers converted from time in nanoseconds to number of cycles - is made more precise now. Clock value changed from 32.1E+6 to 32.007729E+6. - + + Detector Server + --------------- + 1. (Gotthard) The adc channel is shifted by one due to an incorrect ADC pipeline + register. This is fixed now. + + + Client + ------ + 1. Users class get versions gave -1. Has been fixed for single and multi modules. + - Receiver - -------- - 1. Jungfrau Single Module Master files did not link to the HDF5 data file properly. - This is fixed now. - - 2. Relative linking is used in the HDF5, instead of absolute now. - - - New Features ============ - Client - ------ - 1. Timers can be set/retrieved individually. It has been introduced because - Gotthard 25um can have different delays for master and slave modules. - - Receiver - -------- - 1. HDF5 x dimension (#images). Max made unlimited. Chunked Dataset by default. - - When receiver gets an image more than #frames, the HDF5 dataset will - extend itself in the x dimension by another #frames. So, one can do - (in Jungfrau, Gotthard, NOT Eiger) - sls_detector_put resetframescaught 0 - sls_detector_put receiver start - sls_detector_put status start - sls_detector_put status start - ... - sls_detector_put receiver stop - - - + Client + ------ + 1. Users class: Added "stopped" to detector status list, resetframescaught in + receiver function. From 9197d2b209ac42f59c6f906bb6af9a2bc123f154 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 15:27:39 +0100 Subject: [PATCH 45/48] updated revisions --- slsDetectorGui/gitInfo.txt | 10 +++++----- slsDetectorGui/include/gitInfoGui.h | 8 ++++---- slsDetectorSoftware/gitInfo.txt | 10 +++++----- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- slsReceiverSoftware/gitInfo.txt | 10 +++++----- slsReceiverSoftware/include/gitInfoReceiver.h | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/slsDetectorGui/gitInfo.txt b/slsDetectorGui/gitInfo.txt index 96fd66c8d0..2b119b7ea5 100644 --- a/slsDetectorGui/gitInfo.txt +++ b/slsDetectorGui/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorGui URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 1b92b01a466aa1986b8198700274af75477a1e54 -Revision: 455 -Branch: 3.1.4 +Repsitory UUID: e094e41d89d91e341bc6cf272b4570145a82446b +Revision: 456 +Branch: 3.1.5 Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3492 -Last Changed Date: 2018-08-17 16:36:24.000000002 +0200 ./src/qTabSettings.cpp +Last Changed Rev: 3498 +Last Changed Date: 2018-11-30 11:03:38.000000002 +0100 ./src/qTabSettings.cpp diff --git a/slsDetectorGui/include/gitInfoGui.h b/slsDetectorGui/include/gitInfoGui.h index f64fea9c88..f569bd630c 100644 --- a/slsDetectorGui/include/gitInfoGui.h +++ b/slsDetectorGui/include/gitInfoGui.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "1b92b01a466aa1986b8198700274af75477a1e54" +#define GITREPUUID "e094e41d89d91e341bc6cf272b4570145a82446b" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3492 -#define GITDATE 0x20180817 -#define GITBRANCH "3.1.4" +#define GITREV 0x3498 +#define GITDATE 0x20181130 +#define GITBRANCH "3.1.5" diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index dea05a5cd7..e63eb75ead 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 1b92b01a466aa1986b8198700274af75477a1e54 -Revision: 1726 -Branch: 3.1.4 +Repsitory UUID: e094e41d89d91e341bc6cf272b4570145a82446b +Revision: 1730 +Branch: 3.1.5 Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3492 -Last Changed Date: 2018-08-17 17:57:11.000000002 +0200 ./threadFiles/ThreadPool.o +Last Changed Rev: 3498 +Last Changed Date: 2018-11-30 15:26:47.000000002 +0100 ./threadFiles/ThreadPool.o diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index f64fea9c88..f569bd630c 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "1b92b01a466aa1986b8198700274af75477a1e54" +#define GITREPUUID "e094e41d89d91e341bc6cf272b4570145a82446b" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3492 -#define GITDATE 0x20180817 -#define GITBRANCH "3.1.4" +#define GITREV 0x3498 +#define GITDATE 0x20181130 +#define GITBRANCH "3.1.5" diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index 6a44eedea2..b035af4a98 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 1b92b01a466aa1986b8198700274af75477a1e54 -Revision: 715 -Branch: 3.1.4 +Repsitory UUID: e094e41d89d91e341bc6cf272b4570145a82446b +Revision: 716 +Branch: 3.1.5 Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3492 -Last Changed Date: 2018-08-17 16:36:25.000000002 +0200 ./src/utilities.cpp +Last Changed Rev: 3498 +Last Changed Date: 2018-11-30 11:03:41.000000002 +0100 ./src/utilities.cpp diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index f64fea9c88..f569bd630c 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "1b92b01a466aa1986b8198700274af75477a1e54" +#define GITREPUUID "e094e41d89d91e341bc6cf272b4570145a82446b" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3492 -#define GITDATE 0x20180817 -#define GITBRANCH "3.1.4" +#define GITREV 0x3498 +#define GITDATE 0x20181130 +#define GITBRANCH "3.1.5" From 7b71076180994cbbd065c261c687542f0f0325aa Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 15:28:35 +0100 Subject: [PATCH 46/48] update --- RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index 86800d57dc..e581991bcc 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -10,7 +10,7 @@ This document describes the differences between 3.1.5 into 3.1.4 releases. Topics Concerning ================== - - gotthard adc channel shifted by one + - Gotthard adc channel shifted by one - users class: get version, status, resetframescaught From d4b467a64182cceaa7eb23d38c77f8fc130d0fdd Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 15:31:22 +0100 Subject: [PATCH 47/48] update --- RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index e581991bcc..407d9ed507 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -25,7 +25,7 @@ Resolved Issues Client ------ - 1. Users class get versions gave -1. Has been fixed for single and multi modules. + 1. Users class: Get versions gave -1. Has been fixed for single and multi modules. New Features From 7300d73675de15d72adb9a11f5a26521e45ea6aa Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Nov 2018 15:34:15 +0100 Subject: [PATCH 48/48] udpate release --- RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index 407d9ed507..bb062b0801 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -5,7 +5,7 @@ SLS Detector Package 3.1.5 released on 2018-11-30 INTRODUCTION -This document describes the differences between 3.1.5 into 3.1.4 releases. +This document describes the differences between 3.1.5 and 3.1.4 releases. Topics Concerning