Index: trunk/MagicSoft/Mars/manalysis/MHillasSrc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillasSrc.cc	(revision 1488)
+++ trunk/MagicSoft/Mars/manalysis/MHillasSrc.cc	(revision 1489)
@@ -69,5 +69,5 @@
 {
     fName  = name  ? name  : "MHillasSrc";
-    fTitle = title ? title : "parameters depending in source position";
+    fTitle = title ? title : "Parameters depending in source position";
 }
 
Index: trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc	(revision 1488)
+++ trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc	(revision 1489)
@@ -52,4 +52,5 @@
 #include "MParList.h"
 #include "MDataChain.h"
+#include "MDataArray.h"
 
 #include "MHadroness.h"
@@ -65,5 +66,5 @@
 //
 MMultiDimDistCalc::MMultiDimDistCalc(const char *name, const char *title)
-    : fNum(0), fUseKernel(kFALSE)
+    : fNum(0), fUseKernel(kFALSE), fData(NULL)
 {
     //
@@ -73,6 +74,8 @@
     fTitle = title ? title : gsDefTitle.Data();
 
-    fData = new TList;
-    fData->SetOwner();
+    /*
+     fData = new TList;
+     fData->SetOwner();
+     */
 }
 
@@ -83,5 +86,5 @@
 MMultiDimDistCalc::~MMultiDimDistCalc()
 {
-    delete fData;
+    //    delete fData;
 }
 
@@ -119,4 +122,5 @@
     }
 
+    /*
     TIter Next(fMGammas->GetRules());
     TObject *data=NULL;
@@ -130,4 +134,17 @@
         }
         fData->Add(chain);
+    }
+    */
+    fData = fMGammas->GetColumns();
+    if (!fData)
+    {
+        *fLog << err << dbginf << "Error matrix doesn't contain columns... aborting." << endl;
+        return kFALSE;
+    }
+
+    if (!fData->PreProcess(plist))
+    {
+        *fLog << err << dbginf << "PreProcessing of the MDataArray failed for the columns failed... aborting." << endl;
+        return kFALSE;
     }
 
@@ -156,4 +173,8 @@
     TVector event(ncols);
 
+    for (int i=0; i<fData->GetNumEntries(); i++)
+        event(i) = (*fData)(i);
+
+    /*
     Int_t n=0;
     TIter Next(fData);
@@ -161,4 +182,5 @@
     while ((data=(MData*)Next()))
         event(n++) = data->GetValue();
+        */
 
     Double_t numg = fNum;
Index: trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h	(revision 1488)
+++ trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h	(revision 1489)
@@ -9,4 +9,5 @@
 class MParList;
 class MHadroness;
+class MDataArray;
 
 class MMultiDimDistCalc : public MTask
@@ -21,5 +22,5 @@
     MHadroness *fHadroness; //! Output container for calculated hadroness
 
-    TList *fData;           //! Used to store the MDataChains to get the event values
+    MDataArray *fData;      //! Used to store the MDataChains to get the event values
 
     void StreamPrimitive(ofstream &out) const;
