Index: trunk/Mars/mreport/MReportHumidity.cc
===================================================================
--- trunk/Mars/mreport/MReportHumidity.cc	(revision 12861)
+++ trunk/Mars/mreport/MReportHumidity.cc	(revision 12861)
@@ -0,0 +1,77 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 02/2012 <mailto:thomas.bretz@epfl.ch>
+!
+!   Copyright: MAGIC Software Development, 2000-2012
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MReportHumidity
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MReportHumidity.h"
+
+#include "fits.h"
+
+#include "MLogManip.h"
+
+ClassImp(MReportHumidity);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default construtor. Initialize identifier to "DRIVE-REPORT"
+//
+MReportHumidity::MReportHumidity() : MReport("TEMPERATURES-REPORT"),
+    fTimeStamp(0)
+{
+    fName  = "MReportHumidity";
+    fTitle = "Class for DRIVE-REPORT information (raw telescope position)";
+
+    memset(fHumidity, 0, sizeof(Float_t)*4);
+}
+
+Bool_t MReportHumidity::SetupReadingFits(std::fits &file)
+{
+    return
+        file.SetRefAddress("t",  fTimeStamp)   &&
+        file.SetPtrAddress("H",  fHumidity, 4);
+}
+
+Int_t MReportHumidity::InterpreteFits(const std::fits &fits)
+{
+    return kTRUE;
+}
+
+Float_t MReportHumidity::GetMean() const
+{
+    Double_t avg = 0;
+    for (int i=0; i<4; i++)
+        avg += fHumidity[i];
+
+    return avg/4;
+}
+
+void MReportHumidity::Print(Option_t *o) const
+{
+    *fLog << GetDescriptor() << ": Time=" << fTimeStamp << " Hum=" << GetMean() << "%" << endl;
+}
Index: trunk/Mars/mreport/MReportHumidity.h
===================================================================
--- trunk/Mars/mreport/MReportHumidity.h	(revision 12861)
+++ trunk/Mars/mreport/MReportHumidity.h	(revision 12861)
@@ -0,0 +1,28 @@
+#ifndef MARS_MReportHumidity
+#define MARS_MReportHumidity
+
+#ifndef MARS_MReport
+#include "MReport.h"
+#endif
+
+class MReportHumidity : public MReport
+{
+private:
+    Float_t fTimeStamp;   // [s] FSC uptime
+    Float_t fHumidity[4]; // H[%] Humidity sensors readout
+
+    Bool_t SetupReadingFits(std::fits &fits);
+    Int_t  InterpreteFits(const std::fits &fits);
+
+public:
+    MReportHumidity();
+
+    Float_t GetTimeStamp() const { return fTimeStamp; }
+    Float_t GetMean() const;
+
+    void Print(Option_t *o="") const;
+
+    ClassDef(MReportHumidity, 1) // Class for FTM_CONTROL/TRIGGER_RATES
+};
+
+#endif
Index: trunk/Mars/mreport/MReportTemperatures.cc
===================================================================
--- trunk/Mars/mreport/MReportTemperatures.cc	(revision 12861)
+++ trunk/Mars/mreport/MReportTemperatures.cc	(revision 12861)
@@ -0,0 +1,109 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 02/2012 <mailto:thomas.bretz@epfl.ch>
+!
+!   Copyright: MAGIC Software Development, 2000-2012
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MReportTemperatures
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MReportTemperatures.h"
+
+#include "fits.h"
+
+#include "MLogManip.h"
+
+ClassImp(MReportTemperatures);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default construtor. Initialize identifier to "DRIVE-REPORT"
+//
+MReportTemperatures::MReportTemperatures() : MReport("TEMPERATURES-REPORT"),
+    fTimeStamp(0)
+{
+    fName  = "MReportTemperatures";
+    fTitle = "Class for DRIVE-REPORT information (raw telescope position)";
+
+    memset(fTempSensors,  0, sizeof(Float_t)*31);
+    memset(fTempCrate,    0, sizeof(Float_t)*8);
+    memset(fTempPS,       0, sizeof(Float_t)*8);
+    memset(fTempAux,      0, sizeof(Float_t)*4);
+    memset(fTempBack,     0, sizeof(Float_t)*4);
+    memset(fTempEthernet, 0, sizeof(Float_t)*4);
+}
+
+Bool_t MReportTemperatures::SetupReadingFits(std::fits &file)
+{
+    return
+        file.SetRefAddress("t",       fTimeStamp)       &&
+        file.SetPtrAddress("T_sens",  fTempSensors, 31) &&
+        file.SetPtrAddress("T_crate", fTempCrate,    8) &&
+        file.SetPtrAddress("T_ps",    fTempPS,       8) &&
+        file.SetPtrAddress("T_aux",   fTempAux,      4) &&
+        file.SetPtrAddress("T_back",  fTempBack,     4) &&
+        file.SetPtrAddress("T_eth",   fTempEthernet, 4);
+}
+
+Int_t MReportTemperatures::InterpreteFits(const std::fits &fits)
+{
+    return kTRUE;
+}
+
+Float_t MReportTemperatures::GetTempMean() const
+{
+    Double_t avg = 0;
+    UInt_t   num = 0;
+
+    for (int i=0; i<31; i++)
+    {
+        if (fTempSensors[i]==0)
+            continue;
+
+        avg += fTempSensors[i];
+        num++;
+    }
+
+    return avg/num;
+}
+
+Float_t MReportTemperatures::GetTempMedian() const
+{
+    Float_t dat[31];
+    UInt_t  num = 0;
+
+    for (int i=0; i<31; i++)
+    {
+        if (fTempSensors[i]!=0)
+            dat[num++] = fTempSensors[i];
+    }
+
+    return TMath::Median(num, dat);
+}
+
+void MReportTemperatures::Print(Option_t *o) const
+{
+    *fLog << GetDescriptor() << ": Time=" << fTimeStamp << endl;
+}
Index: trunk/Mars/mreport/MReportTemperatures.h
===================================================================
--- trunk/Mars/mreport/MReportTemperatures.h	(revision 12861)
+++ trunk/Mars/mreport/MReportTemperatures.h	(revision 12861)
@@ -0,0 +1,34 @@
+#ifndef MARS_MReportTemperatures
+#define MARS_MReportTemperatures
+
+#ifndef MARS_MReport
+#include "MReport.h"
+#endif
+
+class MReportTemperatures : public MReport
+{
+private:
+    Float_t fTimeStamp;        // [s] FSC uptime
+    Float_t fTempSensors[31];  // [deg C] Sensor compartment temperatures
+    Float_t fTempCrate[8];     // [deg C] Temperatures crate 0 (back/front), 1 (back/front), 2 (back/front), 3 (back/front)"
+    Float_t fTempPS[8];        // [deg C] Temperatures power supplies crate 0 (back/front), 1 (back/front), 2 (back/front), 3 (back/front)
+    Float_t fTempAux[4];       // [deg C] Auxiliary power supply temperatures FTM (top/bottom), FSC (top/bottom)
+    Float_t fTempBack[4];      // [deg C] FTM backpanel temperatures FTM (top/bottom), FSC (top/bottom)
+    Float_t fTempEthernet[4];  // [deg C] Ethernet switches temperatures top (front/back), bottom (front/back)
+
+    Bool_t SetupReadingFits(std::fits &fits);
+    Int_t  InterpreteFits(const std::fits &fits);
+
+public:
+    MReportTemperatures();
+
+    Float_t GetTimeStamp() const { return fTimeStamp; }
+    Float_t GetTempMean() const;
+    Float_t GetTempMedian() const;
+
+    void Print(Option_t *o="") const;
+
+    ClassDef(MReportTemperatures, 1) // Class for FTM_CONTROL/TRIGGER_RATES
+};
+
+#endif
Index: trunk/Mars/mreport/Makefile
===================================================================
--- trunk/Mars/mreport/Makefile	(revision 12860)
+++ trunk/Mars/mreport/Makefile	(revision 12861)
@@ -30,5 +30,4 @@
            MReportHelp.cc \
            MReportDrive.cc \
-           MReportRates.cc \
            MReportCamera.cc \
            MReportTrigger.cc \
@@ -38,5 +37,9 @@
            MReportFileReadCC.cc \
            MReportStarguider.cc \
-           MReportPyrometer.cc
+           MReportPyrometer.cc \
+           MReportRates.cc \
+           MReportTemperatures.cc \
+           MReportHumidity.cc
+
 
 ############################################################
Index: trunk/Mars/mreport/ReportLinkDef.h
===================================================================
--- trunk/Mars/mreport/ReportLinkDef.h	(revision 12860)
+++ trunk/Mars/mreport/ReportLinkDef.h	(revision 12861)
@@ -16,7 +16,10 @@
 #pragma link C++ class MReportCamera+;
 #pragma link C++ class MReportTrigger+;
-#pragma link C++ class MReportRates+;
 #pragma link C++ class MReportCurrents+;
 #pragma link C++ class MReportPyrometer+;
+
+#pragma link C++ class MReportRates+;
+#pragma link C++ class MReportHumidity+;
+#pragma link C++ class MReportTemperatures+;
 
 #pragma link C++ class MReportHelp+;
