Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8794)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8795)
@@ -18,4 +18,53 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2007/12/19 Thomas Bretz
+
+   * callisto.cc:
+     - commented out the obsolete unsused code for moon observations
+
+   * mbase/MStatusDisplay.cc:
+     - added (obsolete?) initialization of fBar suggested by valgrind
+
+   * mcalib/MCalibCalcFromPast.cc:
+     - replaced some floats in sums by doubles
+
+   * mextralgo/MExtralgoSpline.[h,cc]:
+     - fixed some typos in a comment
+     - removed the first and obsolete argument (sat) from the
+       Extract member function
+     - initialize x1 and x2 in GetMax as suggested by valgrind
+       (should not be necessary)
+
+   * mhcalib/HCalibLinkDef.h, mhcalib/Makefile:
+     - removed obsolete MHPedestal class
+
+   * mjobs/MJCalibrateSignal.cc:
+     - resorted includes, removed obsolete ones
+
+   * mjobs/MJPedestal.[h,cc]:
+     - resorted includes, removed obsolete ones
+     - removed obsolete fIsUseHists and corresponding code
+
+   * mjobs/MSequence.cc:
+     - allow also NoMoon in addition to No_Moon (which was anyhow
+       printed if Print was called)
+
+   * mpedestal/MExtractPedestal.cc:
+     - replaced a float in a sum-loop by a double
+
+   * mpedestal/MPedestalCam.[h,cc]:
+     - tiny change to Print function
+     - some improvements to comments
+
+   * mpedestal/MPedestalSubtract.cc:
+     - removed an obsolete cast in memcpy
+     - fixed a bug (the *src-ptr was not increased when no pedestal
+       was given)
+
+   * msignal/MExtractTimeAndChargeSpline.cc:
+     - removed the first argument from call to the Extracy function
+
+
 
  2007/12/18 Daniela Dorner
Index: trunk/MagicSoft/Mars/callisto.cc
===================================================================
--- trunk/MagicSoft/Mars/callisto.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/callisto.cc	(revision 8795)
@@ -85,5 +85,5 @@
     gLog << "   --movie                   Write a movie in addition to Mode-Y (this might " << endl;
     gLog << "                             stop the eventloop before all evts are processed)" << endl;
-    gLog << "   --moon                    Force using pedestal fits instead of calculated RMS" << endl;
+//    gLog << "   --moon                    Force using pedestal fits instead of calculated RMS" << endl;
     gLog << "   --config=callisto.rc      Resource file [default=callisto.rc]" << endl;
     gLog << endl;
@@ -174,5 +174,5 @@
     const Bool_t  kMovie      = arg.HasOnlyAndRemove("--movie");
     const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
-          Bool_t  kMoon       = arg.HasOnlyAndRemove("--moon");
+//          Bool_t  kMoon       = arg.HasOnlyAndRemove("--moon");
     Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0;
     kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv);
@@ -312,6 +312,6 @@
         PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kTRUE);
 
-    if (seq.HasMoon())
-        kMoon = kTRUE;
+//    if (seq.HasMoon())
+//        kMoon = kTRUE;
 
 
@@ -372,5 +372,5 @@
         job1.SetDisplay(d);
         job1.SetOverwrite(kOverwrite);
-        job1.SetUseHists(kMoon);
+//        job1.SetUseHists(kMoon);
 
 
@@ -401,5 +401,5 @@
         job2.SetDisplay(d);;
         job2.SetOverwrite(kOverwrite);
-        job2.SetUseHists(kMoon);
+//        job2.SetUseHists(kMoon);
         job2.SetDeadPixelCheck();
         // job1.SetPathOut(kOutpathC); // not yet needed
@@ -504,5 +504,5 @@
         job1.SetUseData();
         job1.SetExtractionFundamental();
-        job1.SetUseHists(kMoon);
+//        job1.SetUseHists(kMoon);
 
         if (!job1.Process())
