Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3247)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3248)
@@ -4,5 +4,28 @@
 
                                                  -*-*- END OF LINE -*-*-
- 2004/01/19: Markus Gaug
+ 
+
+ 2004/02/20: Markus Gaug
+
+   * mcalib/MCalibrationChargeCalc.[h,cc]
+   * mcalib/MCalibrationChargeCam.[h,cc]
+   * mcalib/MCalibrationChargePINDiode.[h,cc]
+   * mcalib/MCalibrationCalc.[h,cc]
+   * mcalib/MCalibrationCam.[h,cc]
+   * mcalib/MCalibrationPINDiode.[h,cc]
+
+   - added the "charge" versions, remove the old ones. The histograms 
+     should be filled in the MH... versions independently of 
+     MCalibrationChargeCalc. This is fully realized for the PIN Didoe 
+     now and will later be so for the pixels and the blind pixel. 
+
+   * mcalib/MHCalibrationChargePINDiode.[h,cc]
+
+   - receives a pointer to MCalibrationChargePINDiode which is filled 
+     with the results and told to calculate the fluxes in the 
+     Finalize function
+ 
+
+ 2004/02/19: Markus Gaug
 
    * mcalib/MCalibrationPix.[h,cc], mcalib/MCalibrationCam.cc,
@@ -21,5 +44,5 @@
 
 
- 2004/01/19: Abelardo Moralejo
+ 2004/02/19: Abelardo Moralejo
 
    * mhist/MHEvent.[h,cc]:
@@ -47,5 +70,5 @@
 
 
- 2004/01/19: Thomas Bretz
+ 2004/02/19: Thomas Bretz
 
    * manalysis/MCerPhotEvt.h:
@@ -69,5 +92,5 @@
 
 
- 2004/01/18: Markus Gaug
+ 2004/02/18: Markus Gaug
 
     * macros/calibration.C
@@ -82,5 +105,5 @@
 
 
- 2004/01/18: Abelardo Moralejo
+ 2004/02/18: Abelardo Moralejo
 
     * mtools/MCubicSpline.cc
@@ -107,5 +130,5 @@
 
 
- 2004/01/18: Thomas Bretz
+ 2004/02/18: Thomas Bretz
 
    * manalysis/MPedestalCam.[h,cc]:
@@ -132,5 +155,5 @@
 
 
- 2004/01/17: Raquel de los Reyes
+ 2004/02/17: Raquel de los Reyes
 
    * macros/CCDataCheck.C
@@ -139,5 +162,5 @@
 
 
- 2004/01/17: Abelardo Moralejo
+ 2004/02/17: Abelardo Moralejo
 
    * macros/readrfl.C
@@ -152,5 +175,5 @@
 
 
- 2004/01/17: Raquel de los Reyes
+ 2004/02/17: Raquel de los Reyes
 
    * mcamera/MCameraHV.h
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc	(revision 3247)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc	(revision 3248)
@@ -41,5 +41,8 @@
 #include "MLogManip.h"
 
+#include "MParList.h"
+
 #include "MExtractedSignalPINDiode.h"
+#include "MCalibrationChargePINDiode.h"
 
 ClassImp(MHCalibrationChargePINDiode);
@@ -61,5 +64,5 @@
 //
 MHCalibrationChargePINDiode::MHCalibrationChargePINDiode(const char *name, const char *title)
