Changeset 11205 for fact/FADctrl
- Timestamp:
- 06/28/11 14:28:46 (13 years ago)
- Location:
- fact/FADctrl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.