Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2884)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2885)
@@ -6,5 +6,11 @@
  2004/01/22: Thomas Bretz
 
-   * mcalib/MCalibrationCam.[h,cc]:
+   * mcalib/MCalibrate.[h,cc], mcalib/MCalibrationCam.[h,cc],
+     mcalib/MCalibrationBlindPix.[h,cc], mcalib/MCalibrationCalc.[h,cc],
+     mcalib/MCalibrationPix.[h,cc], mcalib/MCalibrationPINDiode.[h,cc],
+     mcalib/MCalibrationBlindPixel.[h,cc], 
+     mcalib/MHCalibrationPixel.[h,cc], mcalib/MMcCalibrationCalc.[h,cc],
+     mcalib/MHCalibrationBlindPixel.[h,cc], 
+     mcalib/MHCalibrationPINDiode.[h,cc]:
      - cleaned up includes
 
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrate.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrate.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrate.cc	(revision 2885)
@@ -41,6 +41,4 @@
 #include "MCalibrate.h"
 #include "MCalibrationConfig.h"
-
-#include <TMath.h>
 
 #include "MLog.h"
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrate.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrate.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrate.h	(revision 2885)
@@ -10,8 +10,4 @@
 //                                                                         //
 /////////////////////////////////////////////////////////////////////////////
-#ifndef ROOT_TArrayF
-#include <TArrayF.h>
-#endif
-
 #ifndef MARS_MTask
 #include "MTask.h"
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.h	(revision 2885)
@@ -2,9 +2,7 @@
 #define MARS_MCalibrationBlindPix
 
-#ifndef MARS_MParContainer
-#include "MParContainer.h"
+#ifndef MARS_MHCalibrationBlindPixel
+#include "MHCalibrationBlindPixel.h"
 #endif
-
-#include "MHCalibrationBlindPixel.h"
 
 class MCalibrationBlindPix : public MParContainer
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc	(revision 2885)
@@ -24,85 +24,90 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//   MCalibrationCalc                                                       //
-//                                                                          //
-//   This is a task which calculates the number of photons from the FADC    //
-//   time slices. At the moment it integrates simply the FADC values.       //
-//                                                                          //
-//  Input Containers:                                                       //
-//   MRawEvtData                                                            //
-//                                                                          //
-//  Output Containers:                                                      //
-//   MCalibrationCam                                                        //
-//                                                                          //
-//                                                                          //
-//  The class MCalibrationCam hold one entry of type MCalibrationPix for    //
-//  every pixel. It is filled in the following way:                         //
-//  PreParocess: MalibrationCam::InitSize(577) is called which allocates    //
-//               memory in an TClonesArray of type MCalibrationPix and      //
-//               all pointers to NULL.                                      //
-//                                                                          //
-//  Process:     The NULL pointer is tested on every pixel via              //
-//               MalibrationCam::IsPixelUsed(npix).                         //
-//                                                                          //
-//               In case, IsPixelUsed returns NULL,                         //
-//               MalibrationCam::AddPixel(npix) is invoked which creates a  //
-//               new MCalibrationPix(npix) in the npix's entry              //
-//               of the TClonesArray.                                       //
-//                                                                          //
-//               Every MCalibrationPix holds a histogram class,             //
-//               MHCalibrationPixel which itself hold histograms of type:   //
-//               HCharge(npix) (distribution of summed FADC time slice entries) 
-//               HTime(npix) (distribution of position of maximum)              
+//
+//   MCalibrationCalc
+//
+//   This is a task which calculates the number of photons from the FADC
+//   time slices. At the moment it integrates simply the FADC values.
+//
+//
+//  The class MCalibrationCam hold one entry of type MCalibrationPix for
+//  every pixel. It is filled in the following way:
+//  PreParocess: MalibrationCam::InitSize(577) is called which allocates
+//               memory in an TClonesArray of type MCalibrationPix and
+//               all pointers to NULL.
+//
+//  Process:     The NULL pointer is tested on every pixel via
+//               MalibrationCam::IsPixelUsed(npix).
+//
+//               In case, IsPixelUsed returns NULL,
+//               MalibrationCam::AddPixel(npix) is invoked which creates a
+//               new MCalibrationPix(npix) in the npix's entry
+//               of the TClonesArray.
+//
+//               Every MCalibrationPix holds a histogram class,
+//               MHCalibrationPixel which itself hold histograms of type:
+//               HCharge(npix) (distribution of summed FADC time slice
+//               entries)
+//               HTime(npix) (distribution of position of maximum)
 //               HChargevsN(npix) (distribution of charges vs. event number.