@@ -538,5 +538,5 @@
         job2.SetPedestals(job1.GetPedestalCam());
         job2.SetBadPixels(job1.GetBadPixels());
-        job2.SetUseHists(kMoon);
+//        job2.SetUseHists(kMoon);
 
         // Please check the Changelog of 2005/04/20 about further deatils of the next comment
@@ -593,5 +593,5 @@
         job3.SetPedestals(job1.GetPedestalCam());
         job3.SetBadPixels(job1.GetBadPixels());
-        job3.SetUseHists(kMoon);
+//        job3.SetUseHists(kMoon);
 
         if (!job3.Process())
Index: trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 8795)
@@ -685,5 +685,5 @@
 //
 MStatusDisplay::MStatusDisplay(Int_t w, Int_t h, Long_t t)
-: TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
+: TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fBar(NULL), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
 {
     // p==NULL means: Take gClient->GetRoot() if not in batch mode
Index: trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 8795)
@@ -414,6 +414,6 @@
 Bool_t MCalibCalcFromPast::UpdateMeanPhes()
 {
-    Float_t sumw = 0.;
-    Float_t sum  = 0.;
+    Double_t sumw = 0.;
+    Double_t sum  = 0.;
 
     for (Int_t i=0; i<fPhes.GetSize(); i++)
Index: trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
===================================================================
--- trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc	(revision 8795)
@@ -76,5 +76,5 @@
     static MArrayF lut;
 
-    // If the lut is not et large enough resize and reclaculate
+    // If the lut is not yet large enough: resize and reclaculate
     if (fNum>(Int_t)lut.GetSize())
     {
@@ -246,5 +246,5 @@
 }
 
-void MExtralgoSpline::Extract(Byte_t sat, Int_t maxbin, Bool_t width)
+void MExtralgoSpline::Extract(Int_t maxbin, Bool_t width)
 {
     fSignal    =  0;
Index: trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h
===================================================================
--- trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h	(revision 8794)
+++ trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h	(revision 8795)
@@ -262,5 +262,7 @@
         // Find analytical maximum in the bin i in the interval [min,max[
 
-        Double_t x1, x2;
+        Double_t x1=-1;  // This initialisation should not really be
+        Double_t x2=-1;  // necessary but makes valgriund happy.
+
         if (!EvalDerivEq0(i, x1, x2))
             return kFALSE;
@@ -318,5 +320,5 @@
 
     Float_t ExtractNoise(/*Int_t iter*/);
-    void Extract(Byte_t sat, Int_t maxpos, Bool_t width=kFALSE);
+    void Extract(Int_t maxpos, Bool_t width=kFALSE);
 
     Float_t EvalAt(const Float_t x) const;
Index: trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h	(revision 8794)
+++ trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h	(revision 8795)
@@ -14,10 +14,10 @@
 #pragma link C++ class MHCalibrationRelTimeCam+;
 #pragma link C++ class MHCalibrationTestCam+;
+#pragma link C++ class MHCalibrationTestTimeCam+;
+#pragma link C++ class MHCalibrationPulseTimeCam+;
 //#pragma link C++ class MHCalibrationHiLoCam+;
 //#pragma link C++ class MHCalibrationHiLoPix+;
-#pragma link C++ class MHCalibrationPulseTimeCam+;
-#pragma link C++ class MHPedestalCam+;
-#pragma link C++ class MHPedestalPix+;
-#pragma link C++ class MHCalibrationTestTimeCam+;
+//#pragma link C++ class MHPedestalCam+;
+//#pragma link C++ class MHPedestalPix+;
 
 #pragma link C++ class MHGausEvents+;
Index: trunk/MagicSoft/Mars/mhcalib/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/Makefile	(revision 8794)
+++ trunk/MagicSoft/Mars/mhcalib/Makefile	(revision 8795)
@@ -42,8 +42,9 @@
            MHCalibrationTestCam.cc \
            MHCalibrationPulseTimeCam.cc \
-           MHPedestalCam.cc \
-           MHPedestalPix.cc \
            MHCalibrationTestTimeCam.cc \
 	   MHGausEvents.cc 
+
+#           MHPedestalCam.cc \
+#           MHPedestalPix.cc \
 
 ############################################################
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 8795)
@@ -40,21 +40,27 @@
 #include <TFile.h>
 
+// Core
 #include "MLog.h"
 #include "MLogManip.h"
 
 #include "MDirIter.h"
-#include "MRunIter.h"
+#include "MTaskList.h"
 #include "MParList.h"
-#include "MTaskList.h"
 #include "MEvtLoop.h"
 
 #include "MStatusDisplay.h"
 
+// General containers
 #include "MGeomCam.h"
+#include "MBadPixelsCam.h"
+#include "MCalibConstCam.h"
+#include "MPedestalCam.h"
+#include "MArrivalTimeCam.h"
+
+// General histograms
 #include "MHCamEvent.h"
-#include "MPedestalCam.h"
-#include "MBadPixelsCam.h"
-#include "MArrivalTimeCam.h"
-
+#include "MHVsTime.h"
+
+// Calibration containers
 #include "MCalibrationQECam.h"
 #include "MCalibrationBlindCam.h"
@@ -62,50 +68,46 @@
 #include "MCalibrationRelTimeCam.h"
 #include "MCalibrationChargePINDiode.h"
-#include "MCalibrationPatternDecode.h"
-
-#include "MCalibrationChargeCalc.h"
-#include "MCalibrationRelTimeCalc.h"
-
-#include "MCalibConstCam.h"
-
+
+// Calibration histograms
 #include "MHCalibrationChargeCam.h"
 #include "MHCalibrationChargeBlindCam.h"
 #include "MHCalibrationChargePINDiode.h"
 #include "MHCalibrationRelTimeCam.h"
-#include "MHCalibrationPulseTimeCam.h"
-#include "MHVsTime.h"
-#include "MHCamera.h"
-
-#include "MCalibCalcFromPast.h"
-
+
+// Tasks
 #include "MReadMarsFile.h"
 #include "MRawFileRead.h"
+#include "MTaskEnv.h"
 #include "MContinue.h"
+#include "MFillH.h"
+#include "MGeomApply.h"
+#include "MExtractTimeAndCharge.h"
 #include "MTriggerPatternDecode.h"
-#include "MFTriggerPattern.h"
-#include "MFDataPhrase.h"
-#include "MFilterList.h"
-#include "MGeomApply.h"
+#include "MCalibrationPatternDecode.h"
+#include "MCalibrationChargeCalc.h"
+#include "MCalibrationRelTimeCalc.h"
+#include "MCalibCalcFromPast.h"
 #include "MPedestalSubtract.h"
-#include "MPointingPosCalc.h"
 #include "MPedCalcFromLoGain.h"
-#include "MPedestalSubtract.h"
-#include "MExtractor.h"
-#include "MExtractTimeAndCharge.h"
+#include "MCalibrateData.h"
 #include "MExtractPINDiode.h"
 #include "MExtractBlindPixel.h"
-#include "MFCosmics.h"
-#include "MTaskEnv.h"
-#include "MCalibrateData.h"
 #include "MCalibrateRelTimes.h"
 #include "MBadPixelsCalc.h"
 #include "MBadPixelsTreat.h"
-#include "MFillH.h"
 #include "MWriteRootFile.h"
 
+// Filter
+#include "MFTriggerPattern.h"
+#include "MFCosmics.h"
+#include "MFilterList.h"
+#include "MFDataPhrase.h"
+
+// Classes for writing movies
 #include "MFEvtNumber.h"
 #include "MMoviePrepare.h"
 #include "MMovieWrite.h"
 #include "MImgCleanStd.h"
+
 
 ClassImp(MJCalibrateSignal);
Index: trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8795)
@@ -41,15 +41,10 @@
 // root classes
 #include <TF1.h>
