Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1598)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1599)
@@ -1,10 +1,27 @@
                                                                   -*-*- END -*-*-
+
+ 2002/11/11: Thomas Bretz
+
+   * manalysis/MHillas.cc:
+     - moved division by size before test of number of used pixels
+
+   * mfileio/MCT1ReadPreProc.cc:
+     - added a eof-conditional
+
+   * mhist/MH3.cc:
+     - added a 'nonew' option to DrawClone
+
+   * mhist/MHHadronness.cc:
+     - check for NaN in Fill
+
+
+
  2002/11/08: Oscar Blanch
 
    * mgeom/MGeomPMT.[h,cc]:
      - added
-     - Infromation about simulated QE
-
-   * mgeom/MGeomMirror.[h,cc];
+     - Information about simulated QE
+
+   * mgeom/MGeomMirror.[h,cc]:
      - added
      - Mirrors properties
@@ -13,9 +30,11 @@
      - modified to compile new classes
 
-   * mmc/MMcConfigRunHeader.[h,cc]
-     -added
-
-   *mmc/Makefile
-     -modified to compile new classes
+   * mmc/MMcConfigRunHeader.[h,cc]:
+     - added
+
+   * mmc/Makefile:
+     - modified to compile new classes
+
+
 
  2002/11/08: Thomas Bretz
Index: trunk/MagicSoft/Mars/manalysis/MHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillas.cc	(revision 1598)
+++ trunk/MagicSoft/Mars/manalysis/MHillas.cc	(revision 1599)
@@ -289,4 +289,7 @@
     }
 
+    fMeanX /= fSize;                                 // [mm]
+    fMeanY /= fSize;                                 // [mm]
+
     if (fNumUsedPixels<3)
     {
@@ -294,7 +297,4 @@
         return 3;
     }
-
-    fMeanX /= fSize;                                 // [mm]
-    fMeanY /= fSize;                                 // [mm]
 
     //
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1598)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1599)
@@ -732,4 +732,7 @@
     fIn->read((Byte_t*)&event, size1+size2);
 
+    if (fIn->eof())
+        return kFALSE;
+
     ProcessEvent(event);
 
Index: trunk/MagicSoft/Mars/mhist/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH3.cc	(revision 1598)
+++ trunk/MagicSoft/Mars/mhist/MH3.cc	(revision 1599)
@@ -420,12 +420,16 @@
 TObject *MH3::DrawClone(Option_t *opt) const
 {
-    TCanvas &c = *MH::MakeDefCanvas(fHist);
-
-    //
-    // This is necessary to get the expected bahviour of DrawClone
-    //
-    gROOT->SetSelectedPad(NULL);
-
     TString str(opt);
+
+    TVirtualPad *c = gPad;
+    if (!str.Contains("nonew", TString::kIgnoreCase))
+    {
+        c = MH::MakeDefCanvas(fHist);
+
+        //
+        // This is necessary to get the expected bahviour of DrawClone
+        //
+        gROOT->SetSelectedPad(NULL);
+    }
 
     if (str.Contains("COL", TString::kIgnoreCase))
@@ -439,4 +443,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s");
+        p->SetLineColor(kBlue);
         p->Draw(only?"":"same");
         p->SetBit(kCanDelete);
@@ -446,4 +451,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s");
+        p->SetLineColor(kBlue);
         p->Draw(only?"":"same");
         p->SetBit(kCanDelete);
@@ -451,12 +457,12 @@
     }
 
-    if (fHist->TestBit(kIsLogx)) c.SetLogx();
-    if (fHist->TestBit(kIsLogy)) c.SetLogy();
-    if (fHist->TestBit(kIsLogz)) c.SetLogz();
-
-    c.Modified();
-    c.Update();
-
-    return &c;
+    if (fHist->TestBit(kIsLogx)) c->SetLogx();
+    if (fHist->TestBit(kIsLogy)) c->SetLogy();
+    if (fHist->TestBit(kIsLogz)) c->SetLogz();
+
+    c->Modified();
+    c->Update();
+
+    return c;
 }
 
@@ -493,4 +499,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s");
+        p->SetLineColor(kBlue);
         p->Draw(only?"":"same");
         p->SetBit(kCanDelete);
@@ -500,4 +507,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s");
+        p->SetLineColor(kBlue);
         p->Draw(only?"":"same");
         p->SetBit(kCanDelete);
Index: trunk/MagicSoft/Mars/mhist/MHHadronness.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1598)
+++ trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1599)
@@ -182,10 +182,20 @@
 // histogram dependant on the particle id.
 //
+// Sometimes a distance is calculated as NaN (not a number). Such events
+// are skipped at the moment.
+//
 Bool_t MHHadronness::Fill(const MParContainer *par)
 {
+    // Preliminary Workaround: FIXME!
+
+    const Double_t h = fHadronness->GetHadronness();
+
+    if (TMath::IsNaN(h))
+        return kCONTINUE;
+
     if (fMcEvt->GetPartId()==kGAMMA)
-        fGhness->Fill(fHadronness->GetHadronness());
+        fGhness->Fill(h);
     else
-        fPhness->Fill(fHadronness->GetHadronness());
+        fPhness->Fill(h);
 
     return kTRUE;