-//                                                                          
-// PostProcess:  All histograms HCharge(npix) are fitted to a Gaussian      
-//               All histograms HTime(npix) are fitted to a Gaussian        
-//               The histogram HBlindPixelCharge (blind pixel) is fitted to a single     
-//                   PhE fit                                                
-//               The histogram HBlindPixelTime (blind pixel) is fitted to a Gaussian   
-//               The histograms of the PIN Diode are fitted to Gaussians    
-//                                                                          
-//               Fits can be excluded via the commands:                     
-//               MalibrationCam::SetSkipTimeFits()   (skip all time fits)   
-//               MalibrationCam::SetSkipBlindPixelFits()  (skip all blind pixel fits) 
-//               MalibrationCam::SetSkipPinDiodeFits()  (skip all PIN Diode fits) 
-//                                                                          
+//
+// PostProcess:  All histograms HCharge(npix) are fitted to a Gaussian
+//               All histograms HTime(npix) are fitted to a Gaussian
+//               The histogram HBlindPixelCharge (blind pixel) is fitted to
+//               a single
+//                   PhE fit
+//               The histogram HBlindPixelTime (blind pixel) is fitted to a
+//               Gaussian
+//               The histograms of the PIN Diode are fitted to Gaussians
+//
+//               Fits can be excluded via the commands:
+//               MalibrationCam::SetSkipTimeFits()   (skip all time fits)
+//               MalibrationCam::SetSkipBlindPixelFits()  (skip all blind
+//               pixel fits)
+//               MalibrationCam::SetSkipPinDiodeFits()  (skip all PIN Diode
+//               fits)
+//
+//  Input Containers:
+//   MRawEvtData
+//
+//  Output Containers:
+//   MCalibrationCam
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MCalibrationCalc.h"
+
+// FXIME: Usage of fstream is a preliminary workaround!
+#include <fstream>
+
+// FXIME: This has to be removed!!!!
 #include "MCalibrationConfig.h"
+
+#include <TSystem.h>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MParList.h"
+
+#include "MGeomCam.h"
+#include "MRawRunHeader.h"
+#include "MRawEvtPixelIter.h"
+
+#include "MPedestalCam.h"
+#include "MPedestalPix.h"
 
 #include "MCalibrationCam.h"
 #include "MCalibrationPix.h"
+
+#include "MExtractedSignalCam.h"
+#include "MExtractedSignalPix.h"
+
 #include "MCalibrationBlindPix.h"
 #include "MCalibrationPINDiode.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
-
-#include "MGeomCam.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-#include "MH.h"
-
-#include "MRawRunHeader.h"
-#include "MRawEvtData.h"     
-#include "MRawEvtPixelIter.h"
-
-#include "MExtractedSignalCam.h"
-#include "MExtractedSignalPix.h"
-
-#include "MTime.h"
-#include "TMath.h"
-#include "TSystem.h"
-
-#include <fstream>
-
 ClassImp(MCalibrationCalc);
 
 using namespace std;
+
 // --------------------------------------------------------------------------
 //
@@ -130,4 +135,14 @@
     SETBIT(fFlags, kUsePinDiodeFit);
 
+}
+
+MCalibrationBlindPix *MCalibrationCalc::GetBlindPixel() const
+{
+    return fCalibrations->GetBlindPixel();
+}
+
+MCalibrationPINDiode *MCalibrationCalc::GetPINDiode() const
+{
+    return fCalibrations->GetPINDiode();
 }
 
@@ -516,5 +531,5 @@
         }
 
