Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7025)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7026)
@@ -21,4 +21,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/05/13 Thomas Bretz
+
+   * mreport/MReportCC.cc:
+     - fixed reading of rep-files for versions newer than V200404070 
+
+
+
  2005/05/13 Daniela Dorner
 
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 7025)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 7026)
@@ -91,4 +91,7 @@
      + MHCalibrationChargeCam.NumHiGainSaturationLimit
      + MHCalibrationChargeCam.NumLoGainSaturationLimit
+
+   - fixed reading of CC-REPORTS (weather data) for Arehucas file versions
+     newer than V200404070 
 
 
Index: /trunk/MagicSoft/Mars/mreport/MReportCC.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportCC.cc	(revision 7025)
+++ /trunk/MagicSoft/Mars/mreport/MReportCC.cc	(revision 7026)
@@ -60,7 +60,14 @@
 Int_t MReportCC::InterpreteBody(TString &str, Int_t ver)
 {
-    // Remove the 30 tokens of the subsystem status
-    //  table 12.1 p59
-    for (int i=0; i<30; i++)
+    if (ver<200404070)
+    {
+        *fLog << err << "ERROR - MReportCC::InterpreteBody not prepared for ";
+        *fLog << " report-files with version<200404070" << endl;
+        return kFALSE;
+    }
+
+    const Int_t skip = ver<200407270 ? 30 : 31;
+
+    for (int i=0; i<skip; i++)
         str.Remove(0, str.First(' ')+1);
 
@@ -75,15 +82,29 @@
         return kCONTINUE;
     }
-    /*
+
     str.Remove(0, len);
 
-    *fLog << dbg << str << endl;
+    for (int i=0; i<4; i++)  // 2*UPS, TH, 577%x, TD, 577%x
+        str.Remove(0, str.First(' ')+1);
 
-    if (str!=(TString)"OVER")
+    if (str.Strip(TString::kBoth)!=(TString)"OVER")
     {
         *fLog << err << "ERROR - Termination (OVER) too far away." << endl;
-        return kFALSE;
+        return kCONTINUE;
     }
-    */
+
     return kTRUE;
 }
+
+// --------------------------------------------------------------------------
+//
+// Print contents of report
+//
+void MReportCC::Print(Option_t *opt) const
+{
+    *fLog << all << GetDescriptor() << ":  Status=" << (int)GetState();
+    *fLog << "   Hum=" << Form("%3.0f", fHumidity);
+    *fLog << "%  Temp=" << Form("%+3.0f", fTemperature);
+    *fLog << "°C  Wind=" << Form("%3.0f", fWindSpeed);
+    *fLog << "km/h  SolarRad=" << Form("%4.0f", fSolarRadiation) << "W/m^2" << endl;
+}
