Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1659)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1660)
@@ -4,4 +4,7 @@
    * mbase/MAGIC.h, mbase/MEvtLoop.[h,cc], MTask.cc, MTaskList.cc:
      - introduced kERROR to stop an eventloop with an error
+
+   * manalysis/MMultiDimDistCalc.cc:
+     - introduced usage of kERROR in case the matrix is not posdef.
 
    * macros/collarea.C:
Index: trunk/MagicSoft/Mars/macros/collarea.C
===================================================================
--- trunk/MagicSoft/Mars/macros/collarea.C	(revision 1659)
+++ trunk/MagicSoft/Mars/macros/collarea.C	(revision 1660)
@@ -24,5 +24,5 @@
 
 
-void collarea(char *filename = "data/camera.root", char *outname = "")
+void collarea(TString filename="camera.root", TString outname="")
 { 
     //
@@ -68,15 +68,15 @@
 
 
-    // Write histogram to a file in case an output filename has been supplied:
+    //
+    // Write histogram to a file in case an output
+    // filename has been supplied
+    //
+    if (outname.IsNull())
+        return;
 
-    if (strlen(outname) > 0)
-      {
-	TFile* f = new TFile(outname,"recreate");
-	if (f)
-	  {
-	    TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist();
-	    hc->Write();
-	    f.Close();
-	  }
-      }
+    TFile f(outname, "recreate");
+    if (!f)
+        return;
+
+    parlist.FindObject("MHMcCollectionArea")->Write();
 }
Index: trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc	(revision 1659)
+++ trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc	(revision 1660)
@@ -205,5 +205,5 @@
     {
         *fLog << err << "MHMatrix::CalcDist failed (dg=" << dg << ", dh=" << dh << ")... aborting" << endl;
-        return kFALSE;
+        return kERROR;
     }
 