-      blindpixel.DrawClone();
+      //blindpixel.DrawClone();
     }
   else 
@@ -563,5 +578,4 @@
     }
 
-  
   if (TESTBIT(fFlags,kUseBlindPixelFit))
     {
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h	(revision 2885)
@@ -1,13 +1,4 @@
 #ifndef MARS_MCalibrationCalc
 #define MARS_MCalibrationCalc
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MCalibrationCalc                                                   //
-//                                                                         //
-// Integrates the time slices of the all pixels of a calibration event     //
-// and substract the pedestal value                                        //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
 
 #ifndef MARS_MTask
@@ -15,22 +6,14 @@
 #endif
 
-#ifndef ROOT_TArrayI
-#include "TArrayI.h"
-#endif
-
-#ifndef MARS_MCalibrationCam
-#include "MCalibrationCam.h"
-#endif
-
-#include "TString.h"
-
-class MRawEvtData;
-class MRawRunHeader;
-
 class MPedestalCam;
 class MCalibrationCam;
 class MExtractedSignalCam;
 
+class MCalibrationBlindPix;
+class MCalibrationPINDiode;
+
 class MTime;
+class MRawEvtData;
+class MRawRunHeader;
 
 class MCalibrationCalc : public MTask
@@ -98,6 +81,6 @@
 
   // Getters
-  MCalibrationBlindPix *GetBlindPixel()   const   { return fCalibrations->GetBlindPixel();  }
-  MCalibrationPINDiode *GetPINDiode()     const   { return fCalibrations->GetPINDiode();  }  
+  MCalibrationBlindPix *GetBlindPixel() const;
+  MCalibrationPINDiode *GetPINDiode() const;
 
   // Exclude pixels from configuration file
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 2885)
@@ -19,8 +19,8 @@
   
   Int_t fNumPixels;
-  TClonesArray *fPixels;                      // Array of MCalibrationPix with fit results
+  TClonesArray *fPixels;                      //-> Array of MCalibrationPix with fit results
   
-  MCalibrationBlindPix *fBlindPixel;          // Pointer to the Blind Pixel with fit results
-  MCalibrationPINDiode *fPINDiode;            // Pointer to the PIN Diode with fit results    
+  MCalibrationBlindPix *fBlindPixel;          //-> Pointer to the Blind Pixel with fit results
+  MCalibrationPINDiode *fPINDiode;            //-> Pointer to the PIN Diode with fit results
 
   Bool_t  fNumPhotInsidePlexiglassAvailable;  // TRUE: Blind Pixel could have been fitted well 
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h	(revision 2885)
@@ -2,9 +2,7 @@
 #define MARS_MCalibrationPINDiode
 
-#ifndef MARS_MParContainer
-#include "MParContainer.h"
+#ifndef MARS_MHCalibrationPINDiode
+#include "MHCalibrationPINDiode.h"
 #endif
-
-#include "MHCalibrationPINDiode.h"
 
 class MCalibrationPINDiode : public MParContainer
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc	(revision 2885)
@@ -24,14 +24,14 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationBlindPixel                                                 //
-//                                                                          //
-//  Performs all the Single Photo-Electron Fit to extract                   //
-//  the mean number of photons and to derive the light flux                 //
-//                                                                          //
-// The fit result is accepted under condition that:                         //
-// 1) the Probability is greater than gkProbLimit (default 0.001 == 99.7%)  //
-// 2) at least 100 events are in the single Photo-electron peak             // 
-//                                                                          //
+//
+//  MHCalibrationBlindPixel
+//
+//  Performs all the Single Photo-Electron Fit to extract
+//  the mean number of photons and to derive the light flux
+//
+// The fit result is accepted under condition that:
+// 1) the Probability is greater than gkProbLimit (default 0.001 == 99.7%)
+// 2) at least 100 events are in the single Photo-electron peak
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationBlindPixel.h"
@@ -39,20 +39,10 @@
 
 #include <TStyle.h>
