Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 8434)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 8484)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.103 2007-04-20 08:55:19 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.104 2007-05-10 12:14:54 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -514,4 +514,34 @@
 // ------------------------------------------------------------------------
 //
+// Return the number of bins (excluding under- and overflow) for which
+// GetBinContent returns a value > t
+//
+Int_t MHCamera::GetNumBinsAboveThreshold(Double_t t) const
+{
+    Int_t n = 0;
+    for (Int_t i=0; i<fNcells-2; i++)
+        if (GetBinContent(i+1)>t)
+            n++;
+
+    return n;
+}
+
+// ------------------------------------------------------------------------
+//
+// Return the number of bins (excluding under- and overflow) for which
+// GetBinContent returns a value < t
+//
+Int_t MHCamera::GetNumBinsBelowThreshold(Double_t t) const
+{
+    Int_t n = 0;
+    for (Int_t i=0; i<fNcells-2; i++)
+        if (GetBinContent(i+1)>t)
+            n++;
+
+    return n;
+}
+
+// ------------------------------------------------------------------------
+//
 // Call this function to draw the camera layout into your canvas.
 // Setup a drawing canvas. Add this object and all child objects
Index: trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 8434)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 8484)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-!  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.63 2007-02-01 14:42:02 tbretz Exp $
+!  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.64 2007-05-10 12:14:54 tbretz Exp $
 \* ======================================================================== */
 #ifndef MARS_MHCamera
@@ -40,4 +40,6 @@
 public:
     enum {
+        // DO NOT USE BIT(14) (MStatusArray WORKAROUND!)
+        // BIT(15)/BIT(16)/BIT(17) used by TH1
         kProfile            = BIT(18), // FIXME: When changing change max/min!
         kFreezed            = BIT(19),
@@ -45,5 +47,5 @@
         kNoScale            = BIT(21),
         kNoUnused           = BIT(22),
-        kErrorMean          = BIT(23)/*,
+        kErrorMean          = BIT(23)/*,  // NO MORE BITS ALLOWED!
         kSqrtVariance       = BIT(21),
         kSinglePixelProfile = BIT(22)*/
@@ -197,4 +199,7 @@
     Double_t GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
     Double_t GetMaximumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
+
+    Int_t    GetNumBinsAboveThreshold(Double_t t=0) const;
+    Int_t    GetNumBinsBelowThreshold(Double_t t=0) const;
 
     void     SetLevels(const TArrayF &arr);
