Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8932)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8933)
@@ -18,4 +18,28 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+
+ 2008/06/10 Thomas Bretz
+
+   * mreport/MReportPyrometer.[h,cc]:
+     - added
+
+   * mreport/Makefile, mreport/ReportLinkDef.h:
+     - added MReportPyrometer
+
+   * mreport/MReportRun.cc:
+     - removed obsolete include of MAstro
+
+   * merpp.cc:
+     - added Pyrometer information
+
+   * mfileio/MWriteRootFile.h:
+     - added new member function AddTree to add a container with the
+       corresponding time-stamp
+
+   * mjobs/MCalibrateSignal.cc, mjobs/MJStar.cc:
+     - replaced some AddContainer by the new AddTree
+     - added Pyrometer information to in- and output, respectively
+
 
 
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 8932)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 8933)
@@ -56,5 +56,5 @@
 
    * The liniking of the shared object is now done into a file defined
-     by ´mktemp´. This should be a local file system which accelerates
+     by 'mktemp'. This should be a local file system which accelerates
      liniking a lot.
 
@@ -64,4 +64,7 @@
 
    * Implemented cc file version 2008-20-02/0
+
+   * Added Pyroemeter information to output (stored in a new Tree
+     Pyrometer, needs a complete new merpp, i.e. new calibration)
 
  ;callisto
Index: /trunk/MagicSoft/Mars/merpp.cc
===================================================================
--- /trunk/MagicSoft/Mars/merpp.cc	(revision 8932)
+++ /trunk/MagicSoft/Mars/merpp.cc	(revision 8933)
@@ -357,4 +357,6 @@
             w->AddContainer("MReportStarguider",  "Starguider");
             w->AddContainer("MTimeStarguider",    "Starguider");
+            w->AddContainer("MReportPyrometer",   "Pyrometer");
+            w->AddContainer("MTimePyrometer",     "Pyrometer");
             // w->AddContainer("MReportDAQ",         "DAQ");
             // w->AddContainer("MTimeDAQ",           "DAQ");
@@ -379,4 +381,5 @@
             r->AddToList("MReportTrigger");
             r->AddToList("MReportStarguider");
+            r->AddToList("MReportPyrometer");
             if (kRunNumber>0)
             {
Index: /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 8932)
+++ /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 8933)
@@ -133,4 +133,10 @@
     void AddCopySource(const char *tname, const char *bname=NULL);
 
+    void AddTree(const char *name, Bool_t force=kTRUE)
+    {
+        AddContainer(Form("MReport%s", name), name, force);
+        AddContainer(Form("MTime%s", name),   name, force);
+    }
+
     void Print(Option_t *t=NULL) const;
 
Index: /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8932)
+++ /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8933)
@@ -707,26 +707,21 @@
     write.AddContainer("MTriggerPattern",           "Events");
 
+    // Trees with slow-control information (obsolete
+    //  if we don't read merpped root-files)
+    write.AddTree("Trigger",    kFALSE);
+    write.AddTree("Drive",      kFALSE);
+    write.AddTree("CC",         kFALSE);
+    write.AddTree("Pyrometer",  kFALSE);
+    write.AddTree("Currents",   kFALSE);
+    write.AddTree("Camera",     kFALSE);
     // Slow-Control: Current-tree
-    write.AddContainer("MTimeCurrents",             "Currents",   kFALSE);
-    write.AddContainer("MCameraDC",                 "Currents",   kFALSE);
-    write.AddContainer("MReportCurrents",           "Currents",   kFALSE);
+    write.AddContainer("MCameraDC",          "Currents",   kFALSE);
     // Slow-Control: Camera-tree
-    write.AddContainer("MReportCamera",             "Camera",     kFALSE);
-    write.AddContainer("MTimeCamera",               "Camera",     kFALSE);
-    write.AddContainer("MCameraAUX",                "Camera",     kFALSE);
-    write.AddContainer("MCameraCalibration",        "Camera",     kFALSE);
-    write.AddContainer("MCameraCooling",            "Camera",     kFALSE);
-    write.AddContainer("MCameraHV",                 "Camera",     kFALSE);
-    write.AddContainer("MCameraLV",                 "Camera",     kFALSE);
-    write.AddContainer("MCameraLids",               "Camera",     kFALSE);
-    // Slow-Control: Trigger-tree
-    write.AddContainer("MReportTrigger",            "Trigger",    kFALSE);
-    write.AddContainer("MTimeTrigger",              "Trigger",    kFALSE);
-    // Slow-Control: Drive-tree
-    write.AddContainer("MReportDrive",              "Drive",      kFALSE);
-    write.AddContainer("MTimeDrive",                "Drive",      kFALSE);
-    // Slow-Control: Central Control-tree
-    write.AddContainer("MReportCC",                 "CC",         kFALSE);
-    write.AddContainer("MTimeCC",                   "CC",         kFALSE);
+    write.AddContainer("MCameraAUX",         "Camera",     kFALSE);
+    write.AddContainer("MCameraCalibration", "Camera",     kFALSE);
+    write.AddContainer("MCameraCooling",     "Camera",     kFALSE);
+    write.AddContainer("MCameraHV",          "Camera",     kFALSE);
+    write.AddContainer("MCameraLV",          "Camera",     kFALSE);
+    write.AddContainer("MCameraLids",        "Camera",     kFALSE);
 
     // Write the special MC tree
