- Timestamp:
- 09/13/13 13:11:54 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Mars_MC/mraw/MRawFitsRead.cc
r14095 r17162 159 159 fRawRunHeader->SetRunInfo(0, fin.GetUInt("NIGHT"), fin.GetUInt("RUNID")); 160 160 fRawRunHeader->InitFact(fin.GetUInt("NPIX")/9, 9, fin.GetUInt("NROI"), fPixelMap.size()==0?0:fPixelMap.data()); 161 fRawRunHeader->SetFormat(0xf172, fin.GetUInt("BLDVER")); 161 if (!fin.HasKey("ISMC")){ 162 fRawRunHeader->SetFormat(0xf172, fin.GetUInt("BLDVER")); 163 } 162 164 fRawRunHeader->SetRunType(0/*data*/); 163 165 164 const string runstart = fin.GetStr("DATE-OBS"); 165 const string runstop = fin.GetStr("DATE-END"); 166 167 fRawRunHeader->SetRunTime(MTime(runstart.c_str()), MTime(runstop.c_str())); 168 169 return 170 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 171 fin.HasKey("NROI") && fin.HasKey("BLDVER") && 172 fin.HasKey("NIGHT"); 166 if (!fin.HasKey("ISMC")){ 167 const string runstart = fin.GetStr("DATE-OBS"); 168 const string runstop = fin.GetStr("DATE-END"); 169 170 fRawRunHeader->SetRunTime(MTime(runstart.c_str()), MTime(runstop.c_str())); 171 } 172 173 if (!fin.HasKey("ISMC")) 174 return 175 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 176 fin.HasKey("NROI") && fin.HasKey("BLDVER") && 177 fin.HasKey("NIGHT"); 178 else 179 return 180 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 181 fin.HasKey("NROI") && fin.HasKey("NIGHT"); 173 182 } 174 183 … … 195 204 return kFALSE; 196 205 197 fPCTime.resize(2); 198 if (!fin.SetVecAddress("UnixTimeUTC", fPCTime)) 199 if (!fin.SetVecAddress("PCTime", fPCTime)) 206 if (!fin.HasKey("ISMC")){ 207 fPCTime.resize(2); 208 if (!fin.SetVecAddress("UnixTimeUTC", fPCTime)) 209 if (!fin.SetVecAddress("PCTime", fPCTime)) 210 return kFALSE; 211 212 if (!fin.SetPtrAddress("BoardTime", fRawBoards->fFadTime, 40)) 200 213 return kFALSE; 201 202 if (!fin.SetPtrAddress("BoardTime", fRawBoards->fFadTime, 40)) 203 return kFALSE; 214 } 215 else 216 fIsMc = kTRUE; 217 204 218 205 219 if (!fin.SetPtrAddress("Data", (int16_t*)(*data)->GetArray(), (*data)->GetSize()/2)) … … 219 233 return kFALSE; 220 234 221 fRawEvtTime->SetUnixTime(fPCTime[0], fPCTime[1]); 235 if (!fIsMc) 236 fRawEvtTime->SetUnixTime(fPCTime[0], fPCTime[1]); 222 237 223 238 // FIXME: Correctly sort the pixels here!
Note:
See TracChangeset
for help on using the changeset viewer.