Changeset 11732 for trunk/FACT++
- Timestamp:
- 07/31/11 12:03:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.cc
r11726 r11732 7 7 using namespace std; 8 8 9 int DataCalib::fStep = 0; 9 int DataCalib::fStep = 0; 10 bool DataCalib::fProcessing = false; 10 11 11 12 vector<int32_t> DataCalib::fOffset(1440*1024, 0); … … 43 44 44 45 fStep = 0; 46 fProcessing = false; 45 47 } 46 48 … … 52 54 bool DataCalib::Open(RUN_HEAD* h) 53 55 { 56 if (h->NPix != 1440) 57 { 58 fMsg.Error("Number of pixels in header not 1440."); 59 return false; 60 } 61 62 if (h->Nroi != 1024) 63 { 64 fMsg.Error("Region of interest not 1024."); 65 return false; 66 } 67 68 if (fProcessing) 69 { 70 fMsg.Warn("Previous run not yet finished!"); 71 return false; 72 } 73 54 74 if (fStep==4) 55 75 { … … 58 78 } 59 79 60 if (h->NPix != 1440) 61 { 62 fMsg.Error("Number of pixels in header not 1440."); 63 return false; 64 } 65 66 if (h->Nroi != 1024) 67 { 68 fMsg.Error("Region of interest not 1024."); 69 return false; 70 } 80 fProcessing = true; 71 81 72 82 ostringstream name; … … 76 86 Reset(); 77 87 InitSize(1440, 1024); 78 79 fFileName = FormFileName(GetRunId(), "drs.fits");80 88 81 89 return true; … … 117 125 file.AddColumn('F', "TriggerOffsetRms", 1024*1440); 118 126 127 fFileName = FormFileName(GetRunId(), "drs.fits"); 128 119 129 if (!file.OpenFile(fFileName)) 120 130 return; … … 148 158 if (!file.WriteData(buf.data(), 1024*1440*sizeof(float)*6+3)) 149 159 return; 160 161 ostringstream str; 162 str << "Wrote DRS calibration data (step=" << fStep << ") to '" << fFileName << "'"; 163 Info(str.str()); 150 164 #endif 151 165 } … … 190 204 WriteFits(); 191 205 206 fProcessing = false; 207 192 208 fDim.Update(fStats); 193 194 fStep++;195 209 196 210 return true;
Note:
See TracChangeset
for help on using the changeset viewer.