Changeset 18563
- Timestamp:
- 09/03/16 14:09:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mraw/MRawFitsRead.cc
r17782 r18563 156 156 } 157 157 158 fIsMc = fin.HasKey("ISMC"); 159 158 160 const string type = fin.GetStr("RUNTYPE"); 159 161 … … 164 166 fRawRunHeader->SetRunInfo(0, fin.GetUInt("NIGHT"), fin.GetUInt("RUNID")); 165 167 fRawRunHeader->InitFact(fin.GetUInt("NPIX")/9, 9, fin.GetUInt("NROI"), fPixelMap.size()==0?0:fPixelMap.data()); 166 if (!fin.HasKey("ISMC")){ 167 fRawRunHeader->SetFormat(0xf172, fin.GetUInt("BLDVER")); 168 } 168 fRawRunHeader->SetFormat(0xf172, fIsMc ? 0 : fin.GetUInt("BLDVER")); 169 169 fRawRunHeader->SetRunType(0/*data*/); 170 170 171 if (!fin.HasKey("ISMC")){ 171 if (!fIsMc) 172 { 172 173 const string runstart = fin.GetStr("DATE-OBS"); 173 174 const string runstop = fin.GetStr("DATE-END"); … … 176 177 } 177 178 178 if (!fin.HasKey("ISMC")) 179 return 180 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 181 fin.HasKey("NROI") && fin.HasKey("BLDVER") && 182 fin.HasKey("NIGHT"); 183 else 184 return 185 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 186 fin.HasKey("NROI") && fin.HasKey("NIGHT"); 179 for (int i=0; i<1000; i++) 180 { 181 const string clnamed = Form("CLNAME%d", i); 182 if (!fin.HasKey(clnamed)) 183 break; 184 185 const string clname = fin.GetStr(clnamed); 186 187 MParContainer *par = (MParContainer*)fParList->FindCreateObj(clname.c_str()); 188 if (par) 189 par->SetupFits(fin); 190 } 191 192 return 193 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 194 fin.HasKey("NROI") && fin.HasKey("NIGHT"); 187 195 } 188 196 … … 211 219 return kFALSE; 212 220 213 if (!fin.HasKey("ISMC")){ 221 if (!fIsMc) 222 { 214 223 if (!fin.SetRefAddress("NumBoards", fNumBoards)) 215 224 return kFALSE; … … 220 229 return kFALSE; 221 230 222 223 231 if (!fin.SetPtrAddress("BoardTime", fRawBoards->fFadTime, 40)) 224 232 return kFALSE; 225 233 } 226 else227 fIsMc = kTRUE;228 229 234 230 235 if (!fin.SetPtrAddress("Data", (int16_t*)(*data)->GetArray(), (*data)->GetSize()/2)) … … 253 258 254 259 } 255 // FIXME: Correctly sort the pixels here!256 257 260 fRawEvtData1->SetReadyToSave(); 258 261 fRawEvtData2->SetReadyToSave();
Note:
See TracChangeset
for help on using the changeset viewer.