Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8292)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8293)
@@ -18,4 +18,22 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2007/02/03 Thomas Bretz
+
+   * mhist/MHCamEvent.[h,cc]:
+     - added Draw function to context menu
+     - added GetHist member functions
+     - added possibility to display the relative error
+
+   * mjobs/MJCalibration.cc:
+     - read the hi-/lo-gain calibration constants from a MHCamEvent
+       which is stored in a root file given in resources/hilocalib.rc
+
+   * msignal/MExtractTimeAndCharge.cc:
+     - improved the estimation in GetSaturationTime for the cases in
+       which the saturating pulse is so early, that an normal
+       interpolation is not appropriate.
+
+
 
  2007/02/02 Thomas Bretz
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 8292)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 8293)
@@ -39,4 +39,12 @@
        of very late pulses in single pixels or of huge hadron showers.
 
+   - callisto: New hi-/lo-gain calibration constants have been produced
+     for all periods from the statistic of the whole period. They are
+     now used automatically depending on the periods. The old constants
+     where deviation in avarega about 2%-3%. The constants are very
+     stable from period to period (<<1%) except for exchanged channels.
+     In a few cases the constants used so far were off by 1%-2% (maybe
+     temperature effects?)
+
    - callisto: To gain obsolete space we do not write the 
      MPedestalFundamental anymore. Also calibration and bad pixel
Index: /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 8292)
+++ /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 8293)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.59 2006-11-02 17:44:09 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.60 2007-02-03 14:16:12 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -176,4 +176,9 @@
     if (sat0<=0)
         return 0;
+    if (sat0==1)
+        return sig[0]>maxcont/2 ? 0 : 0.5;
+
+    if (sig[p]>sig[p+1] || sig[p+1]>sig[p+2])
+        return sat[p+1]>maxcont/2 ? sat0-1 : sat0-0.5;
 
     // Find the place at which the signal is maxcont/2