-#include <TMath.h>
-#include <TPad.h>
-
-#include <TMinuit.h>
-#include <TFitter.h>
-
-#include <TF1.h>
-#include <TH2.h>
 #include <TCanvas.h>
 #include <TPaveText.h>
+
+#include <TF1.h>
+#include <TH1.h>
 #include <TRandom.h>
-
-#include <TText.h>
-
-#include "MBinning.h"
-#include "MParList.h"
 
 #include "MLog.h"
@@ -62,4 +52,5 @@
 
 using namespace std;
+
 // --------------------------------------------------------------------------
 //
@@ -145,4 +136,18 @@
 }
 
+Bool_t MHCalibrationBlindPixel::FillBlindPixelCharge(Float_t q)
+{
+    return fHBlindPixelCharge->Fill(q) > -1;
+}
+
+Bool_t MHCalibrationBlindPixel::FillBlindPixelTime(Int_t t)
+{
+    return fHBlindPixelTime->Fill(t) > -1;
+}
+
+Bool_t MHCalibrationBlindPixel::FillBlindPixelChargevsN(Stat_t rq, Int_t t)
+{
+    return fHBlindPixelChargevsN->Fill(t,rq) > -1;
+}
 
 
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h	(revision 2885)
@@ -6,4 +6,10 @@
 #endif
 
+class TH1F;
+class TH1I;
+class TF1;
+class TPaveText;
+
+/*
 #ifndef MARS_MHCalibrationConfig
 #include "MHCalibrationConfig.h"
@@ -29,5 +35,5 @@
 #include "TPaveText.h"
 #endif
-
+*/
 
 
@@ -88,7 +94,7 @@
   ~MHCalibrationBlindPixel();
 
-  Bool_t FillBlindPixelCharge(Float_t q)             { return fHBlindPixelCharge->Fill(q) > -1;  }  
-  Bool_t FillBlindPixelTime(Int_t t)                 { return fHBlindPixelTime->Fill(t) > -1;  }
-  Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1;  }  
+  Bool_t FillBlindPixelCharge(Float_t q);
+  Bool_t FillBlindPixelTime(Int_t t);
+  Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t);
   
 
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.cc	(revision 2885)
@@ -24,35 +24,21 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationPINDiode                                                 //
-//                                                                          //
-//  Performs all the necessary fits to extract the mean number of photons   //
-//              out of the derived light flux                               //
-//                                                                          //
+//
+//  MHCalibrationPINDiode
+//
+//  Performs all the necessary fits to extract the mean number of photons
+//              out of the derived light flux
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationPINDiode.h"
 #include "MHCalibrationConfig.h"
 
-#include <TStyle.h>
-#include <TMath.h>
-
-#include <TMinuit.h>
-#include <TFitter.h>
-
+#include <TH1.h>
 #include <TF1.h>
-#include <TH2.h>
-#include <TCanvas.h>
-#include <TPaveText.h>
-#include <TRandom.h>
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
 
 ClassImp(MHCalibrationPINDiode);
 
 using namespace std;
+
 // --------------------------------------------------------------------------
 //
@@ -113,2 +99,11 @@
 }
 
+const Double_t MHCalibrationPINDiode::GetTime() const
+{
+    return fVarGausFit->GetParameter(2);
+}
+
+const Double_t MHCalibrationPINDiode::GetErrTime() const
+{
+    return fVarGausFit->GetParameter(3);
+}
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationPINDiode.h	(revision 2885)
@@ -6,19 +6,7 @@
 #endif
 
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH1
-#include "TH1.h"
-#endif
-
-#ifndef ROOT_TH1F
-#include "TH1F.h"
-#endif
-
-#ifndef ROOT_TF1
-#include "TF1.h"
-#endif
+class TH1I;
+class TH1F;
+class TF1;
 
 class MHCalibrationPINDiode : public MHCalibrationPixel
@@ -42,6 +30,6 @@
   ~MHCalibrationPINDiode();
 
