Changeset 2892
- Timestamp:
- 01/23/04 15:35:41 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2891 r2892 9 9 * mbase/MAstro.cc: 10 10 - Fixed calculation of MJD. In Ymd2Mjd a plus should be a minus. 11 12 * mreport/MReport*.[h,cc]: 13 - changed all classes to return Int_t instead of Bool_t in 14 InterpreteBody 15 - changed MReportFileRead such, that a wrong line results in 16 skipping the line instead of abort reading. 11 17 12 18 -
trunk/MagicSoft/Mars/mreport/MReport.cc
r2678 r2892 91 91 // argument. 92 92 // 93 Bool_t MReport::InterpreteBody(TString &str)93 Int_t MReport::InterpreteBody(TString &str) 94 94 { 95 95 *fLog << warn << "No interpreter existing for: " << fIdentifier << endl; … … 115 115 return kCONTINUE; 116 116 117 if (!InterpreteBody(str)) 118 return kFALSE; 117 const Int_t rc = InterpreteBody(str); 118 if (rc != kTRUE) 119 return rc; 119 120 120 121 SetReadyToSave(); -
trunk/MagicSoft/Mars/mreport/MReport.h
r2678 r2892 25 25 26 26 virtual Bool_t SetupReading(MParList &plist); 27 virtual Bool_tInterpreteBody(TString &str);27 virtual Int_t InterpreteBody(TString &str); 28 28 29 29 Int_t Interprete(TString &str, const MTime &start, const MTime &stop); -
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r2814 r2892 58 58 // Interprete the body of the CC-REPORT string 59 59 // 60 Bool_t MReportCC::InterpreteBody(TString &str)60 Int_t MReportCC::InterpreteBody(TString &str) 61 61 { 62 62 // Remove the 30 tokens of the subsystem status … … 72 72 if (n!=4) 73 73 { 74 *fLog << err << "ERROR- Wrong number of arguments." << endl;75 return k FALSE;74 *fLog << warn << "WARNING - Wrong number of arguments." << endl; 75 return kCONTINUE; 76 76 } 77 77 /* -
trunk/MagicSoft/Mars/mreport/MReportCC.h
r2864 r2892 14 14 Float_t fSolarRadiation; // [W/m^2] IR-Radiation 15 15 16 Bool_t InterpreteBody(TString &str);16 Int_t InterpreteBody(TString &str); 17 17 18 18 public: -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r2814 r2892 109 109 if (!str.BeginsWith(tag)) 110 110 { 111 *fLog << err << "ERROR- '" << tag << "' tag not found." << endl;111 *fLog << warn << "WARNING - '" << tag << "' tag not found." << endl; 112 112 return kFALSE; 113 113 } … … 152 152 continue; 153 153 154 *fLog << err << "ERROR- Reading hexadecimal HV information." << endl;154 *fLog << warn << "WARNING - Reading hexadecimal HV information." << endl; 155 155 return kFALSE; 156 156 } … … 179 179 if (n!=13) 180 180 { 181 *fLog << err << "ERROR- Reading information of 'COOL' section." << endl;181 *fLog << warn << "WARNING - Reading information of 'COOL' section." << endl; 182 182 return kFALSE; 183 183 } … … 222 222 if (n!=12) 223 223 { 224 *fLog << err << "ERROR- Reading information of 'LID' section." << endl;224 *fLog << warn << "WARNING - Reading information of 'LID' section." << endl; 225 225 return kFALSE; 226 226 } … … 260 260 if (n!=4) 261 261 { 262 *fLog << err << "ERROR- Reading information of 'HVPS' section." << endl;262 *fLog << warn << "WARNING - Reading information of 'HVPS' section." << endl; 263 263 return kFALSE; 264 264 } … … 291 291 if (n!=19) 292 292 { 293 *fLog << err << "ERROR- Reading information of 'LV' section." << endl;293 *fLog << warn << "WARNING - Reading information of 'LV' section." << endl; 294 294 return kFALSE; 295 295 } … … 336 336 if (n!=2) 337 337 { 338 *fLog << err << "ERROR- Reading information of 'AUX' section." << endl;338 *fLog << warn << "WARNING - Reading information of 'AUX' section." << endl; 339 339 return kFALSE; 340 340 } … … 363 363 if (n!=4) 364 364 { 365 *fLog << err << "ERROR- Reading information of 'CAL' section." << endl;365 *fLog << warn << "WARNING - Reading information of 'CAL' section." << endl; 366 366 return kFALSE; 367 367 } … … 393 393 if (n!=13) 394 394 { 395 *fLog << err << "ERROR- Cannot interprete status' of subsystems." << endl;395 *fLog << warn << "WARNING - Cannot interprete status' of subsystems." << endl; 396 396 return kFALSE; 397 397 } … … 420 420 // Interprete the body of the CAMERA-REPORT string 421 421 // 422 Bool_t MReportCamera::InterpreteBody(TString &str)422 Int_t MReportCamera::InterpreteBody(TString &str) 423 423 { 424 424 if (!InterpreteCamera(str)) 425 return k FALSE;425 return kCONTINUE; 426 426 427 427 if (!InterpreteDC(str)) 428 return k FALSE;428 return kCONTINUE; 429 429 430 430 if (!InterpreteHV(str)) 431 return k FALSE;431 return kCONTINUE; 432 432 433 433 if (!InterpreteCOOL(str)) 434 return k FALSE;434 return kCONTINUE; 435 435 436 436 if (!InterpreteLID(str)) 437 return k FALSE;437 return kCONTINUE; 438 438 439 439 if (!InterpreteHVPS(str)) 440 return k FALSE;440 return kCONTINUE; 441 441 442 442 if (!InterpreteLV(str)) 443 return k FALSE;443 return kCONTINUE; 444 444 445 445 if (!InterpreteAUX(str)) 446 return k FALSE;446 return kCONTINUE; 447 447 448 448 if (!InterpreteCAL(str)) 449 return k FALSE;449 return kCONTINUE; 450 450 451 451 if (str!="OVER") 452 452 { 453 *fLog << err << "ERROR- 'OVER' tag not found." << endl;454 return k FALSE;455 } 456 457 return kTRUE; 458 } 453 *fLog << warn << "WARNING - 'OVER' tag not found." << endl; 454 return kCONTINUE; 455 } 456 457 return kTRUE; 458 } -
trunk/MagicSoft/Mars/mreport/MReportCamera.h
r2707 r2892 39 39 Bool_t InterpreteCAL(TString &str); 40 40 41 Bool_tInterpreteBody(TString &str);41 Int_t InterpreteBody(TString &str); 42 42 43 43 public: -
trunk/MagicSoft/Mars/mreport/MReportCurrents.cc
r2814 r2892 70 70 // Interprete the body of the DC-REPORT string 71 71 // 72 Bool_t MReportCurrents::InterpreteBody(TString &str)72 Int_t MReportCurrents::InterpreteBody(TString &str) 73 73 { 74 74 Int_t len; … … 77 77 if (n!=2) 78 78 { 79 *fLog << err << "ERROR- Reading status information." << endl;80 return k FALSE;79 *fLog << warn << "WARNING - Reading status information." << endl; 80 return kCONTINUE; 81 81 } 82 82 … … 97 97 if (n!=1) 98 98 { 99 *fLog << err << "ERROR- Reading hexadecimal DC information." << endl;100 return k FALSE;99 *fLog << warn << "WARNING - Reading hexadecimal DC information." << endl; 100 return kCONTINUE; 101 101 } 102 102 … … 107 107 str=str.Strip(TString::kLeading); 108 108 109 return str.IsNull() ;109 return str.IsNull() ? kTRUE : kCONTINUE; 110 110 } -
trunk/MagicSoft/Mars/mreport/MReportCurrents.h
r2632 r2892 17 17 18 18 Bool_t SetupReading(MParList &plist); 19 Bool_t InterpreteBody(TString &str);19 Int_t InterpreteBody(TString &str); 20 20 21 21 public: -
trunk/MagicSoft/Mars/mreport/MReportDAQ.cc
r2780 r2892 48 48 } 49 49 50 Bool_t MReportDAQ::InterpreteBody(TString &str)50 Int_t MReportDAQ::InterpreteBody(TString &str) 51 51 { 52 52 *fLog << dbg << "D" << flush; -
trunk/MagicSoft/Mars/mreport/MReportDAQ.h
r2707 r2892 9 9 { 10 10 private: 11 Bool_t InterpreteBody(TString &str);11 Int_t InterpreteBody(TString &str); 12 12 13 13 public: -
trunk/MagicSoft/Mars/mreport/MReportDrive.cc
r2814 r2892 88 88 // Interprete the body of the DRIVE-REPORT string 89 89 // 90 Bool_t MReportDrive::InterpreteBody(TString &str)90 Int_t MReportDrive::InterpreteBody(TString &str) 91 91 { 92 92 MAstro::String2Angle(str, fRa); … … 97 97 Int_t n=sscanf(str.Data(), "%lf %n", &fMjd, &len); 98 98 if (n!=1) 99 return kFALSE; 99 { 100 *fLog << warn << "WARNING - Not enough arguments." << endl; 101 return kCONTINUE; 102 } 100 103 101 104 str.Remove(0, len); … … 108 111 n=sscanf(str.Data(), "%lf %lf %n", &fErrorZd, &fErrorAz, &len); 109 112 if (n!=2) 110 return kFALSE; 113 { 114 *fLog << warn << "WARNING - Not enough arguments." << endl; 115 return kCONTINUE; 116 } 111 117 112 118 str.Remove(0, len); … … 114 120 str = str.Strip(TString::kBoth); 115 121 116 return str.IsNull() ;122 return str.IsNull() ? kTRUE : kCONTINUE; 117 123 } 118 124 -
trunk/MagicSoft/Mars/mreport/MReportDrive.h
r2814 r2892 23 23 Double_t fErrorAz; // [?] sistem error in the azimuth angle axis 24 24 25 Bool_t InterpreteBody(TString &str);25 Int_t InterpreteBody(TString &str); 26 26 27 27 public: -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2814 r2892 255 255 256 256 const Int_t rc = rep->Interprete(str, fStart, fStop); 257 if (rc==kFALSE) 258 { 259 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")" << endl; 260 return kFALSE; 257 258 switch (rc) 259 { 260 case kFALSE: 261 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")... abort." << endl; 262 break; 263 case kCONTINUE: 264 *fLog << warn << "WARNING - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")... skipped." << endl; 265 break; 261 266 } 262 267 … … 284 289 while ((rep=(MReportHelp*)Next())) 285 290 { 291 *fLog << inf; 286 292 *fLog << " " << setw(7) << rep->GetNumReports() << " ("; 287 293 *fLog << setw(3) << (int)(100.*rep->GetNumReports()/GetNumExecutions()); 288 294 *fLog << "%): " << rep->GetName() << endl; 295 296 if (rep->GetNumSkipped()==0) 297 continue; 298 299 *fLog << warn; 300 *fLog << " " << setw(7) << rep->GetNumSkipped() << " ("; 301 *fLog << setw(3) << (int)(100.*rep->GetNumSkipped()/GetNumExecutions()); 302 *fLog << "%): " << rep->GetName() << " skipped!" << endl; 289 303 } 290 304 -
trunk/MagicSoft/Mars/mreport/MReportHelp.cc
r2799 r2892 56 56 // default constructor. 57 57 // 58 MReportHelp::MReportHelp(const char *name, MLog *fLog) : fReport(NULL), fNumReports(0) 58 MReportHelp::MReportHelp(const char *name, MLog *fLog) : fReport(NULL), fNumReports(0), fNumSkipped(0) 59 59 { 60 60 TClass *cls = gROOT->GetClass(name); … … 142 142 const Int_t rc = fReport->Interprete(str, start, stop); 143 143 144 if (rc==kFALSE) 145 return kFALSE; 146 147 fNumReports++; 144 switch (rc) 145 { 146 case kTRUE: fNumReports++; break; 147 case kCONTINUE: fNumSkipped++; break; 148 } 148 149 return rc; 149 150 } -
trunk/MagicSoft/Mars/mreport/MReportHelp.h
r2799 r2892 18 18 MReport *fReport; 19 19 ULong_t fNumReports; 20 ULong_t fNumSkipped; 20 21 21 22 public: … … 25 26 const char *GetName() const; 26 27 ULong_t GetNumReports() const { return fNumReports; } 28 ULong_t GetNumSkipped() const { return fNumSkipped; } 27 29 ULong_t Hash() const; 28 30 MReport *GetReport() { return fReport; } -
trunk/MagicSoft/Mars/mreport/MReportRun.cc
r2814 r2892 57 57 // Interprete the body of the RUN-REPORT string 58 58 // 59 Bool_t MReportRun::InterpreteBody(TString &str)59 Int_t MReportRun::InterpreteBody(TString &str) 60 60 { 61 61 Int_t len; … … 63 63 if (n!=1) 64 64 { 65 *fLog << err << "ERROR- Wrong number of arguments." << endl;66 return k FALSE;65 *fLog << warn << "WARNING - Wrong number of arguments." << endl; 66 return kCONTINUE; 67 67 } 68 68 str.Remove(0, len); -
trunk/MagicSoft/Mars/mreport/MReportRun.h
r2728 r2892 12 12 TString fSourceName; 13 13 14 Bool_t InterpreteBody(TString &str);14 Int_t InterpreteBody(TString &str); 15 15 16 16 public: -
trunk/MagicSoft/Mars/mreport/MReportTrigger.cc
r2814 r2892 52 52 // Interprete the body of the TRIGGER-REPORT string 53 53 // 54 Bool_t MReportTrigger::InterpreteBody(TString &str)54 Int_t MReportTrigger::InterpreteBody(TString &str) 55 55 { 56 56 str = str.Strip(TString::kLeading); … … 59 59 if (ws<=0) 60 60 { 61 *fLog << err << "ERROR- Cannot determin name of trigger table." << endl;62 return k FALSE;61 *fLog << warn << "WARNING - Cannot determin name of trigger table." << endl; 62 return kCONTINUE; 63 63 } 64 64 … … 74 74 if (n!=1) 75 75 { 76 *fLog << err << "ERROR- Scaler Value #" << i << " missing." << endl;77 return k FALSE;76 *fLog << warn << "WARNING - Scaler Value #" << i << " missing." << endl; 77 return kCONTINUE; 78 78 } 79 79 pos += len; … … 82 82 if (n!=2) 83 83 { 84 *fLog << err << "ERROR- Couldn't read Trigger rates." << endl;84 *fLog << warn << "WARNING - Couldn't read Trigger rates." << endl; 85 85 return kFALSE; 86 86 } … … 92 92 if (n!=1) 93 93 { 94 *fLog << err << "ERROR- Rate #" << i << " missing." << endl;94 *fLog << warn << "WARNING - Rate #" << i << " missing." << endl; 95 95 return kFALSE; 96 96 } … … 100 100 str.Strip(TString::kBoth); 101 101 102 return str==(TString)"OVER" ;102 return str==(TString)"OVER" ? kTRUE : kCONTINUE; 103 103 } -
trunk/MagicSoft/Mars/mreport/MReportTrigger.h
r2865 r2892 19 19 //TArrayF fRates; //[Hz] curently undefined 20 20 21 Bool_t InterpreteBody(TString &str);21 Int_t InterpreteBody(TString &str); 22 22 23 23 public:
Note:
See TracChangeset
for help on using the changeset viewer.