Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.cc	(revision 4933)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.cc	(revision 4936)
@@ -95,4 +95,25 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Use the MHGausEvents::Clone function and clone additionally the rest of the 
+// data members.
+//
+TObject *MHCalibrationPix::Clone(const char *name) const
+{
+
+  MHCalibrationPix &pix = (MHCalibrationPix&)*MHGausEvents::Clone(name);
+  
+  // 
+  // Copy data members
+  //
+  pix.fEventFrequency       = fEventFrequency;
+  pix.fBlackoutLimit        = fBlackoutLimit; 
+  pix.fSaturated            = fSaturated;     
+  pix.fPickupLimit          = fPickupLimit;   
+  pix.fPixId                = fPixId;        
+
+  return &pix;
+}
 
 // -----------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.h	(revision 4933)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.h	(revision 4936)
@@ -33,4 +33,6 @@
 
   void  Clear(Option_t *o="");
+
+  TObject *Clone(const char* name="") const;
   
   // Getters
Index: trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 4933)
+++ trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 4936)
@@ -262,53 +262,57 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Use the MH::Clone function and clone additionally the rest of the 
+// data members.
+//
 TObject *MHGausEvents::Clone(const char *name) const
 {
 
-  MHGausEvents &gaus = *new MHGausEvents;
-  
-  gaus.fBinsAfterStripping   = fBinsAfterStripping;
-  gaus.fCurrentSize          = fCurrentSize;
-  gaus.fFlags                = fFlags;
-  gaus.fPowerProbabilityBins = fPowerProbabilityBins;
-  /*
-    if (fHPowerProbability)
-    gaus.fHPowerProbability=(TH1I*)fHPowerProbability->Clone();
-    
-    if (fPowerSpectrum)
-    gaus.fPowerSpectrum = new TArrayF(*fPowerSpectrum);
-  */
-
-  gaus.fEvents.Set(fEvents.GetSize());
-  gaus.fEvents = fEvents;
-  /*
-    if (fFGausFit)
-    gaus.fFGausFit=(TF1*)fFGausFit->Clone();
-    if (fFExpFit)
-    gaus.fFExpFit=(TF1*)fFExpFit->Clone();
-  */
-
-  gaus.fFirst = fFirst;
-
-  /*
-    if (fGraphEvents)
-    gaus.fGraphEvents=(TGraph*)fGraphEvents->Clone();
-    if (fGraphPowerSpectrum)
-    gaus.fGraphPowerSpectrum=(TGraph*)fGraphPowerSpectrum->Clone();
-  */
-
-  Copy(gaus.fHGausHist);
-
-  gaus.fLast      = fLast;
-  gaus.fMean      = fMean;
-  gaus.fMeanErr   = fMeanErr;
-  gaus.fNbins     = fNbins;
-  gaus.fNDFLimit  = fNDFLimit;
-  gaus.fSigma     = fSigma;
-  gaus.fSigma     = fSigmaErr;
-  gaus.fProb      = fProb;
-  gaus.fProbLimit = fProbLimit;
-  
-  return &gaus;
-}
+  MHGausEvents &pix = (MHGausEvents&)*MH::Clone(name);
+  
+  // 
+  // Copy data members
+  //
+  pix.fBinsAfterStripping   = fBinsAfterStripping;
+  pix.fCurrentSize          = fCurrentSize;
+  pix.fFlags                = fFlags;
+  pix.fPowerProbabilityBins = fPowerProbabilityBins;
+
+  if (fHPowerProbability)
+    pix.fHPowerProbability=(TH1I*)fHPowerProbability->Clone();
+  
+  if (fPowerSpectrum)
+    pix.fPowerSpectrum = new TArrayF(*fPowerSpectrum);
+
+  pix.fEvents = fEvents;
+
+  if (fFGausFit)
+    pix.fFGausFit=(TF1*)fFGausFit->Clone();
+  if (fFExpFit)
+    pix.fFExpFit=(TF1*)fFExpFit->Clone();
+
+  pix.fFirst = fFirst;
+
+  if (fGraphEvents)
+    pix.fGraphEvents=(TGraph*)fGraphEvents->Clone();
+  if (fGraphPowerSpectrum)
+    pix.fGraphPowerSpectrum=(TGraph*)fGraphPowerSpectrum->Clone();
+
+  pix.fHGausHist = fHGausHist;
+
+  pix.fLast      = fLast;
+  pix.fMean      = fMean;
+  pix.fMeanErr   = fMeanErr;
+  pix.fNbins     = fNbins;
+  pix.fNDFLimit  = fNDFLimit;
+  pix.fSigma     = fSigma;
+  pix.fSigma     = fSigmaErr;
+  pix.fProb      = fProb;
+  pix.fProbLimit = fProbLimit;
+  
+  return &pix;
+}
+
 
 
