Changeset 2557 for trunk/MagicSoft/Mars/mreport
- Timestamp:
- 11/22/03 21:14:14 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mreport
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreport/MReport.cc
r2532 r2557 45 45 46 46 int n = sscanf(str.Data(), 47 fHasReportTime ? 47 48 " %d %*d %*d %*d %d %d %d %d " 48 "%*d %*d %*d %*d %*d %*d %*d %*d "49 " %n",49 "%*d %*d %*d %*d %*d %*d %*d %*d %n" : 50 " %d %*d %*d %*d %d %d %d %d ", 50 51 &state, &hor, &min, &sec, &ms, &len); 51 52 if (n!=5) -
trunk/MagicSoft/Mars/mreport/MReport.h
r2532 r2557 12 12 { 13 13 private: 14 const TString fIdentifier; //! 14 const TString fIdentifier; //! 15 const Bool_t fHasReportTime; //! 15 16 16 17 Byte_t fState; … … 21 22 22 23 public: 23 MReport(const char *id ) : fIdentifier(id), fState(0xff), fTime(0) { }24 MReport(const char *id, Bool_t time=kTRUE) : fIdentifier(id), fHasReportTime(time), fState(0xff), fTime(0) { } 24 25 25 26 virtual Bool_t SetupReading(MParList &plist); -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r2555 r2557 106 106 return kFALSE; 107 107 108 for (int i=0; i<577; i++) 109 { 110 const Char_t hex[4] = { str[i*3], str[i*3+1], str[i*3+2], 0 }; 111 const Int_t n=sscanf(hex, "%3hx", &fHV->fHV[i]); 108 const char *pos = str.Data(); 109 const char *end = str.Data()+577*3; 110 111 Int_t i=0; 112 while (pos<end) 113 { 114 const Char_t hex[4] = { pos[0], pos[1], pos[2], 0 }; 115 pos += 3; 116 117 const Int_t n=sscanf(hex, "%3hx", &fHV->fHV[i++]); 112 118 if (n==1) 113 119 continue; … … 116 122 return kFALSE; 117 123 } 118 str.Remove(0, 577*3); // Remove DC currents 124 125 str.Remove(0, end-str.Data()); // Remove DC currents 119 126 str=str.Strip(TString::kLeading); 120 127 return kTRUE; -
trunk/MagicSoft/Mars/mreport/MReportDrive.cc
r2520 r2557 69 69 str = str.Strip(TString::kBoth); 70 70 71 *fLog << dbg << "D" << flush;72 73 71 return str.IsNull(); 74 72 } -
trunk/MagicSoft/Mars/mreport/MReportDrive.h
r2520 r2557 28 28 Bool_t InterpreteBody(TString &str); 29 29 30 ClassDef(MReportDrive, 0) // Base class for control reports 30 Double_t GetMjd() const { return fMjd; } 31 32 Double_t GetRa() const { return fRa; } 33 Double_t GetDec() const { return fDec; } 34 Double_t GetHa() const { return fHa; } 35 36 Double_t GetNominalZd() const { return fNominalZd; } 37 Double_t GetNominalAz() const { return fNominalAz; } 38 Double_t GetCurrentZd() const { return fCurrentZd; } 39 Double_t GetCurrentAz() const { return fCurrentAz; } 40 41 Double_t GetErrorZd() const { return fErrorZd; } 42 Double_t GetErrorAz() const { return fErrorAz; } 43 44 ClassDef(MReportDrive, 1) // Base class for control reports 31 45 }; 32 46
Note:
See TracChangeset
for help on using the changeset viewer.