+#include <TLine.h>
+#include <TLatex.h>
+#include <TLegend.h>
+
 #include <TEnv.h>
 #include <TFile.h>
-#include <TLine.h>
-#include <TLatex.h>
-#include <TString.h>
-#include <TCanvas.h>
-#include <TSystem.h>
-#include <TLegend.h>
-#include <TPad.h>
-#include <TEnv.h>
-#include <TH2F.h>
 
 // mars core
@@ -74,6 +69,6 @@
 #include "MPedestalPix.h"
 
+//#include "MHPedestalPix.h"
 #include "MCalibrationPix.h"
-#include "MHPedestalPix.h"
 #include "MHCalibrationPulseTimeCam.h"
 #include "MCalibrationPulseTimeCam.h"
@@ -92,9 +87,4 @@
 #include "MFTriggerPattern.h"
 #include "MBadPixelsCalc.h"
-
-#include "MPedPhotCam.h"
-#include "MPedPhotPix.h"
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
 #include "MPedestalSubtract.h"
 
@@ -121,5 +111,5 @@
     : fExtractor(NULL), fDisplayType(kDisplayDataCheck),
     fExtractType(kUsePedRun), fExtractionType(kFundamental),
-    fIsUseHists(kFALSE), fDeadPixelCheck(kFALSE), fMinEvents(50)
+    /*fIsUseHists(kFALSE),*/ fDeadPixelCheck(kFALSE), fMinEvents(50)
 {
     fName  = name  ? name  : "MJPedestal";
@@ -337,5 +327,5 @@
       }
     