-    : fHRmsCharge()
+    : fPINDiode(NULL), fHRmsCharge()
 {
 
@@ -121,6 +124,18 @@
 Bool_t MHCalibrationChargePINDiode::SetupFill(const MParList *pList) 
 {
-
   Init();
+  return kTRUE;
+}
+
+Bool_t MHCalibrationChargePINDiode::ReInit(MParList *pList)
+{
+
+  fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
+  if (!fPINDiode)
+  {
+      *fLog << err << GetDescriptor() << ": ERROR: Could not find MCalibrationChargePINDiode ... aborting " << endl;
+      return kFALSE;
+  }
+
   return kTRUE;
 }
@@ -176,4 +191,18 @@
   CreateFourierSpectrum();
 
+  fPINDiode->SetMeanCharge(     GetMean()     );
+  fPINDiode->SetMeanChargeErr(  GetMeanErr()  );
+  fPINDiode->SetSigmaCharge(    GetSigma()    );
+  fPINDiode->SetSigmaChargeErr( GetSigmaErr() );
+
+  fPINDiode->SetAbsTimeMean(    GetAbsTimeMean() );
+  fPINDiode->SetAbsTimeRms(     GetAbsTimeRms()  );
+
+  fPINDiode->SetRmsChargeMean(     GetRmsChargeMean()        );
+  fPINDiode->SetRmsChargeMeanErr(  GetRmsChargeMeanErr()     );
+  fPINDiode->SetRmsChargeSigma(    GetRmsChargeSigma()       );
+  fPINDiode->SetRmsChargeSigmaErr( GetRmsChargeSigmaErr()    );
+
+  fPINDiode->CalcFluxOutsidePlexiglass();
 
   return kTRUE;
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h	(revision 3247)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h	(revision 3248)
@@ -8,9 +8,12 @@
 
 class TH1F;
+class MCalibrationChargePINDiode;
 class MHCalibrationChargePINDiode : public MHCalibrationChargePix
 {
 private:
 
-  TH1F fHRmsCharge;         // Variance of summed FADC slices
+  MCalibrationChargePINDiode *fPINDiode;  //! Storage container of the results
+
+  TH1F fHRmsCharge;                       // Variance of summed FADC slices
 
   static const Int_t   fgChargeNbins;
@@ -30,4 +33,9 @@
   Axis_t  fRmsChargeLast;  
 
+  Float_t  fRmsChargeMean;
+  Float_t  fRmsChargeMeanErr;
+  Float_t  fRmsChargeSigma;
+  Float_t  fRmsChargeSigmaErr;
+
   Float_t fExtractSlices;
   
@@ -41,23 +49,29 @@
   
   Bool_t SetupFill(const MParList *pList);
-  Bool_t Fill(const MParContainer *par, const Stat_t w=1);
+  Bool_t ReInit   (      MParList *pList);
+  Bool_t Fill     (const MParContainer *par, const Stat_t w=1);
   Bool_t Finalize();
 
   // Setters
-  void SetChargeNbins(const Int_t  bins =fgChargeNbins)    { fChargeNbins = bins; }
-  void SetChargeFirst(const Axis_t first=fgChargeFirst)    { fChargeFirst = first; }
-  void SetChargeLast( const Axis_t last =fgChargeLast)     { fChargeLast  = last; }
+  void SetChargeNbins(const Int_t  bins =fgChargeNbins)          { fChargeNbins = bins;     }
+  void SetChargeFirst(const Axis_t first=fgChargeFirst)          { fChargeFirst = first;    }
+  void SetChargeLast( const Axis_t last =fgChargeLast)           { fChargeLast  = last;     }
   
-  void SetAbsTimeNbins(const Int_t  bins =fgAbsTimeNbins)    { fAbsTimeNbins = bins; }
-  void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst)    { fAbsTimeFirst = first; }
-  void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast)     { fAbsTimeLast  = last; }
+  void SetAbsTimeNbins(const Int_t  bins =fgAbsTimeNbins)        { fAbsTimeNbins = bins;    }
+  void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst)        { fAbsTimeFirst = first;   }
+  void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast)         { fAbsTimeLast  = last;    }
 
-  void SetRmsChargeNbins(const Int_t  bins =fgRmsChargeNbins)    { fRmsChargeNbins = bins; }
+  void SetRmsChargeNbins(const Int_t  bins =fgRmsChargeNbins)    { fRmsChargeNbins = bins;  }
   void SetRmsChargeFirst(const Axis_t first=fgRmsChargeFirst)    { fRmsChargeFirst = first; }
-  void SetRmsChargeLast( const Axis_t last =fgRmsChargeLast)     { fRmsChargeLast  = last; }
+  void SetRmsChargeLast( const Axis_t last =fgRmsChargeLast)     { fRmsChargeLast  = last;  }
 
   // Getters
   TH1F *GetHRmsCharge()                  { return &fHRmsCharge;  }
   const TH1F *GetHRmsCharge()            const { return &fHRmsCharge;  }
+
+  Float_t  GetRmsChargeMean()            const { return fRmsChargeMean; }
+  Float_t  GetRmsChargeMeanErr()         const { return fRmsChargeMeanErr; }
+  Float_t  GetRmsChargeSigma()           const { return fRmsChargeSigma; }
+  Float_t  GetRmsChargeSigmaErr()        const { return fRmsChargeSigmaErr; }
 
   // Fill histos
