Changeset 7719 for trunk/MagicSoft/Mars/mreport/MReportCC.cc
- Timestamp:
- 05/19/06 13:57:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r7487 r7719 136 136 // Interprete the TH (discriminator thresholds) part of the report 137 137 // 138 Bool_t MReportCC::InterpreteTH(TString &str )138 Bool_t MReportCC::InterpreteTH(TString &str, Int_t ver) 139 139 { 140 140 if (!CheckTag(str, "TH ")) 141 141 return kFALSE; 142 143 // Skip the TH (discriminator thresholds) part of the report (for old 144 // CC files with wrong or nonsense number of TH-Bytes) 145 if (ver<200507190) 146 { 147 Ssiz_t pr = str.First(' '); 148 if (pr<0) 149 { 150 *fLog << warn << "WARNING - No TH information found at all." << endl; 151 return kFALSE; 152 } 153 if (pr!=1154) 154 { 155 fTD->Invalidate(); 156 157 str.Remove(0, pr); 158 str=str.Strip(TString::kLeading); 159 return kTRUE; 160 } 161 } 142 162 143 163 const char *pos = str.Data(); … … 158 178 } 159 179 180 fTH->SetValid(); 181 160 182 str.Remove(0, end-str.Data()); // Remove TH 161 183 str=str.Strip(TString::kLeading); … … 170 192 { 171 193 if (!CheckTag(str, "TD ")) 172 return kFALSE; 173 194 return kTRUE; 195 196 // Skip the TD (discriminator delays) part of the report (for old 197 // CC files with wrong or nonsense number of TD-Bytes) 198 if (ver<200412210) 199 { 200 Ssiz_t pr = str.First(' '); 201 if (pr<0) 202 { 203 *fLog << warn << "WARNING - No TD information found at all." << endl; 204 return kFALSE; 205 } 206 if (pr!=1000) 207 { 208 fTD->Invalidate(); 209 210 str.Remove(0, pr); 211 str=str.Strip(TString::kLeading); 212 return kTRUE; 213 } 214 } 215 216 // Older files have less bytes (pixels) stored 174 217 const Int_t numpix = ver<200510250 ? 500 : 577; 175 218 … … 191 234 } 192 235 236 fTD->SetValid(); 237 193 238 str.Remove(0, end-str.Data()); // Remove TD 194 239 str=str.Strip(TString::kLeading); 240 195 241 return kTRUE; 196 242 } … … 238 284 return kCONTINUE; 239 285 240 if (!InterpreteTH(str)) 241 return kCONTINUE; 242 243 if (!InterpreteTD(str, ver)) 244 return kCONTINUE; 286 if (str.BeginsWith("RECEIVERS-COM-ERROR")) 287 { 288 fTD->Invalidate(); 289 fTH->Invalidate(); 290 str.Remove(0, 19); 291 } 292 else 293 { 294 if (!InterpreteTH(str, ver)) 295 return kCONTINUE; 296 297 if (!InterpreteTD(str, ver)) 298 return kCONTINUE; 299 } 245 300 246 301 if (ver>=200510250)
Note:
See TracChangeset
for help on using the changeset viewer.