-#if 0
+/*
     if (fIsUseHists)
       {
@@ -353,11 +343,9 @@
         disp5.CamDraw(c4, 2, 2, 5);
 
-        /*
-        TCanvas &c5 = fDisplay->AddTab("Difference Hist.");
-        c5.Divide(2,3);
-        
-        disp6.CamDraw(c5, 1, 2, 1);
-        disp7.CamDraw(c5, 2, 2, 5);
-        */
+        //TCanvas &c5 = fDisplay->AddTab("Difference Hist.");
+        //c5.Divide(2,3);
+        //
+        //disp6.CamDraw(c5, 1, 2, 1);
+        //disp7.CamDraw(c5, 2, 2, 5);
 
         TCanvas &c6 = fDisplay->AddTab("Difference Calc.");
@@ -368,5 +356,5 @@
         return;
       }
-#endif
+*/
     if (fDisplayType == kDisplayDataCheck)
       {
@@ -785,9 +773,6 @@
     }
 
-
-    if (HasEnv("UseHists"))
-      if (GetEnv("UseHists",kFALSE))
-        fIsUseHists = kTRUE;
-    
+//    fIsUseHists = GetEnv("UseHists", fIsUseHists);
+
     SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
 
@@ -844,4 +829,5 @@
 Int_t MJPedestal::PulsePosCheck(const MParList &plist) const
 {
+    /*
     if (fIsPixelCheck)
     {
@@ -853,5 +839,5 @@
         }
     }
-
+    */
     if (!fIsPulsePosCheck)
         return kTRUE;
@@ -869,5 +855,5 @@
     MCalibrationPulseTimeCam *cam = NULL;
     if (!fSequence.IsMonteCarlo())
-    {
+    {  /*
         if (fIsPixelCheck)
         {
@@ -885,5 +871,5 @@
             gPad->SaveAs(Form("%s/PulsePosTest_Pixel%04d.root",fPathOut.Data(),fCheckedPixId));
         }
-
+        */
         cam = (MCalibrationPulseTimeCam*)plist.FindObject("MCalibrationPulseTimeCam");
         if (!cam)
@@ -1066,8 +1052,8 @@
     pedlogain.SetPedestalUpdate(kFALSE);
     
-    MHPedestalCam hpedcam;
-    hpedcam.SetPedestalsOut(&fPedestalCamOut);
-    if (fExtractionType != kFundamental)
-        hpedcam.SetRenorm(kTRUE);
+//    MHPedestalCam hpedcam;
+//    hpedcam.SetPedestalsOut(&fPedestalCamOut);
+//    if (fExtractionType != kFundamental)
+//        hpedcam.SetRenorm(kTRUE);
 
     // To have it in the parlist for MEnv!
@@ -1172,5 +1158,5 @@
         break;
     }
-    
+/*
     if (fIsUseHists && fExtractor)
       {
@@ -1188,5 +1174,5 @@
         plist.AddToList(&hpedcam);
     }
-
+ */
     pedcalc.SetPedestalsOut(&fPedestalCamOut);
     pedlogain.SetPedestalsOut(&fPedestalCamOut);
Index: trunk/MagicSoft/Mars/mjobs/MJPedestal.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJPedestal.h	(revision 8794)
+++ trunk/MagicSoft/Mars/mjobs/MJPedestal.h	(revision 8795)
@@ -71,5 +71,5 @@
     Int_t fExtractionType;                   // Flag if the extractor is used to calculate the pedestals
 
-    Bool_t fIsUseHists;                      // Switch on histogramming or not
+//    Bool_t fIsUseHists;                      // Switch on histogramming or not
     Bool_t fDeadPixelCheck;                  // Should the dead pixel check be done?
 
@@ -113,5 +113,5 @@
     void SetExtractor(MExtractor* ext);
     void SetUseData()                           { fExtractType = kUseData;   }
-    void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
+//    void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
     void SetDeadPixelCheck(const Bool_t b=kTRUE) { fDeadPixelCheck = b; }
     void SetUsePedRun()                         { fExtractType = kUsePedRun; }
Index: trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8795)
@@ -406,4 +406,6 @@
     if (!str.CompareTo("No_Moon", TString::kIgnoreCase))
         return kNoMoon;
+    if (!str.CompareTo("NoMoon", TString::kIgnoreCase))
+        return kNoMoon;
     if (!str.CompareTo("Twilight", TString::kIgnoreCase))
         return kTwilight;
Index: trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc	(revision 8795)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.37 2007-12-14 09:56:03 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.38 2007-12-19 18:53:02 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -749,5 +749,5 @@
         (*fPedestalsInter)[idx].Set(sum, 0, 0, fNumEventsUsed[idx]);
 
-    const Float_t sqrsum = sum*sum;
+    const Double_t sqrsum = sum*sum;
 
     fSumx[idx]  += sum;
Index: trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h	(revision 8794)
+++ trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h	(revision 8795)
@@ -24,5 +24,5 @@
 
   UInt_t fNumSlices;  // Total number of slices
-  UInt_t fNumEvents;  // Number of events used for pedestal calculation
+  UInt_t fNumEvents;  // Number of events used for pedestal calculation (be careful, it has no predefined meaning!)
 
   void PrintArr(const TCollection &list) const;
Index: trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc	(revision 8795)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.8 2007-07-14 00:02:24 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.9 2007-12-19 18:53:03 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -132,5 +132,5 @@
 {
     if (fRawEvt->GetNumBytesPerSample()==2)
-        memcpy((UShort_t*)dest, src, cnt*2);
+        memcpy(dest, src, cnt*2);
     else
     {
@@ -186,5 +186,5 @@
         {
             while (beg<end)
-                *beg++ = *src;//Float_t(*src++)/scale;
+                *beg++ = *src++;//Float_t(*src++)/scale;
             continue;
         }
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc	(revision 8794)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc	(revision 8795)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.69 2007-08-19 21:40:03 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.70 2007-12-19 18:53:03 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -346,5 +346,5 @@
     }
 
-    s.Extract(sat, maxpos);
+    s.Extract(maxpos);
     s.GetTime(time, dtime);
     s.GetSignal(sum, dsum);
@@ -369,5 +369,5 @@
     }
 
-    s.Extract(sat, maxpos);
+    s.Extract(maxpos);
     s.GetTime(time, dtime);
     s.GetSignal(sum, dsum);
