Index: trunk/MagicSoft/Mars/mhist/HistLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 1711)
+++ trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 1715)
@@ -17,4 +17,6 @@
 #pragma link C++ class MHFadcCam+;
 #pragma link C++ class MHFadcPix+;
+
+#pragma link C++ class MHCerPhotEvt+;
 
 #pragma link C++ class MHHillas+;
@@ -48,5 +50,5 @@
 #pragma link C++ class MHMcEnergyImpact+;
 #pragma link C++ class MHMcCollectionArea+;
-# pragma link C++ class MHMcEnergyMigration+;
+#pragma link C++ class MHMcEnergyMigration+;
 
 #endif
Index: trunk/MagicSoft/Mars/mhist/MFillH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 1711)
+++ trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 1715)
@@ -400,9 +400,10 @@
     if (fParContainerName.IsNull())
     {
-        fParContainer = pList;
+        fParContainer = NULL; 
         return kTRUE;
     }
 
     fParContainer = (MParContainer*)pList->FindObject(fParContainerName);
+
     if (fParContainer)
         return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 1715)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 1715)
@@ -0,0 +1,101 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  12/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MHCerPhotEvt
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MHCerPhotEvt.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MParList.h"
+#include "MCerPhotEvt.h"
+
+ClassImp(MHCerPhotEvt);
+
+// --------------------------------------------------------------------------
+//
+// Setup four histograms for Width, Length
+//
+MHCerPhotEvt::MHCerPhotEvt(const char *name, const char *title)
+    : fEvt(NULL)
+{
+    //
+    //   set the name and title of this object
+    //
+    fName  = name  ? name  : "MHCerPhotEvt";
+    fTitle = title ? title : "Sum up camera events";
+
+    fSum.InitSize(577);
+    for (int i=0; i<577; i++)
+        fSum.AddPixel(i, 0, 0);
+}
+
+// --------------------------------------------------------------------------
+//
+// Setup the Binning for the histograms automatically if the correct
+// instances of MBinning (with the names 'BinningWidth' and 'BinningLength')
+// are found in the parameter list
+// Use this function if you want to set the conversion factor which
+// is used to convert the mm-scale in the camera plain into the deg-scale
+// used for histogram presentations. The conversion factor is part of
+// the camera geometry. Please create a corresponding MGeomCam container.
+//
+Bool_t MHCerPhotEvt::SetupFill(const MParList *plist)
+{
+    fEvt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
+    if (!fEvt)
+        *fLog << warn << GetDescriptor() << ": No MCerPhotEvt available..." << endl;
+
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Fill the histograms with data from a MHillas-Container.
+// Be careful: Only call this with an object of type MHillas
+//
+Bool_t MHCerPhotEvt::Fill(const MParContainer *par)
+{
+    const MCerPhotEvt *evt = par ? (MCerPhotEvt*)par : fEvt;
+    if (!evt)
+    {
+        *fLog << err << dbginf << "No MCerPhotEvt found..." << endl;
+        return kFALSE;
+    }
+
+    const UInt_t n = evt->GetNumPixels();
+
+    for (UInt_t i=0; i<n; i++)
+    {
+        const MCerPhotPix &pix = (*evt)[i];
+
+        fSum[pix.GetPixId()].AddNumPhotons(pix.GetNumPhotons());
+    }
+    return kTRUE;
+}
+
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 1715)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 1715)
@@ -0,0 +1,33 @@
+#ifndef MARS_MHCerPhotEvt
+#define MARS_MHCerPhotEvt
+
+#ifndef MARS_MH
+#include "MH.h"
+#endif
+
+#ifndef MARS_MCerPhotEvt
+#include "MCerPhotEvt.h"
+#endif
+
+class TH1D;
+
+class MHCerPhotEvt : public MH
+{
+private:
+    MCerPhotEvt  fSum;
+    MCerPhotEvt *fEvt; //!
+
+public:
+    MHCerPhotEvt(const char *name=NULL, const char *title=NULL);
+
+    Bool_t SetupFill(const MParList *pList);
+    Bool_t Fill(const MParContainer *par);
+
+    TH1 *GetHistByName(const TString name) { return NULL; }
+
+    const MCerPhotEvt &GetSum() const { return fSum; }
+
+    ClassDef(MHCerPhotEvt, 1) // Container which holds histograms for the source independent image parameters
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mhist/MHHillasExt.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasExt.cc	(revision 1711)
+++ trunk/MagicSoft/Mars/mhist/MHHillasExt.cc	(revision 1715)
@@ -179,5 +179,5 @@
     const MHillasSrc *src = (MHillasSrc*)par;
 
-    const Double_t scale = src ? TMath::Sign(fUseMmScale?1:fMm2Deg, src->GetCosDeltaAlpha()) : 1;
+    const Double_t scale = TMath::Sign(fUseMmScale?1:fMm2Deg, src ? src->GetCosDeltaAlpha() : 1);
 
     fHConc.Fill(fHillasExt->GetConc());
Index: trunk/MagicSoft/Mars/mhist/MHStarMap.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 1711)
+++ trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 1715)
@@ -68,4 +68,6 @@
     fTitle = title ? title : "Container for a Star Map" ;
 
+    *fLog << warn << "WARNING - Using MHStarMap doesn't take care of the Source Position!" << endl;
+
     //
     //   loop over all Pixels and create two histograms
Index: trunk/MagicSoft/Mars/mhist/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhist/Makefile	(revision 1711)
+++ trunk/MagicSoft/Mars/mhist/Makefile	(revision 1715)
@@ -34,4 +34,5 @@
            MHArray.cc \
            MH3.cc \
+           MHCerPhotEvt.cc \
            MHMatrix.cc \
            MHFadcPix.cc \
@@ -82,12 +83,2 @@
 
 # @endcode
-
-
-
-
-
-
-
-
-
-
