Changeset 17165 for trunk/Mars/mraw
- Timestamp:
- 09/13/13 14:04:51 (11 years ago)
- Location:
- trunk/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars
- Property svn:mergeinfo changed
/branches/Mars_MC merged: 17162-17164
- Property svn:mergeinfo changed
-
trunk/Mars/mraw/MRawFileRead.cc
r14857 r17165 102 102 // 103 103 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title) 104 : fFileNames(NULL), fNumFile(0), fNumTotalEvents(0), fIn(NULL), fParList(NULL), fInterleave(1), fForce(kFALSE) 104 : fFileNames(NULL), fNumFile(0), fNumTotalEvents(0), fIn(NULL), fParList(NULL), fInterleave(1), fForce(kFALSE), fIsMc(kFALSE) 105 105 { 106 106 fName = name ? name : "MRead"; -
trunk/Mars/mraw/MRawFileRead.h
r14449 r17165 37 37 Int_t PostProcess(); 38 38 39 Bool_t fIsMc; 40 39 41 public: 40 42 MRawFileRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL); -
trunk/Mars/mraw/MRawFitsRead.cc
r17124 r17165 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 … … 197 206 return kFALSE; 198 207 199 if (!fin.SetRefAddress("NumBoards", fNumBoards)) 200 return kFALSE; 201 202 fPCTime.resize(2); 203 if (!fin.SetVecAddress("UnixTimeUTC", fPCTime)) 204 if (!fin.SetVecAddress("PCTime", fPCTime)) 208 if (!fin.HasKey("ISMC")){ 209 if (!fin.SetRefAddress("NumBoards", fNumBoards)) 205 210 return kFALSE; 206 211 207 208 if (!fin.SetPtrAddress("BoardTime", fRawBoards->fFadTime, 40)) 209 return kFALSE; 212 fPCTime.resize(2); 213 if (!fin.SetVecAddress("UnixTimeUTC", fPCTime)) 214 if (!fin.SetVecAddress("PCTime", fPCTime)) 215 return kFALSE; 216 217 218 if (!fin.SetPtrAddress("BoardTime", fRawBoards->fFadTime, 40)) 219 return kFALSE; 220 } 221 else 222 fIsMc = kTRUE; 223 210 224 211 225 if (!fin.SetPtrAddress("Data", (int16_t*)(*data)->GetArray(), (*data)->GetSize()/2)) … … 225 239 return kFALSE; 226 240 227 // Skip incomplete events 228 if (fNumBoards!=40) 229 return kCONTINUE; 230 231 fRawEvtTime->SetUnixTime(fPCTime[0], fPCTime[1]); 232 241 if (!fIsMc) 242 { 243 // Skip incomplete events 244 if (fNumBoards!=40) 245 return kCONTINUE; 246 247 fRawEvtTime->SetUnixTime(fPCTime[0], fPCTime[1]); 248 249 } 233 250 // FIXME: Correctly sort the pixels here! 234 251
Note:
See TracChangeset
for help on using the changeset viewer.