Changeset 2632 for trunk/MagicSoft/Mars/mreport
- Timestamp:
- 12/10/03 11:56:33 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mreport
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreport/MReport.cc
r2604 r2632 60 60 int n = sscanf(str.Data(), 61 61 fHasReportTime ? 62 " %d %d %d %d %d %d %d %d " 63 "%*d %*d %*d %*d %*d %*d %*d %*d %n" : 64 " %d %*d %*d %*d %d %d %d %d ", 62 " %d %d %d %d %d %d %d %d %*d %*d %*d %*d %*d %*d %*d %*d %n" : 63 " %d %d %d %d %d %d %d %d %n", 65 64 &state, &yea, &mon, &day, &hor, &min, &sec, &ms, &len); 66 65 if (n!=8) 67 66 { 68 *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << endl;67 *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << " (n=" << n << ")" << endl; 69 68 return kFALSE; 70 69 } … … 81 80 82 81 str.Remove(0, len); 82 83 83 return kTRUE; 84 84 } -
trunk/MagicSoft/Mars/mreport/MReportCurrents.cc
r2597 r2632 36 36 #include "MLogManip.h" 37 37 38 #include "MAstro.h" 38 #include "MParList.h" 39 #include "MCameraDC.h" 39 40 40 41 ClassImp(MReportCurrents); … … 42 43 using namespace std; 43 44 44 MReportCurrents::MReportCurrents() : MReport("DC-REPORT" ), fCurrents(577)45 MReportCurrents::MReportCurrents() : MReport("DC-REPORT", kFALSE) 45 46 { 46 47 fName = "MReportCurrents"; 47 48 fTitle = "Class for DC-REPORT information"; 48 49 } 50 51 Bool_t MReportCurrents::SetupReading(MParList &plist) 52 { 53 fDC = (MCameraDC*)plist.FindCreateObj("MCameraDC"); 54 if (!fDC) 55 return kFALSE; 56 57 return MReport::SetupReading(plist); 58 } 59 49 60 50 61 // Currents-REPORT 02 2003 11 04 23 53 34 951 00 0000 00 00 23 53 32 466 … … 54 65 Int_t len; 55 66 Short_t err1, err2; 56 const Int_t n=sscanf(str.Data(), " %hd %hd %n", 57 &err1, &err2, &len); 67 const Int_t n=sscanf(str.Data(), " %hd %hd %n", &err1, &err2, &len); 58 68 if (n!=2) 59 69 { 60 *fLog << err << "ERROR - Reading information of 'LV' section." << endl;70 *fLog << err << "ERROR - Reading status information." << endl; 61 71 return kFALSE; 62 72 } … … 82 92 } 83 93 84 fCurrents[i++] = 0.001*c;94 (*fDC)[i++] = 0.001*c; 85 95 } 86 96 … … 88 98 str=str.Strip(TString::kLeading); 89 99 90 return kTRUE;100 return str.IsNull(); 91 101 } -
trunk/MagicSoft/Mars/mreport/MReportCurrents.h
r2597 r2632 6 6 #endif 7 7 8 #ifndef ROOT_TArrayF 9 #include <TArrayF.h> 10 #endif 8 class MCameraDC; 11 9 12 10 class MReportCurrents : public MReport … … 16 14 Byte_t fStatus2; 17 15 18 TArrayF fCurrents; 16 MCameraDC *fDC; //! 17 18 Bool_t SetupReading(MParList &plist); 19 Bool_t InterpreteBody(TString &str); 19 20 20 21 public: 21 22 MReportCurrents(); 22 23 23 Bool_t InterpreteBody(TString &str); 24 25 ClassDef(MReportCurrents, 0) // Class for DC-REPORT information 24 ClassDef(MReportCurrents, 1) // Class for DC-REPORT information 26 25 }; 27 26 -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2592 r2632 270 270 return kFALSE; 271 271 } 272 if (TestBit(kHasNoHeader)) 273 return kTRUE; 272 274 273 275 return CheckFileHeader(); … … 287 289 while (!GetReport(rep)) 288 290 { 289 str.ReadLine(*fIn); 291 // Don't know the reason, but ReadLine and ReadString don't work 292 // for the (at least: converted) DC files. 293 str.ReadToDelim(*fIn); 290 294 if (!*fIn) 291 295 { -
trunk/MagicSoft/Mars/mreport/MReportFileRead.h
r2592 r2632 27 27 THashTable *fList; 28 28 29 enum { kHasNoHeader = BIT(14) }; 30 29 31 Int_t PreProcess(MParList *pList); 30 32 Int_t Process(); … … 40 42 ~MReportFileRead(); 41 43 44 void SetHasNoHeader() { SetBit(kHasNoHeader); } 45 42 46 Bool_t AddToList(const char *name) const; 43 47 -
trunk/MagicSoft/Mars/mreport/Makefile
r2592 r2632 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase -I../mtools -I../mcamera 24 INCLUDES = -I. -I../mbase -I../mtools -I../mcamera -I../mgui 25 # mgui - MCameraDC <MCamEvent> 25 26 26 27 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.