Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3942)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3943)
@@ -32,7 +32,9 @@
      - changed name for alphabetical display in dox
 
+   * mjobs/MJCalibration.[h,cc]
    * msignal/MExtractTimeSpline.h
    * msignal/MExtractTimeHighestIntegral.h
      - changed name of base class to MExtractTime
+
 
    * mcalib/MCalibrationCam.[h,cc]
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3942)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3943)
@@ -42,5 +42,5 @@
 //
 // Different arrival time extractors can be set with the command SetTimeExtractor()
-// Only extractors deriving from MTimeExtractor can be set, default is MExtractTimeSpline
+// Only extractors deriving from MExtractTime can be set, default is MExtractTimeSpline
 //
 // At the end of the eventloop, plots and results are displayed, depending on 
@@ -120,5 +120,5 @@
 #include "MBadPixelsMerge.h"
 #include "MBadPixelsCam.h"
-#include "MTimeExtractor.h"
+#include "MExtractTime.h"
 #include "MExtractor.h"
 #include "MExtractPINDiode.h"
@@ -768,5 +768,5 @@
 //   5)  MExtractPINDiode
 //   6)  MExtractBlindPixel
-//   7)  MTimeExtractor (only if flag fRelTimes is chosen)
+//   7)  MExtractTime (only if flag fRelTimes is chosen)
 //   8)  MContinue(MFCosmics)
 //   9)  MFillH("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode")
@@ -828,5 +828,5 @@
   MCalibrationChargePINDiode pindiode;
   MCalibrationChargeBlindPix blindpix;
-  
+
   plist.AddToList(&pedcam);
   plist.AddToList(&fBadPixels);
@@ -893,5 +893,5 @@
         {
           *fLog << warn << GetDescriptor() 
-                << ": No extractor has been chosen, take default MTimeExtractSpine " << endl;
+                << ": No extractor has been chosen, take default MTimeExtractSpline " << endl;
           tlist.AddToList(&timespline);
         }
@@ -925,4 +925,7 @@
   
   tlist.PrintStatistics();
+
+  MHCalibrationChargeCam *fllcm = (MHCalibrationChargeCam*)plist.FindObject("MHCalibrationChargeCam");
+  (*fllcm)[100].DrawClone();
   
   DisplayResult(plist);
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.h	(revision 3942)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.h	(revision 3943)
@@ -22,5 +22,5 @@
 class MPedestalCam;
 class MExtractor;
-class MTimeExtractor;
+class MExtractTime;
 class MJCalibration : public MParContainer, public MGCamDisplays
 {
@@ -33,5 +33,5 @@
   MRunIter       *fRuns;                                   // Calibration files
   MExtractor     *fExtractor;                              // Signal extractor
-  MTimeExtractor *fTimeExtractor;                          // Arrival Time extractor
+  MExtractTime   *fTimeExtractor;                          // Arrival Time extractor
   
   MBadPixelsCam          fBadPixels;                       // Bad Pixels cam, can be set from previous runs
@@ -70,5 +70,5 @@
   void SetBadPixels(const MBadPixelsCam &bad)     { bad.Copy(fBadPixels);   }
   void SetExtractor(MExtractor* ext)              { fExtractor = ext; }
-  void SetTimeExtractor(MTimeExtractor* ext)       { fTimeExtractor = ext; }
+  void SetTimeExtractor(MExtractTime* ext)       { fTimeExtractor = ext; }
   void SetQECam    (const MCalibrationQECam &qe) { qe.Copy(fQECam);        }    
   void SetColor    (const MCalibrationCam::PulserColor_t color) { fColor = color; }
Index: trunk/MagicSoft/Mars/msignal/MExtractTime.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTime.h	(revision 3943)
+++ trunk/MagicSoft/Mars/msignal/MExtractTime.h	(revision 3943)
@@ -0,0 +1,34 @@
+#ifndef MARS_MExtractTime
+#define MARS_MExtractTime
+
+#ifndef MARS_MExtractor
+#include "MExtractor.h"
+#endif
+
+class MPedestalPix;
+class MArrivalTimeCam;
+class MExtractTime : public MExtractor
+{
+  
+  MArrivalTimeCam *fArrTime;   // Container with the photons arrival times
+  
+  virtual Int_t PreProcess(MParList *pList);
+  virtual Bool_t ReInit(MParList *pList);
+  virtual Int_t Process();
+
+  virtual void FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
+                              Byte_t &sat, const MPedestalPix &ped) const;
+  virtual void FindTimeLoGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
+                              Byte_t &sat, const MPedestalPix &ped) const;
+
+public:
+
+  MExtractTime(const char *name=NULL, const char *title=NULL);
+ 
+  ClassDef(MExtractTime, 0)   // Arrival Time Extractor Base Class
+};
+
+#endif
+
+
+
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.h	(revision 3942)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.h	(revision 3943)
@@ -2,9 +2,9 @@
 #define MARS_MExtractTimeHighestIntegral
 