Index: /trunk/MagicSoft/Mars/mjobs/MJStar.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 8932)
+++ /trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 8933)
@@ -188,4 +188,5 @@
     readreal.AddTree("CC");
     readreal.AddTree("Trigger");
+    readreal.AddTree("Pyrometer");
     readreal.AddFiles(iter);
 
@@ -330,14 +331,12 @@
     else
     {
-        write.AddContainer("MTime",                 "Events");
-        // Drive
-        write.AddContainer("MReportDrive",          "Drive");
-        write.AddContainer("MTimeDrive",            "Drive");
-        // Starguider
-        write.AddContainer("MReportStarguider",     "Starguider", kFALSE);
-        write.AddContainer("MTimeStarguider",       "Starguider", kFALSE);
-        // Effective On Time
-        writet.AddContainer("MEffectiveOnTime",     "EffectiveOnTime");
-        writet.AddContainer("MTimeEffectiveOnTime", "EffectiveOnTime");
+        // Event time
+        write.AddContainer("MTime", "Events");
+
+        // Slow-control trees with time information
+        write.AddTree("Drive");
+        write.AddTree("Starguider", kFALSE);
+        write.AddTree("Pyrometer",  kFALSE);
+        writet.AddTree("EffectiveOnTime");
     }
 
Index: /trunk/MagicSoft/Mars/mreport/MReportPyrometer.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportPyrometer.cc	(revision 8933)
+++ /trunk/MagicSoft/Mars/mreport/MReportPyrometer.cc	(revision 8933)
@@ -0,0 +1,76 @@
+/* ======================================================================== *\
+!
+! *
+! * 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, 6/2008 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2008
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MReportPyrometer
+//
+// This is the class interpreting and storing the PYRO-REPORT information.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MReportPyrometer.h"
+
+#include "MLogManip.h"
+
+ClassImp(MReportPyrometer);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default construtor. Initialize identifier to "RUN-REPORT" No subsystem
+// is expected.
+//
+MReportPyrometer::MReportPyrometer() : MReport("PYRO-REPORT", kFALSE),
+    fTempSky(-1), fTempAir(-1), fCloudiness(-1), fLidOpen(kFALSE)
+
+{
+    fName  = "MReportPyrometer";
+    fTitle = "Class for PYRO-REPORT information";
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the body of the RUN-REPORT string
+//
+Int_t MReportPyrometer::InterpreteBody(TString &str, Int_t ver)
+{
+    str = str.Strip(TString::kBoth);
+
+    Int_t status, len;
+
+    const Int_t n=sscanf(str.Data(), "%f %f %d %f %n",
+                         &fTempSky, &fCloudiness, &status, &fTempAir, &len);
+    if (n!=4)
+    {
+        *fLog << warn << "WARNING - Wrong number of arguments." << endl;
+        return kCONTINUE;
+    }
+
+    fLidOpen = status>0;
+
+    str.Remove(0, len);
+
+    return str.Strip(TString::kBoth).IsNull() ? kTRUE : kCONTINUE;
+}
Index: /trunk/MagicSoft/Mars/mreport/MReportPyrometer.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportPyrometer.h	(revision 8933)
+++ /trunk/MagicSoft/Mars/mreport/MReportPyrometer.h	(revision 8933)
@@ -0,0 +1,32 @@
+#ifndef MARS_MReportPyrometer
+#define MARS_MReportPyrometer
+
+#ifndef MARS_MReport
+#include "MReport.h"
+#endif
+
+class MReportPyrometer : public MReport
+{
+private:
+    Float_t fTempSky;     // [K] Temperature Sky
+    Float_t fTempAir;     // [K] Tempareture Air
+    Float_t fCloudiness;  // [%] Cloudiness
+
+    Bool_t  fLidOpen;     //     Lid Status
+
+    Int_t InterpreteBody(TString &str, Int_t ver);
+
+public:
+    MReportPyrometer();
+
+    Float_t GetTempSky() const { return fTempSky; }
+    Float_t GetTempAir() const { return fTempAir; }
+
+    Float_t GetCloudiness() const { return fCloudiness; }
+
+    Bool_t IsLidOpen() const { return fLidOpen; }
+
+    ClassDef(MReportPyrometer, 1) // Class for PYRO-REPORT information
+};
+
+#endif
Index: /trunk/MagicSoft/Mars/mreport/MReportRun.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportRun.cc	(revision 8932)
+++ /trunk/MagicSoft/Mars/mreport/MReportRun.cc	(revision 8933)
@@ -35,6 +35,4 @@
 
 #include "MLogManip.h"
-
-#include "MAstro.h"
 
 ClassImp(MReportRun);
Index: /trunk/MagicSoft/Mars/mreport/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mreport/Makefile	(revision 8932)
+++ /trunk/MagicSoft/Mars/mreport/Makefile	(revision 8933)
@@ -33,5 +33,7 @@
            MReportFileRead.cc \
            MReportFileReadCC.cc \
-           MReportStarguider.cc
+           MReportStarguider.cc \
+           MReportPyrometer.cc
+
 ############################################################
 
Index: /trunk/MagicSoft/Mars/mreport/ReportLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/ReportLinkDef.h	(revision 8932)
+++ /trunk/MagicSoft/Mars/mreport/ReportLinkDef.h	(revision 8933)
@@ -15,4 +15,5 @@
 #pragma link C++ class MReportTrigger+;
 #pragma link C++ class MReportCurrents+;
+#pragma link C++ class MReportPyrometer+;
 
 #pragma link C++ class MReportHelp+;
