Changeset 2711 for trunk/MagicSoft/Mars/mreport
- Timestamp:
- 12/18/03 15:48:42 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mreport
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r2687 r2711 43 43 using namespace std; 44 44 45 MReportCC::MReportCC() : MReport("CC-REPORT" )45 MReportCC::MReportCC() : MReport("CC-REPORT", kFALSE) 46 46 { 47 47 fName = "MReportCC"; … … 57 57 58 58 Int_t len; 59 Float_t zd, az, dec, ra;60 59 const Int_t n=sscanf(str.Data(), 61 60 "%*f %*f %*f %*f %f %f %f %f %*f %*f %n", … … 67 66 return kFALSE; 68 67 } 68 /* 69 69 str.Remove(0, len); 70 71 *fLog << dbg << str << endl; 70 72 71 73 if (str!=(TString)"OVER") … … 74 76 return kFALSE; 75 77 } 76 78 */ 77 79 return kTRUE; 78 80 } -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2678 r2711 207 207 // file versions 208 208 // 209 Bool_t MReportFileRead::CheckFileHeader() const 210 { 209 Int_t MReportFileRead::CheckFileHeader() const 210 { 211 Int_t line = 0; 212 211 213 TString str; 212 214 str.ReadLine(*fIn); // Read to EOF or newline … … 215 217 *fLog << err << "ERROR - First line doesn't match '" << gsReportHeader <<"' "; 216 218 *fLog << "in file '" << fFileName << "'"<<endl; 217 return kFALSE; 218 } 219 return line; 220 } 221 line++; 219 222 220 223 str.ReadLine(*fIn); // Read to EOF or newline … … 223 226 *fLog << err << "ERROR - Version prefix '" << gsVersionPrefix <<"' "; 224 227 *fLog << "not found in second line of file '" << fFileName << "'"<<endl; 225 return kFALSE; 226 } 228 return line; 229 } 230 line++; 227 231 228 232 str.Remove(0, gsVersionPrefix.Length()); … … 234 238 *fLog << err << "ERROR - Version string '" << str <<"' doesn't "; 235 239 *fLog << "match regular expression." << endl; 236 return kFALSE;240 return line; 237 241 } 238 242 239 243 *fLog << dbg << "Report File version: <" << ver << ">" << endl; 240 244 241 return kTRUE;245 return line; 242 246 } 243 247 … … 252 256 //if (!time) 253 257 // return kFALSE; 258 fNumLine = 0; 254 259 255 260 TIter Next(fList); … … 275 280 return kTRUE; 276 281 277 return CheckFileHeader(); 282 const Int_t n = CheckFileHeader(); 283 fNumLine += n; 284 return n==2; 278 285 } 279 286 … … 298 305 } 299 306 307 fNumLine++; 308 300 309 const Int_t pos = str.First(' '); 301 310 if (pos<=0) … … 310 319 if (rc==kFALSE) 311 320 { 312 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed ." << endl;321 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")" << endl; 313 322 return kFALSE; 314 323 } -
trunk/MagicSoft/Mars/mreport/MReportFileRead.h
r2678 r2711 34 34 MTime fStop; // Time range which should be read from file 35 35 36 ULong_t fNumLine; // line counter 37 36 38 enum { kHasNoHeader = BIT(14) }; 37 39 … … 40 42 Int_t PostProcess(); 41 43 42 Bool_t CheckFileHeader() const;44 Int_t CheckFileHeader() const; 43 45 MReport *GetReport(const TString &str) const; 44 46 MReport *GetReport(MReportHelp *help) const; -
trunk/MagicSoft/Mars/mreport/MReportRun.cc
r2708 r2711 50 50 Bool_t MReportRun::InterpreteBody(TString &str) 51 51 { 52 // Remove the 30 tokens of the subsystem status53 // table 12.1 p5954 for (int i=0; i<30; i++)55 str.Remove(0, str.First(' ')+1);56 57 52 Int_t len; 58 53 const Int_t n=sscanf(str.Data(), "%d %n", &fRunNumber, &len); … … 69 64 str.Remove(0, 6); 70 65 str = str.Strip(TString::kBoth); 71 fSourceName = str(0, str.First(' ')+1); 66 Ssiz_t pos = str.First(' '); 67 if (pos<0) 68 pos = str.Length(); 69 fSourceName = str(0, pos+1); 72 70 73 71 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.