-#ifndef MARS_MTimeExtractor
-#include "MTimeExtractor.h"
+#ifndef MARS_MExtractTime
+#include "MExtractTime.h"
 #endif
 
-class MExtractTimeHighestIntegral : public MTimeExtractor
+class MExtractTimeHighestIntegral : public MExtractTime
 {
 private:
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeSpline.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeSpline.h	(revision 3942)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeSpline.h	(revision 3943)
@@ -2,10 +2,10 @@
 #define MARS_MExtractTimeSpline
 
-#ifndef MARS_MTimeExtractor
-#include "MTimeExtractor.h"
+#ifndef MARS_MExtractTime
+#include "MExtractTime.h"
 #endif
 
 class MPedestalPix;
-class MExtractTimeSpline : public MTimeExtractor
+class MExtractTimeSpline : public MExtractTime
 {
 
Index: trunk/MagicSoft/Mars/msignal/MTimeExtractor.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MTimeExtractor.cc	(revision 3942)
+++ 	(revision )
@@ -1,238 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * 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): Markus Gaug 04/2004 <mailto:markus@ifae.es>
-!
-!   Copyright: MAGIC Software Development, 2002-2004
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//
-//   MTimeExtractor  
-//
-//   Base class for the time extractor, see also MExtractor 
-//
-// Input Containers:
-//   MPedestalCam
-//
-// Output Containers:
-//   MArrivalTime
-//
-//////////////////////////////////////////////////////////////////////////////
-#include "MTimeExtractor.h"
-
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MRawRunHeader.h"
-#include "MRawEvtPixelIter.h"
-
-#include "MArrivalTimeCam.h"
-#include "MArrivalTimePix.h"
-
-#include "MPedestalCam.h"
-
-ClassImp(MTimeExtractor);
-
-using namespace std;
-// --------------------------------------------------------------------------
-//
-// Default constructor.
-//
-// Set: 
-// - all pointers to NULL
-//
-MTimeExtractor::MTimeExtractor(const char *name, const char *title) 
-    : fArrTime(NULL)
-{
- 
-  fName  = name  ? name  : "MTimeExtractor";
-  fTitle = title ? title : "Base class for arrival time extractors";
-
-}
-
-
-// --------------------------------------------------------------------------
-//
-// The PreProcess searches for the following input containers:
-//  - MRawEvtData
-//  - MRawRunHeader
-//  - MPedestalCam
-//
-// The following output containers are also searched and created if
-// they were not found:
-//
-//  - MArrivalTimeCam
-//
-Int_t MTimeExtractor::PreProcess(MParList *pList)
-{
-
-    fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
-    if (!fRawEvt)
-    {
-        *fLog << err << "MRawEvtData not found... aborting." << endl;
-        return kFALSE;
-    }
-    
-    fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
-    if (!fRunHeader)
-      {
-        *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
-        return kFALSE;
-      }
-    
-    fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
-    if (!fPedestals)
-    {
-        *fLog << warn << GetDescriptor() 
-              << ": MPedestalCam not found, calculate times without pedestal information..." << endl;
-    }
-
-
-    fArrTime = (MArrivalTimeCam*)pList->FindCreateObj(AddSerialNumber("MArrivalTimeCam"));
-    if (!fArrTime)
-    {
-        *fLog << err << GetDescriptor() 
-              << ": Cannot create MArrivalTimeCam... abort" << endl;
-        return kFALSE;
-    }
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// The ReInit searches for:
-// -  MRawRunHeader::GetNumSamplesHiGain()
-// -  MRawRunHeader::GetNumSamplesLoGain()
-//
-// In case that the variables fHiGainLast and fLoGainLast are smaller than 
-// the even part of the number of samples obtained from the run header, a
-// warning is given an the range is set back accordingly. A call to:  
-// - SetRange(fHiGainFirst, fHiGainLast-diff, fLoGainFirst, fLoGainLast) or 
-// - SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff) 
-// is performed in that case. The variable diff means here the difference 
-// between the requested range (fHiGainLast) and the available one. Note that 
-// the functions SetRange() are mostly overloaded and perform more checks, 
-// modifying the ranges again, if necessary.
-//
-// Call: 
-// - MArrivalTimeCam::SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast);
-//
-Bool_t MTimeExtractor::ReInit(MParList *pList)
-{
-  
-  Int_t lastdesired   = (Int_t)fHiGainLast;
-  Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
-  
-  if (lastdesired > lastavailable)
-    {
-      const Int_t diff = lastdesired - lastavailable;
-      *fLog << endl;
-      *fLog << warn << GetDescriptor()
-            << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain FADC Window [",
-                    (int)fHiGainFirst,",",lastdesired,
-                    "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
-      *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fHiGainLast - diff) << endl;
-      SetRange(fHiGainFirst, fHiGainLast-diff, fLoGainFirst, fLoGainLast);
-    }
-
-  lastdesired   = (Int_t)(fLoGainLast);
-  lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1;
-  
-  if (lastdesired > lastavailable)
-    {
-      const Int_t diff = lastdesired - lastavailable;
-      *fLog << endl; 
-      *fLog << warn << GetDescriptor()
-            << Form("%s%2i%s%2i%s%2i%s",": Selected Lo Gain FADC Window [",
-                    (int)fLoGainFirst,",",lastdesired,
-                    "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
-      *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl;
-      SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);
-    }
-
-  fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast);
-
-  return kTRUE;
-}
-
-
-void MTimeExtractor::FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime, 
-                                Byte_t &sat, const MPedestalPix &ped) const
-{
-  return;
-}
-
-void MTimeExtractor::FindTimeLoGain(Byte_t *firstused, Float_t &time, Float_t &dtime, 
-                                Byte_t &sat, const MPedestalPix &ped) const
-{
-  return;
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Evaluation of the mean arrival times 
-// per pixel and store them in the MArrivalTime container.
-//
-Int_t MTimeExtractor::Process()
-{
-
-  MRawEvtPixelIter pixel(fRawEvt);
-  fArrTime->Clear();
-
-  while (pixel.Next())
-    {
-      
-      //
-      // Find signal in hi- and lo-gain
-      //
-      Float_t timehi, deltatimehi;
-      Byte_t sathi = 0;
-      
-      //
-      // Take correspodning pedestal
-      //
-      const UInt_t pixid = pixel.GetPixelId();
-      const MPedestalPix  &ped = (*fPedestals)[pixid];
-
-      FindTimeHiGain(pixel.GetHiGainSamples()+fHiGainFirst, timehi, deltatimehi, sathi, ped);
-
-      Float_t timelo      =0.;
-      Float_t deltatimelo =0.;
-      Byte_t  satlo       =0;
-
-      if (pixel.HasLoGain() && sathi>0)
-        FindTimeLoGain(pixel.GetLoGainSamples()+fLoGainFirst, timelo, deltatimelo, satlo, ped);
-
-      MArrivalTimePix &pix = (*fArrTime)[pixid];
-
-      pix.SetArrivalTime(timehi,deltatimehi, timelo, deltatimelo);
-      pix.SetGainSaturation(sathi, sathi, satlo);
-
-    }
-    
-  fArrTime->SetReadyToSave();
-  
-  return kTRUE;
-}
-
-
Index: trunk/MagicSoft/Mars/msignal/MTimeExtractor.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MTimeExtractor.h	(revision 3942)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#ifndef MARS_MTimeExtractor
-#define MARS_MTimeExtractor
-
-#ifndef MARS_MExtractor
-#include "MExtractor.h"
-#endif
-
-class MPedestalPix;
-class MArrivalTimeCam;
-class MTimeExtractor : public MExtractor
-{
-  
-  MArrivalTimeCam *fArrTime;   // Container with the photons arrival times
-  
-  virtual Int_t PreProcess(MParList *pList);
-  virtual Bool_t ReInit(MParList *pList);
-  virtual Int_t Process();
-
-  virtual void FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
-                              Byte_t &sat, const MPedestalPix &ped) const;
-  virtual void FindTimeLoGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
-                              Byte_t &sat, const MPedestalPix &ped) const;
-
-public:
-
-  MTimeExtractor(const char *name=NULL, const char *title=NULL);
- 
-  ClassDef(MTimeExtractor, 0)   // Arrival Time Extractor Base Class
-};
-
-#endif
-
-
-
Index: trunk/MagicSoft/Mars/msignal/Makefile
===================================================================
--- trunk/MagicSoft/Mars/msignal/Makefile	(revision 3942)
+++ trunk/MagicSoft/Mars/msignal/Makefile	(revision 3943)
@@ -41,5 +41,5 @@
 	   MExtractBlindPixel.cc \
 	   MExtractedSignalBlindPixel.cc \
-           MTimeExtractor.cc \
+           MExtractTime.cc \
            MExtractTimeSpline.cc \
            MExtractTimeHighestIntegral.cc \
Index: trunk/MagicSoft/Mars/msignal/SignalLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/SignalLinkDef.h	(revision 3942)
+++ trunk/MagicSoft/Mars/msignal/SignalLinkDef.h	(revision 3943)
@@ -22,5 +22,5 @@
 #pragma link C++ class MExtractedSignalBlindPixel++;
 
-#pragma link C++ class MTimeExtractor+;
+#pragma link C++ class MExtractTime+;
 #pragma link C++ class MExtractTimeSpline+;
 #pragma link C++ class MExtractTimeHighestIntegral+;