-  const Double_t GetTime()      const { return fVarGausFit->GetParameter(2); }
-  const Double_t GetErrTime()    const { return fVarGausFit->GetParameter(3); }
+  const Double_t GetTime() const;
+  const Double_t GetErrTime() const;
 
   ClassDef(MHCalibrationPINDiode, 0)  // Histograms from the Calibration PIN Diode
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 2885)
@@ -24,29 +24,21 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationPixel                                                 //
-//                                                                          //
-//  Performs all the necessary fits to extract the mean number of photons   //
-//              out of the derived light flux                               //
-//                                                                          //
+//
+//  MHCalibrationPixel
+//
+//  Performs all the necessary fits to extract the mean number of photons
+//              out of the derived light flux
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationPixel.h"
 #include "MHCalibrationConfig.h"
 
+#include <TH1.h>
+#include <TF1.h>
+#include <TProfile.h>
+
 #include <TStyle.h>
-#include <TMath.h>
-
-#include <TFitter.h>
-#include <TGraph.h>
-#include <TAxis.h>
-
-#include <TF1.h>
-#include <TH2.h>
-#include <TProfile.h>
 #include <TCanvas.h>
-#include <TPad.h>
 #include <TPaveText.h>
-
-#include "MParList.h"
 
 #include "MLog.h"
@@ -181,4 +173,48 @@
 }
 
+const Double_t MHCalibrationPixel::GetArea() const
+{
+    return fChargeGausFit->GetParameter(0);
+}
+
+const Double_t MHCalibrationPixel::GetAreaErr() const
+{
+    return fChargeGausFit->GetParError(0);
+}
+
+Bool_t MHCalibrationPixel::IsEmpty()
+{
+    return !(fHChargeHiGain->GetEntries() || fHChargeLoGain->GetEntries());
+}
+  
+Bool_t MHCalibrationPixel::FillChargeLoGain(Float_t q)
+{
+    return (fHChargeLoGain->Fill(q) > -1);
+}
+
+Bool_t MHCalibrationPixel::FillTimeLoGain(Int_t t)
+{
+    return (fHTimeLoGain->Fill(t)   > -1);
+}
+
+Bool_t MHCalibrationPixel::FillChargevsNLoGain(Float_t q, Int_t n)
+{
+    return (fHChargevsNLoGain->Fill(n,q) > -1);
+}
+
+Bool_t MHCalibrationPixel::FillChargeHiGain(Float_t q)
+{
+    return (fHChargeHiGain->Fill(q)      > -1);
+}
+
+Bool_t MHCalibrationPixel::FillTimeHiGain(Int_t t)
+{
+    return (fHTimeHiGain->Fill(t)        > -1);
+}
+
+Bool_t MHCalibrationPixel::FillChargevsNHiGain(Float_t q, Int_t n)
+{
+    return (fHChargevsNHiGain->Fill(n,q) > -1);
+}
 
 void MHCalibrationPixel::ChangeHistId(Int_t id)
Index: /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.h	(revision 2885)
@@ -1,12 +1,4 @@
 #ifndef MARS_MHCalibrationPixel
 #define MARS_MHCalibrationPixel
-
-#ifndef ROOT_TH1
-#include "TH1.h"
-#endif
-
-#ifndef ROOT_TH1
-#include "TH1F.h"
-#endif
 
 #ifndef MARS_MH
@@ -14,19 +6,10 @@
 #endif
 
-#ifndef ROOT_TF1
-#include "TF1.h"
-#endif
-
-#ifndef ROOT_TProfile
-#include "TProfile.h"
-#endif
-
-#ifndef ROOT_TArrayF
-#include "TArrayF.h"
-#endif
-
+class TArrayF;
+class TH1F;
+class TH1I;
+class TF1;
+class TProfile;
 class TPaveText;
-class TMath;
-class MParList;
 
 class MHCalibrationPixel : public MH
@@ -122,6 +105,6 @@
   const Double_t GetChargeSigma()    const { return fChargeSigma;   }
   const Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
-  const Double_t GetArea()           const { return fChargeGausFit->GetParameter(0); }
-  const Double_t GetAreaErr()        const { return fChargeGausFit->GetParError(0);  }
+  const Double_t GetArea()           const;
+  const Double_t GetAreaErr()        const;
 
   const Double_t GetChargeChiSquare() const { return fChargeChisquare; }
