Changeset 12522 for trunk/FACT++/src
- Timestamp:
- 11/15/11 14:09:51 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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.