Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2798)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2799)
@@ -8,20 +8,18 @@
  2004/01/14: Wolfgang Wittek
 
-   * macros/ONOFFAnalysis.C
+   * macros/ONOFFAnalysis.C:
      - current version
 
-   * mhist/MHSigmaTheta.[h,cc]
+   * mhist/MHSigmaTheta.[h,cc]:
      - replace MPedestalCam by MPedPhotCam
 
-   * manalysis/MPad.[h,cc]
-               MSigmabar.[h,cc]
-               MSigmabarCalc.[h,cc]
-               MCT1PadONOFF.[h,cc]
-               MCT1PadSchweizer.[h,cc]
-               MPadding.[h,cc]
+   * manalysis/MPad.[h,cc], manalysus/MSigmabar.[h,cc],
+     manalysus/MSigmabarCalc.[h,cc], manalysus/MCT1PadONOFF.[h,cc],
+     manalysus/MCT1PadSchweizer.[h,cc], manalysus/MPadding.[h,cc]:
      - replace MPedestalCam by MPedPhotCam
 
    * manalysis/MPedPhotPix.[h,cc]
      - uncomment SetRms()
+
 
 
@@ -43,6 +41,5 @@
        in single photo-electron peak
 
-   * mcalib/MCalibrationFits.h
-   * mcalib/MHCalibrationBlindPixel.[h.cc]
+   * mcalib/MCalibrationFits.h, mcalib/MHCalibrationBlindPixel.[h.cc]
      - fit now with fixed normalization
 
@@ -67,4 +64,6 @@
      - took out some unused code
      - some default axis labelling corrected
+
+
 
  2004/01/13: Abelardo Moralejo
Index: /trunk/MagicSoft/Mars/mreport/MReportHelp.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportHelp.cc	(revision 2799)
+++ /trunk/MagicSoft/Mars/mreport/MReportHelp.cc	(revision 2799)
@@ -0,0 +1,167 @@
+/* ======================================================================== *\
+!
+! *
+! * 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, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MReportHelp
+//
+// This is a wrapper class for MReport derived files. It provides root-like
+// access to the identifier of the report, such that this identifiers can
+// be used in hast tables to be able to speed up access to the class
+// corresponding to a report identifier. It also provides access to the
+// class by the name of the identifier.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MReportHelp.h"
+
+#include <TROOT.h>  // gROOT->GeClass
+#include <TClass.h> // TClass
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MReport.h"
+#include "MParList.h"
+
+ClassImp(MReportHelp);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Construtor. Takes the name of the MReport-class (eg MReportDrive) and
+// a log-stream as an argument. The log-stream is used for output in the
+// constructor  An instance of the MReport-class is created using its
+// default constructor.
+//
+MReportHelp::MReportHelp(const char *name, MLog *fLog) : fReport(NULL), fNumReports(0)
+{
+    TClass *cls = gROOT->GetClass(name);
+    Int_t rc = 0;
+    if (!cls)
+        rc =1;
+    else
+    {
+        if (!cls->Property())
+            rc = 5;
+        if (!cls->Size())
+            rc = 4;
+        if (!cls->IsLoaded())
+            rc = 3;
+        if (!cls->HasDefaultConstructor())
+            rc = 2;
+    }
+
+    if (rc)
+    {
+        *fLog << err << dbginf << "Cannot create new instance of class '" << name << "': ";
+        switch (rc)
+        {
+        case 1:
+            *fLog << "gROOT->GetClass() returned NULL." << endl;
+            return;
+        case 2:
+            *fLog << "no default constructor." << endl;
+            return;
+        case 3:
+            *fLog << "not loaded." << endl;
+            return;
+        case 4:
+            *fLog << "zero size." << endl;
+            return;
+        case 5:
+            *fLog << "no property." << endl;
+            return;
+        }
+    }
+
+    //
+    // create the parameter container of the the given class type
+    //
+    fReport = (MReport*)cls->New();
+}
+
+// --------------------------------------------------------------------------
+//
+// The instance of the MReport-class is deleted
+//
+MReportHelp::~MReportHelp()
+{
+    if (fReport)
+        delete fReport;
+}
+
+// --------------------------------------------------------------------------
+//
+// Return the Identifier ("DRIVE-REPORT") as name. This allows
+// calling FindObject("[identifier]") in lists.
+//
+const char *MReportHelp::GetName() const
+{
+    return fReport->GetIdentifier();
+}
+
+// --------------------------------------------------------------------------
+//
+// Return the Identifier ("DRIVE-REPORT") hash value as hash value. This
+// allows faster access b usage of a THashTable
+//
+ULong_t MReportHelp::Hash() const
+{
+    return fReport->GetIdentifier().Hash();
+}
+
+// --------------------------------------------------------------------------
+//
+// Calls the Interprete function of the report and counts the number of
+// successfull interpretations.
+//
+Int_t MReportHelp::Interprete(TString &str, const MTime &start, const MTime &stop)
+{
+    const Int_t rc = fReport->Interprete(str, start, stop);
+
+    if (rc==kFALSE)
+        return kFALSE;
+
+    fNumReports++;
+    return rc;
+}
+
+// --------------------------------------------------------------------------
+//
+// Calls the Setip function for reading of the report
+//
+Bool_t MReportHelp::SetupReading(MParList &plist)
+{
+    return fReport->SetupReading(plist);
+}
+
+// --------------------------------------------------------------------------
+//
+// Add the report to the given parameter list.
+//
+void MReportHelp::AddToList(MParList &plist)
+{
+    plist.AddToList(fReport);
+}
Index: /trunk/MagicSoft/Mars/mreport/MReportHelp.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportHelp.h	(revision 2799)
+++ /trunk/MagicSoft/Mars/mreport/MReportHelp.h	(revision 2799)
@@ -0,0 +1,39 @@
+#ifndef MARS_MReportHelp
+#define MARS_MReportHelp
+
+#ifndef ROOT_TObject
+#include <TObject.h>
+#endif
+
+class TString;
+
+class MLog;
+class MTime;
+class MReport;
+class MParList;
+
+class MReportHelp : public TObject
+{
+private:
+    MReport *fReport;
+    ULong_t  fNumReports;
+
+public:
+    MReportHelp(const char *name, MLog *fLog);
+    ~MReportHelp();
+
+    const char *GetName() const;
+    ULong_t GetNumReports() const { return fNumReports; }
+    ULong_t Hash() const;
+    MReport *GetReport() { return fReport; }
+
+    Int_t Interprete(TString &str, const MTime &start, const MTime &stop);
+
+    Bool_t SetupReading(MParList &plist);
+    
+    void AddToList(MParList &plist);
+
+    ClassDef(MReportHelp, 0) // Wrapper class for MReport to speed up finding the correct MReport-class
+};
+
+#endif