@@ -152,16 +135,15 @@
   Bool_t UseLoGain();
 
-  Bool_t IsFitOK()                           {  return fFitOK;          }
-  Bool_t IsEmpty()                           {  return !( (fHChargeHiGain->GetEntries())
-                                                     || (fHChargeLoGain->GetEntries()) ); }  
+  Bool_t IsFitOK() { return fFitOK; }
+  Bool_t IsEmpty();
   
   // Fill histos
-  Bool_t FillChargeLoGain(Float_t q)             { return (fHChargeLoGain->Fill(q) > -1); }
-  Bool_t FillTimeLoGain(Int_t t)                 { return (fHTimeLoGain->Fill(t)   > -1); }
-  Bool_t FillChargevsNLoGain(Float_t q, Int_t n) { return (fHChargevsNLoGain->Fill(n,q) > -1); }
+  Bool_t FillChargeLoGain(Float_t q);
+  Bool_t FillTimeLoGain(Int_t t);
+  Bool_t FillChargevsNLoGain(Float_t q, Int_t n);
 
-  Bool_t FillChargeHiGain(Float_t q)             { return (fHChargeHiGain->Fill(q)      > -1); }
-  Bool_t FillTimeHiGain(Int_t t)                 { return (fHTimeHiGain->Fill(t)        > -1); }
-  Bool_t FillChargevsNHiGain(Float_t q, Int_t n) { return (fHChargevsNHiGain->Fill(n,q) > -1); }
+  Bool_t FillChargeHiGain(Float_t q);
+  Bool_t FillTimeHiGain(Int_t t);
+  Bool_t FillChargevsNHiGain(Float_t q, Int_t n);
 
   // Fits
Index: /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc	(revision 2885)
@@ -1,25 +1,25 @@
 /* ======================================================================== *\
-   !
-   ! *
-   ! * 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): Abelardo Moralejo, 12/2003 <mailto:moralejo@pd.infn.it>
-   !
-   !   Copyright: MAGIC Software Development, 2000-2003
-   !
-   !
-   \* ======================================================================== */
+!
+! *
+! * 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): Abelardo Moralejo, 12/2003 <mailto:moralejo@pd.infn.it>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
 
 /////////////////////////////////////////////////////////////////////////////
@@ -40,17 +40,22 @@
 #include "MMcCalibrationCalc.h"
 
-#include "MParList.h"
+#include <TH1.h>
 
 #include "MLog.h"
 #include "MLogManip.h"
 
+#include "MParList.h"
+
 #include "MCalibrationPix.h"
 #include "MCalibrationCam.h"
+
 #include "MGeomCam.h"
 #include "MRawRunHeader.h"
-#include "MMcFadcHeader.hxx"
+
 #include "MHillas.h"
 #include "MNewImagePar.h"
+
 #include "MMcEvt.hxx"
+#include "MMcFadcHeader.hxx"
 
 ClassImp(MMcCalibrationCalc);
Index: /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h	(revision 2884)
+++ /trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h	(revision 2885)
@@ -13,15 +13,9 @@
 class MMcFadcHeader;
 
-#include <TH1.h>
+class TH1F;
 
 class MMcCalibrationCalc : public MTask
 {
 private:
-    Bool_t CheckRunType(MParList *pList) const;
-    Int_t  PreProcess(MParList *pList);
-    Int_t  Process();
-    Int_t  PostProcess();
-    Bool_t ReInit(MParList *pList);
-
     MCalibrationCam     *fCalCam;
     MGeomCam            *fGeom;
@@ -36,4 +30,10 @@
     TH1F*   fHistRatio;
 
+    Bool_t CheckRunType(MParList *pList) const;
+    Int_t  PreProcess(MParList *pList);
+    Int_t  Process();
+    Int_t  PostProcess();
+    Bool_t ReInit(MParList *pList);
+
 public:
     MMcCalibrationCalc(const char *name=NULL, const char *title=NULL);
