Index: trunk/MagicSoft/Mars/mgui/MCamEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamEvent.cc	(revision 6975)
+++ trunk/MagicSoft/Mars/mgui/MCamEvent.cc	(revision 7349)
@@ -55,2 +55,22 @@
     InitSize(geom.GetNumPixels());
 }
+
+// --------------------------------------------------------------------------
+//
+// Return the mean of all corresponding GetPixelContent
+//
+Double_t MCamEvent::GetCameraMean(const MGeomCam &cam, Int_t type) const
+{
+    Int_t    num  = 0;
+    Double_t mean = 0;
+    for (unsigned int i=0; i<cam.GetNumPixels(); i++)
+    {
+        Double_t val;
+        if (!GetPixelContent(val, i, cam, type))
+            continue;
+
+        mean += val;
+        num ++;
+    }
+    return num == 0 ? 0 : mean/num;
+}
Index: trunk/MagicSoft/Mars/mgui/MCamEvent.h
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamEvent.h	(revision 6975)
+++ trunk/MagicSoft/Mars/mgui/MCamEvent.h	(revision 7349)
@@ -17,4 +17,6 @@
     virtual void   InitSize(const UInt_t i) { } // Used by MGeomApply see Init()
 
+    virtual Double_t GetCameraMean(const MGeomCam &cam, Int_t type=0) const;
+
     ClassDef(MCamEvent, 0) // A camera event
 };
