Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2818)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2819)
@@ -41,4 +41,5 @@
    * mhist/MHCamera.[h,cc]:
      - added member function Projection
+     - removed fYproj
 
    * mreport/MReport*.*:
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2818)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2819)
@@ -107,6 +107,5 @@
 //
 MHCamera::MHCamera(const MGeomCam &geom, const char *name, const char *title)
-: fGeomCam(NULL), /*TH1D(name, title, geom.GetNumPixels(), -0.5, geom.GetNumPixels()-0.5),
-                    fUsed(geom.GetNumPixels()),*/ fColors(kItemsLegend), fYProj(NULL)
+: fGeomCam(NULL), fColors(kItemsLegend)
 {
     //fGeomCam = (MGeomCam*)geom.Clone();
@@ -155,7 +154,4 @@
     if (fNotify)
       delete fNotify;
-    if (fYProj)
-      delete fYProj;
-
 }
 
@@ -456,5 +452,7 @@
 //
 // If no name is given the newly allocated histogram is removed from
-// the current directory calling SetDirectory(0)
+// the current directory calling SetDirectory(0) in any other case
+// the newly created histogram is removed from the current directory
+// and added to gROOT such the gROOT->FindObject can find the histogram.
 //
 // If the standard name "_py" is given "_py" is appended to the name
@@ -474,5 +472,4 @@
 TH1D *MHCamera::Projection(const char *name) const
 {
-
     Int_t nbins = 50;
 
@@ -501,10 +498,8 @@
 
         h1 = new TH1D(pname, GetTitle(), nbins, min, max);
-
+        h1->SetDirectory(pname.IsNull() ? NULL : gROOT);
         h1->SetXTitle(GetYaxis()->GetTitle());
         h1->SetYTitle("Counts");
         h1->Sumw2();
-        if (pname.IsNull())
-            h1->SetDirectory(NULL);
     }
 
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2818)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2819)
@@ -44,7 +44,4 @@
     Bool_t         fFreezed;     //! Just a dummy!!!! ([Set,Is]Freezed)
 
-    // Will be removed in the future
-    TH1D          *fYProj;       //! Y-Projection of the histogram (does not exist in ROOT)
-    
     //Int_t          fOptStat;
     //TGStatusBar   *fStatusBar;
