Changeset 11205
- Timestamp:
- 06/28/11 14:28:46 (13 years ago)
- Location:
- fact
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/BIASctrl/BIASctrl.cc
r10153 r11205 29 29 siginterrupt(SIGTERM, true); 30 30 31 system("clear"); 31 if (system("clear") == -1) printf("Error with system() call\n"); 32 32 33 printf("\n*** BIASctrl (compiled %s, %s) ***\n\n", __DATE__, __TIME__); 33 34 -
fact/BIASctrl/Crate.cc
r10905 r11205 134 134 FD_ZERO(&SelectDescriptor); FD_SET(fDescriptor, &SelectDescriptor); 135 135 if (select(fDescriptor+1, &SelectDescriptor, NULL, NULL, &WaitTime)==-1) { 136 if (errno = EINTR) goto ExitCommunicate; // in case program is exiting136 if (errno == EINTR) goto ExitCommunicate; // in case program is exiting 137 137 m->Message(m->FATAL, "Error with select() (%s)", strerror(errno)); 138 138 } -
fact/BIASctrl/History.txt
r10905 r11205 12 12 Added 'crate' command. Changed signaling of program exit. 13 13 3/6/2011 Fixed bug in channel addressing from board numbers above 7. 14 28/6/2011 Adapted for compilation under ubuntu -
fact/BIASctrl/Makefile
r10049 r11205 6 6 7 7 CPPFLAGS = -O3 -Wall $(INCDIRS) 8 LDLIBS = -L/usr/lib/termcap -lstdc++ -lpthread -l fl -lreadline -ltermcap $(DIMDIR)/linux/libdim.a8 LDLIBS = -L/usr/lib/termcap -lstdc++ -lpthread -lreadline -ltermcap $(DIMDIR)/linux/libdim.a 9 9 10 10 BIASctrl: $(OBJECTS) -
fact/BIASctrl/User.cc
r10153 r11205 114 114 // Shell command 115 115 if(Command[0]=='.') { 116 system(Command.c_str()+1); 116 if (system(Command.c_str()+1) == 1) { 117 PrintMessage("Error with system() call\n"); 118 } 117 119 return; 118 120 } … … 620 622 bool User::ConvertToRange(string String, struct User::Range &R) { 621 623 622 int N , M;624 int N=0, M=0; // Init to avoid compiler warning 623 625 624 626 // Full range -
fact/Evidence/DColl.cc
r253 r11205 260 260 struct tm *TM = localtime(&RawTime); 261 261 262 fprintf(DataFile, "%s %d %d %d %d %d %d %d %d % lu", I->getName(), I->getQuality(), TM->tm_year+1900, TM->tm_mon+1, TM->tm_mday, TM->tm_hour, TM->tm_min, TM->tm_sec, I->getTimestampMillisecs(), I->getTimestamp());262 fprintf(DataFile, "%s %d %d %d %d %d %d %d %d %d ", I->getName(), I->getQuality(), TM->tm_year+1900, TM->tm_mon+1, TM->tm_mday, TM->tm_hour, TM->tm_min, TM->tm_sec, I->getTimestampMillisecs(), I->getTimestamp()); 263 263 264 264 // Translate data into ASCII -
fact/FADctrl/FAD.cc
r11087 r11205 138 138 // Shell command 139 139 if (*Command == '.') { 140 system(Command+1);140 if (system(Command+1) == -1) PrintMessage("Error with system() call\n"); 141 141 return; 142 142 } … … 1216 1216 bool FAD::ConvertToRange(string String, struct FAD::Range &R) { 1217 1217 1218 int N , M;1218 int N=0, M=0; 1219 1219 1220 1220 // Full range -
fact/FADctrl/FAD.h
r10980 r11205 16 16 #include <dirent.h> 17 17 #include <sys/time.h> 18 #include <sys/stat.h> 18 19 #include <limits> 19 20 #include <fcntl.h> -
fact/FADctrl/FADBoard.cc
r11204 r11205 513 513 for (unsigned int i=0; i<NDAC; i++) Status.DAC[i] = ntohs(Header->dac[i]); 514 514 515 short Buf;516 515 for (unsigned int Chip=0; Chip<NChips; Chip++) { 517 516 // Extract trigger cells … … 522 521 Status.ROI[Chip][Chan] = ntohs(Channel[Chip+NChips*Chan]->roi); 523 522 524 // Extract ADC data (stored in 12 bit signed twis complement with out-of-range-bit and leading zeroes)525 for (int i=0; i<Status.ROI[Chip][Chan]; i++) {526 Buf = (Channel[Chip+NChips*Chan]->adc_data[i]);527 (Buf <<= 4) >>= 4; //delete the sign-bit by shifting left and shift back528 Data[Chip][Chan][i] = Buf;523 // Extract ADC data (stored as signed short) 524 // FADs ADC is 12 bit (values -2048 .. 2047) 525 // negative/positive overflow is -2049 / +2048 526 for (int i=0; i<Status.ROI[Chip][Chan]; i++) { 527 Data[Chip][Chan][i] = Channel[Chip+NChips*Chan]->adc_data[i]; 529 528 } 530 529 } -
fact/FADctrl/FADctrl.cc
r10813 r11205 28 28 read_history(READLINE_HIST_FILE.c_str()); 29 29 30 system("clear"); 30 if (system("clear") == -1) { 31 printf("Error with system() call\n"); 32 } 31 33 printf("\n*** FADctrl (built %s, %s, revision %s) *** \n\n",__DATE__, __TIME__, REVISION); 32 34 -
fact/Feedback/Feedback.cc
r10118 r11205 224 224 225 225 // Calculate average signal 226 for (unsigned int i=0; i<Parameter.size()-1 ,i<fIDTable.size(); i++) {226 for (unsigned int i=0; i<Parameter.size()-1 && i<fIDTable.size(); i++) { 227 227 Average[i] += atof(Parameter[i+1].c_str()); 228 228 Sigma[i] += pow(atof(Parameter[i+1].c_str()), 2); … … 465 465 char *Command; 466 466 467 system("clear");467 if (system("clear") == -1) printf("Error with system() call\n"); 468 468 printf("\n*** Bias feedback (built %s, %s, revision %s) *** \n\n",__DATE__, __TIME__, REVISION); 469 469 -
fact/Feedback/Makefile
r10118 r11205 12 12 13 13 CPPFLAGS = -DREVISION='"$(REVISION)"' -O3 -Wall 14 LIBS = -L /usr/lib/termcap -lstdc++ -lz -lpthread -lutil -l fl -lreadline -ltermcap $(DIMDIR)/linux/libdim.a14 LIBS = -L /usr/lib/termcap -lstdc++ -lz -lpthread -lutil -lreadline -ltermcap $(DIMDIR)/linux/libdim.a 15 15 16 16 Feedback: $(OBJECTS)
Note:
See TracChangeset
for help on using the changeset viewer.