Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2419)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2421)
@@ -818,12 +818,14 @@
 // ------------------------------------------------------------------------
 //
-// Fill the colors in respect to the cleaning levels
-//
-void MHCamera::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2)
+// The array must be in increasing order, eg: 2.5, 3.7, 4.9
+// The values in each bin are replaced by the interval in which the value
+// fits. In the example we have four intervals
+// (<2.5, 2.5-3.7, 3.7-4.9, >4.9). Maximum and minimum are set
+// accordingly.
+//
+void MHCamera::SetLevels(const TArrayF &arr)
 {
     if (fNcells<=1)
         return;
-
-    SetCamContent(event, 2);
 
     for (Int_t i=0; i<fNcells-2; i++)
@@ -832,21 +834,12 @@
             continue;
 
-        if (fArray[i+1]>lvl1)
-            fArray[i+1] = 0;
-        else
-            if (fArray[i+1]>lvl2)
-                fArray[i+1] = 1;
-            else
-                fArray[i+1] = 2;
-    }
-}
-
-// ------------------------------------------------------------------------
-//
-// Fill the colors in respect to the cleaning levels
-//
-void MHCamera::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean)
-{
-    FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2());
+        Int_t j = arr.GetSize();
+        while (j && fArray[i+1]<arr[j-1])
+            j--;
+
+        fArray[i+1] = j;
+    }
+    SetMaximum(arr.GetSize());
+    SetMinimum(0);
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2419)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2421)
@@ -138,6 +138,5 @@
     Double_t GetMaximum() const { return GetMaximum(0/*kTRUE*/); }
 
-    void  FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2);
-    void  FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean);
+    void SetLevels(const TArrayF &arr);
 
     void  FillRandom(const char *fname, Int_t ntimes=5000) { TH1::FillRandom(fname, ntimes); }
@@ -152,4 +151,5 @@
     void  Reset() { Reset(""); } // *MENU*
     TH1  *DrawCopy() const/* { gPad=NULL; return TH1D::DrawCopy(); }*/; // *MENU*
+    TH1  *DrawCopy(Option_t *o) const { return TH1D::DrawCopy(o); }
 
     void  Print(Option_t *) const;
Index: trunk/MagicSoft/Mars/mhist/MHMatrix.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2419)
+++ trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2421)
@@ -126,10 +126,9 @@
 //
 Bool_t MHMatrix::SetNumRow(Int_t row) 
-    {
-      if (row>=fM.GetNrows() || row<0) return kFALSE; 
-      fRow = row; 
-      return kTRUE; 
-    }
-
+{
+    if (row>=fM.GetNrows() || row<0) return kFALSE;
+    fRow = row;
+    return kTRUE;
+}
 
 // --------------------------------------------------------------------------
@@ -1191,3 +1190,2 @@
     return kTRUE;
 }
-
