Changeset 12522
- Timestamp:
- 11/15/11 14:09:51 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r12497 r12522 418 418 DimStampedInfo fDimFadStatistics1; 419 419 DimStampedInfo fDimFadStatistics2; 420 DimStampedInfo fDimFadFileFormat; 420 421 421 422 DimStampedInfo fDimFscTemp; … … 1390 1391 fDrsCalibTrgOffset->setEnabled(fDrsCalibTrgOffset->value()>0); 1391 1392 fDrsCalibROI->setEnabled(fDrsCalibROI->value()>0); 1393 1394 fDrsCalibBaseline2->setEnabled(fDrsCalibBaseline->value()>0); 1395 fDrsCalibGain2->setEnabled(fDrsCalibGain->value()>0); 1396 fDrsCalibTrgOffset2->setEnabled(fDrsCalibTrgOffset->value()>0); 1397 fDrsCalibROI2->setEnabled(fDrsCalibROI->value()>0); 1398 1399 SetLedColor(fFadLedDrsBaseline, fDrsCalibBaseline->value()>0 ?kLedGreen:kLedGray, Time()); 1400 SetLedColor(fFadLedDrsGain, fDrsCalibGain->value()>0 ?kLedGreen:kLedGray, Time()); 1401 SetLedColor(fFadLedDrsTrgOff, fDrsCalibTrgOffset->value()>0?kLedGreen:kLedGray, Time()); 1392 1402 1393 1403 if (d0)//fDrsCalibBaseline->value()==0 || start<0) … … 1620 1630 fDrsCalibTrgOffset->setValue(-1); 1621 1631 fDrsCalibROI->setValue(-1); 1632 1633 fDrsCalibBaseline2->setValue(-1); 1634 fDrsCalibGain2->setValue(-1); 1635 fDrsCalibTrgOffset2->setValue(-1); 1636 fDrsCalibROI2->setValue(-1); 1637 1622 1638 fDrsCalibration.assign(sz, 0); 1623 1639 DisplayEventData(); … … 1635 1651 fDrsCalibGain->setValue(run[2]); 1636 1652 fDrsCalibTrgOffset->setValue(run[3]); 1653 1654 fDrsCalibROI2->setValue(run[0]); 1655 fDrsCalibBaseline2->setValue(run[1]); 1656 fDrsCalibGain2->setValue(run[2]); 1657 fDrsCalibTrgOffset2->setValue(run[3]); 1637 1658 1638 1659 const float *dat = d.ptr<float>(sizeof(uint32_t)*4); … … 1946 1967 uint8_t numConn[NBOARDS] ; //#Sockets succesfully open per board 1947 1968 */ 1969 } 1970 1971 void handleFadFileFormat(const DimData &d) 1972 { 1973 if (!CheckSize(d, sizeof(uint16_t))) 1974 return; 1975 1976 const uint16_t &fmt = d.get<uint16_t>(); 1977 1978 SetLedColor(fFadLedFileFormatNone, fmt==FAD::kNone ?kLedGreen:kLedGray, d.time); 1979 SetLedColor(fFadLedFileFormatDebug, fmt==FAD::kDebug?kLedGreen:kLedGray, d.time); 1980 SetLedColor(fFadLedFileFormatRaw, fmt==FAD::kRaw ?kLedGreen:kLedGray, d.time); 1981 SetLedColor(fFadLedFileFormatFits, fmt==FAD::kFits ?kLedGreen:kLedGray, d.time); 1982 SetLedColor(fFadLedFileFormatCalib, fmt==FAD::kCalib?kLedGreen:kLedGray, d.time); 1948 1983 } 1949 1984 … … 2934 2969 fStatusDriveLabel->setToolTip(s.comment.c_str()); 2935 2970 2936 bool enable = false;2937 2938 2971 if (s.index<1) // No Dim connection 2939 2972 SetLedColor(fStatusDriveLed, kLedGray, time); … … 3303 3336 return PostInfoHandler(&FactGui::handleFadStatistics2); 3304 3337 3338 if (getInfo()==&fDimFadFileFormat) 3339 return PostInfoHandler(&FactGui::handleFadFileFormat); 3340 3305 3341 if (getInfo()==&fDimFadEvents) 3306 3342 return PostInfoHandler(&FactGui::handleFadEvents); … … 3625 3661 } 3626 3662 3663 /* 3627 3664 void on_fThresholdIdx_valueChanged(int isw) 3628 3665 { 3629 3666 // fRatesCanv->SetBold(isw); 3630 3667 // fRatesCanv->updateGL(); 3631 } 3632 3668 }*/ 3669 3670 /* 3633 3671 void UpdateThresholdIdx() 3634 3672 { … … 3648 3686 3649 3687 on_fThresholdIdx_valueChanged(isw); 3650 } 3688 }*/ 3651 3689 3652 3690 void on_fPixelIdx_valueChanged(int isw) … … 3945 3983 fDimFadStatistics1 ("FAD_CONTROL/STATISTICS1", (void*)NULL, 0, this), 3946 3984 fDimFadStatistics2 ("FAD_CONTROL/STATISTICS2", (void*)NULL, 0, this), 3985 fDimFadFileFormat ("FAD_CONTROL/FILE_FORMAT", (void*)NULL, 0, this), 3947 3986 //- 3948 3987 fDimFscTemp ("FSC_CONTROL/TEMPERATURE", (void*)NULL, 0, this), -
trunk/FACT++/gui/MainWindow.cc
r12498 r12522 318 318 } 319 319 320 void MainWindow::FadSetFileFormat(uint16_t fmt) 321 { 322 Dim::SendCommand("FAD_CONTROL/SET_FILE_FORMAT", fmt); 323 } 324 320 325 void MainWindow::on_fFadStart_clicked() 321 326 { -
trunk/FACT++/gui/MainWindow.h
r12498 r12522 85 85 void on_fFadSocket17_clicked(); 86 86 87 void FadSetFileFormat(uint16_t fmt); 88 89 void on_fFadButtonFileFormatNone_clicked() { FadSetFileFormat(0); } 90 void on_fFadButtonFileFormatDebug_clicked() { FadSetFileFormat(1); } 91 void on_fFadButtonFileFormatFits_clicked() { FadSetFileFormat(2); } 92 void on_fFadButtonFileFormatRaw_clicked() { FadSetFileFormat(3); } 93 87 94 void on_fFadPrescalerCmd_valueChanged(int); 88 95 void on_fFadRunNumberCmd_valueChanged(int); … … 103 110 void on_fDrsCalibStart_clicked(); 104 111 void on_fDrsCalibReset_clicked(); 112 113 void on_fDrsCalibStart2_clicked() { on_fDrsCalibStart_clicked(); } 114 void on_fDrsCalibReset2_clicked() { on_fDrsCalibReset_clicked(); } 105 115 106 116 // Tab: Adc … … 200 210 201 211 // Tab: Rates 202 virtual void UpdateThresholdIdx() = 0;212 //virtual void UpdateThresholdIdx() = 0; 203 213 virtual void on_fPixelIdx_valueChanged(int) = 0; 204 void on_fThresholdCrate_valueChanged(int) { UpdateThresholdIdx() ; }205 void on_fThresholdBoard_valueChanged(int) { UpdateThresholdIdx() ; }206 void on_fThresholdPatch_valueChanged(int) { UpdateThresholdIdx() ; }214 //void on_fThresholdCrate_valueChanged(int) { UpdateThresholdIdx() ; } 215 //void on_fThresholdBoard_valueChanged(int) { UpdateThresholdIdx() ; } 216 //void on_fThresholdPatch_valueChanged(int) { UpdateThresholdIdx() ; } 207 217 208 218 virtual void on_fPixelEnable_stateChanged(int) = 0; 209 219 virtual void on_fThresholdVal_valueChanged(int) = 0; 210 virtual void on_fThresholdIdx_valueChanged(int) = 0;220 //virtual void on_fThresholdIdx_valueChanged(int) = 0; 211 221 212 222 virtual void on_fBoardRatesEnabled_toggled(bool) = 0; -
trunk/FACT++/src/EventBuilderWrapper.h
r12499 r12522 75 75 }; 76 76 77 enum FileFormat_t 78 { 79 kNone = 0, 80 kDebug, 81 kFits, 82 kRaw, 83 kCalib 84 }; 85 86 FileFormat_t fFileFormat; 87 77 FAD::FileFormat_t fFileFormat; 88 78 89 79 uint32_t fMaxRun; … … 110 100 DimDescribedService fDimStatistics1; 111 101 DimDescribedService fDimStatistics2; 102 DimDescribedService fDimFileFormat; 112 103 113 104 bool fDebugStream; … … 178 169 public: 179 170 EventBuilderWrapper(MessageImp &imp) : fMsg(imp), 180 fFileFormat( kNone), fMaxRun(0), fLastOpened(0), fLastClosed(0),171 fFileFormat(FAD::kNone), fMaxRun(0), fLastOpened(0), fLastClosed(0), 181 172 fDimWriteStats ("FAD_CONTROL", imp), 182 173 fDimRuns ("FAD_CONTROL/RUNS", "I:5;C", ""), … … 197 188 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40;I:40;X:40", ""), 198 189 fDimStatistics2 ("FAD_CONTROL/STATISTICS2", "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40", ""), 190 fDimFileFormat ("FAD_CONTROL/FILE_FORMAT", "S:1", ""), 199 191 fDebugStream(false), fDebugRead(false), fDebugLog(false) 200 192 { … … 407 399 bool IsIgnored(int i) const { return g_port[i].sockDef==-1; } 408 400 409 void SetOutputFormat(F ileFormat_t f)401 void SetOutputFormat(FAD::FileFormat_t f) 410 402 { 411 403 fFileFormat = f; 412 if (fFileFormat==kCalib) 404 fDimFileFormat.Update(uint16_t(f)); 405 if (fFileFormat==FAD::kCalib) 413 406 { 414 407 DataCalib::Restart(); … … 565 558 switch (fFileFormat) 566 559 { 567 case kNone: file = new DataDump(fPath, runid, fMsg); break;568 case kDebug: file = new DataDebug(fPath, runid, fMsg); break;569 case kFits: file = new DataWriteFits(fPath, runid, fMsg); break;570 case kRaw: file = new DataWriteRaw(fPath, runid, fMsg); break;571 case kCalib: file = new DataCalib(fPath, runid, fDimDrsCalibration, fMsg); break;560 case FAD::kNone: file = new DataDump(fPath, runid, fMsg); break; 561 case FAD::kDebug: file = new DataDebug(fPath, runid, fMsg); break; 562 case FAD::kFits: file = new DataWriteFits(fPath, runid, fMsg); break; 563 case FAD::kRaw: file = new DataWriteRaw(fPath, runid, fMsg); break; 564 case FAD::kCalib: file = new DataCalib(fPath, runid, fDimDrsCalibration, fMsg); break; 572 565 } 573 566 -
trunk/FACT++/src/HeadersFAD.h
r12495 r12522 66 66 kConfigured, 67 67 kWritingData 68 }; 69 70 enum FileFormat_t 71 { 72 kNone = 0, // Nothing is written just some little output in the log-stream 73 kDebug, // The contents of the headers are output to the console 74 kFits, // FITS files are written 75 kRaw, // Raw binary streams are written 76 kCalib // DRS calibration in progress 68 77 }; 69 78 -
trunk/FACT++/src/fadctrl.cc
r12501 r12522 823 823 const uint16_t fmt = evt.GetUShort(); 824 824 825 // A simple way to make sure that no invalid file format 826 // is passed to the event builder 825 827 switch (fmt) 826 828 { 827 case 0: SetOutputFormat(kNone); break; 828 case 1: SetOutputFormat(kDebug); break; 829 case 2: SetOutputFormat(kFits); break; 830 case 3: SetOutputFormat(kRaw); break; 831 case 4: SetOutputFormat(kCalib); break; 829 case FAD::kNone: 830 case FAD::kDebug: 831 case FAD::kFits: 832 case FAD::kRaw: 833 case FAD::kCalib: 834 SetOutputFormat(FAD::FileFormat_t(fmt)); 835 break; 832 836 default: 833 837 T::Error("File format unknonw."); … … 840 844 int StartDrsCalibration() 841 845 { 842 SetOutputFormat(kCalib);846 SetOutputFormat(FAD::kCalib); 843 847 return T::GetCurrentState(); 844 848 } … … 1556 1560 // deletion and creation of threads and more. 1557 1561 ResetConfig(); 1562 SetOutputFormat(FAD::kNone); 1558 1563 1559 1564 // State names
Note:
See TracChangeset
for help on using the changeset viewer.