Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6827)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6828)
@@ -21,4 +21,35 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/03/16 Thomas Bretz
+
+   * callisto.cc:
+     - set changed extractor in MJCalibrateSignal from MJPedestal
+
+   * callisto.rc:
+     - removed obsolete Modified* option
+
+   * mjobs/MJCalibrateSignal.[h,cc]:
+     - removed obsolete flag for ModifiedExtractWin
+
+
+   * mcalib/MCalibColorSet.cc, mcalib/MCalibrationChargeCalc.cc,
+     mhcalib/MHCalibrationCam.cc:
+     - undocummented change
+
+
+
+ 2005/03/15 Markus Gaug
+
+   * msignal/MExtractTimeAndChargeSpline.h
+     - take fRandomIter out of the streamer. 
+     - take fRiseTimeLoGain and fFallTimeLoGain into the streamer.
+     - raise version number to 4
+
+   * mjobs/MJCalibration.cc
+     - set default to kFALSE for PIN Diode or Blind Pixel calibration 
+       (was kTRUE by error).
+
+
+
  2005/03/15 Thomas Bretz
 
Index: trunk/MagicSoft/Mars/callisto.cc
===================================================================
--- trunk/MagicSoft/Mars/callisto.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/callisto.cc	(revision 6828)
@@ -576,4 +576,5 @@
         job4.SetPathData(kInpathD);
         job4.SetDataType(kDataType);
+        job4.SetExtractor(job2.GetExtractor());
 
         // Where to search for calibration files
Index: trunk/MagicSoft/Mars/callisto.rc
===================================================================
--- trunk/MagicSoft/Mars/callisto.rc	(revision 6827)
+++ trunk/MagicSoft/Mars/callisto.rc	(revision 6828)
@@ -310,5 +310,5 @@
 #MJPedestalY2.ExtractWinLeft:  2.5
 #MJPedestalY2.ExtractWinRight: 5.0
-#MJCalibrateSignal.ModifiedExtractWin: yes
+
 # -------------------------------------------------------------------------
 # Define the Pulse Position check parameters:
Index: trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc	(revision 6828)
@@ -316,9 +316,11 @@
       return kFALSE;
       break;
-      
+
+    case 40493:
     case 45116:
     case 45609:
     case 45219:
-      *fLog << err << "Sorry, run " << num << " was taken with a combination of colours used to flat-field ";
+      *fLog << err << dec << "Sorry, run " << num 
+            << " was taken with a combination of colours used to flat-field ";
       *fLog << err << "the camera. It cannot be used for the standard calibration " << endl;
       return kFALSE;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 6828)
@@ -588,15 +588,18 @@
           *fLog << warn << "Multiple colours used simultaneously!" ;
           fHCam->Finalize();
-          fHBlindCam->Finalize();
+          if (fHBlindCam)
+            fHBlindCam->Finalize();
 
           Finalize();
 
           fHCam->ResetHists();
-          fHBlindCam->ResetHists();
+          if (fHBlindCam)
+            fHBlindCam->ResetHists();
 
           *fLog << inf << "Starting next calibration... " << flush;
 
           fHCam->SetColor(col);
-          fHBlindCam->SetColor(col);
+          if (fHBlindCam)
+            fHBlindCam->SetColor(col);
 
           fCam->SetPulserColor(col);
@@ -623,5 +626,6 @@
   
   fHCam->SetColor(col);
-  fHBlindCam->SetColor(col);
+  if (fHBlindCam)
+    fHBlindCam->SetColor(col);
 
   MCalibrationBlindCam  *blindcam  = fIntensBlind   
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 6828)
@@ -402,6 +402,6 @@
         MHCalibrationPix &pix = (*this)[i];        
         h = pix.GetHGausHist();
-        h->SetName (Form("%s%s%s%4i","H",fHistName.Data(),"HiGainPix",i));
-        h->SetTitle(Form("%s%s%4i%s",fHistTitle.Data()," High Gain Pixel ",i," Runs: "));  
+        h->SetName (Form("%s%s%s%04d","H",fHistName.Data(),"HiGainPix",i));
+        h->SetTitle(Form("%s%s%04d%s",fHistTitle.Data()," High Gain Pixel ",i," Runs: "));  
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -431,6 +431,6 @@
             MHCalibrationPix &pix = GetAverageHiGainSector(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%2i","H",fHistName.Data(),"HiGainSector",j));
-            h->SetTitle(Form("%s%s%2i%s",fHistTitle.Data(),
+            h->SetName (Form("%s%s%s%02d","H",fHistName.Data(),"HiGainSector",j));
+            h->SetTitle(Form("%s%s%02d%s",fHistTitle.Data(),
                              " averaged on event-by-event basis High Gain Sector ",j," Runs: "));
             h->SetXTitle(fHistXTitle.Data());
@@ -447,6 +447,6 @@
         MHCalibrationPix &pix = (*this)(i);        
         h = pix.GetHGausHist();
-        h->SetName (Form("%s%s%s%4i","H",fHistName.Data(),"LoGainPix",i));
-        h->SetTitle(Form("%s%s%4i%s",fHistTitle.Data()," Low Gain Pixel ",i," Runs: "));  
+        h->SetName (Form("%s%s%s%04d","H",fHistName.Data(),"LoGainPix",i));
+        h->SetTitle(Form("%s%s%04d%s",fHistTitle.Data()," Low Gain Pixel ",i," Runs: "));  
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -476,6 +476,6 @@
             MHCalibrationPix &pix = GetAverageLoGainSector(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%2i","H",fHistName.Data(),"LoGainSector",j));
-            h->SetTitle(Form("%s%s%2i%s",fHistTitle.Data(),
+            h->SetName (Form("%s%s%s%02d","H",fHistName.Data(),"LoGainSector",j));
+            h->SetTitle(Form("%s%s%02d%s",fHistTitle.Data(),
                              " averaged on event-by-event basis Low Gain Sector ",j," Runs: "));
             h->SetXTitle(fHistXTitle.Data());
@@ -633,5 +633,5 @@
     {
       TH1F *h = (*this)[i].GetHGausHist();
-      h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+      h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
     }
 
@@ -640,5 +640,5 @@
       {
         TH1F *h = (*this)(i).GetHGausHist();
-        h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+        h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
       }
   
@@ -649,5 +649,5 @@
     {
       TH1F *h = GetAverageHiGainArea(j).GetHGausHist();
-      h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+      h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
     }
   
@@ -656,5 +656,5 @@
       {
         TH1F *h = GetAverageLoGainArea(j).GetHGausHist();
-        h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+        h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
       }
   
@@ -662,5 +662,5 @@
     {
       TH1F *h = GetAverageHiGainSector(j).GetHGausHist();
-      h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+      h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
     }
   
@@ -669,5 +669,5 @@
       {
         TH1F *h = GetAverageLoGainSector(j).GetHGausHist();
-        h->SetTitle( Form("%s%i%s", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]," "));
+        h->SetTitle( Form("%s%08d ", h->GetTitle(),fRunNumbers[fRunNumbers.GetSize()-1]));
       }
   
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6828)
@@ -122,10 +122,8 @@
 // - fIsRelTimesUpdate to kFALSE
 // - fIsHiLoCalibration to kFALSE
-// - fIsModifiedExtractWin to kTRUE
 // - fPulsePosCheck to kTRUE
 //
 MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title)
-    : fExtractor(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE),
-      fIsModifiedExtractWin(kTRUE)
+    : fExtractor(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE)
 {
     fName  = name  ? name  : "MJCalibrateSignal";
@@ -272,8 +270,6 @@
 Bool_t MJCalibrateSignal::CheckEnvLocal()
 {
-
     SetInterlaced(GetEnv("Interlaced", fIsInterlaced));
     SetRelTimesUpdate(GetEnv("RelTimesUpdate", fIsRelTimesUpdate));
-    SetModifiedExtractWin(GetEnv("ModifiedExtractWin", fIsModifiedExtractWin));
 
     return MJCalib::CheckEnvLocal();
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h	(revision 6827)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h	(revision 6828)
@@ -22,8 +22,6 @@
     MExtractor *fExtractor;
 
-  //    MRunIter *fCruns;                   // Calibration run iter
     Bool_t fIsInterlaced;               // Distinguish interlaced from other calibration
     Bool_t fIsRelTimesUpdate;           // Choose to update relative times from interlaced
-    Bool_t fIsModifiedExtractWin;       // Choose to use the modified extraction window from pulse position
     
     Bool_t CheckEnvLocal();
@@ -48,7 +46,4 @@
     void SetInterlaced     ( const Bool_t b=kTRUE )  { fIsInterlaced      = b; }
     void SetRelTimesUpdate ( const Bool_t b=kTRUE )  { fIsRelTimesUpdate  = b; }
-    void SetModifiedExtractWin( const Bool_t b=kTRUE )  { fIsModifiedExtractWin = b; }
-
-    //    void SetInputCal    ( MRunIter *iter       )  { fCruns = iter; }
 
     void SetExtractor(const MExtractor &ext);
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6827)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6828)
@@ -197,6 +197,6 @@
   fTitle = title ? title : "Tool to create the calibration constants for one calibration run";
   
-  SetUseBlindPixel();
-  SetUsePINDiode();
+  SetUseBlindPixel(kFALSE);
+  SetUsePINDiode(kFALSE);
   
   SetHiLoCalibration();
@@ -1527,4 +1527,5 @@
       cpix.SetConversionHiLoErr(sigma);      
     }
+
   return kTRUE;
 }
@@ -1794,7 +1795,9 @@
     MHCalibrationChargeBlindCam blindcam;
     plist.AddToList(&chargecam);
-    plist.AddToList(&blindcam);
+
+    if (IsUseBlindPixel())
+      plist.AddToList(&blindcam);
     if (IsRelTimes())
-        plist.AddToList(&reltimecam);
+      plist.AddToList(&reltimecam);
     //
     // Data Reading tasks
@@ -1907,6 +1910,9 @@
 
     tlist.AddToList(&taskenv);
-    tlist.AddToList(&pinext);
-    tlist.AddToList(&blindext);
+    
+    if (IsUsePINDiode())
+      tlist.AddToList(&pinext);
+    if (IsUseBlindPixel())
+      tlist.AddToList(&blindext);
 
     MTaskEnv taskenv2("ExtractTime");
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h	(revision 6827)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h	(revision 6828)
@@ -41,10 +41,10 @@
   Float_t fRiseTimeHiGain;              // The usual rise time of the pulse in the high-gain
   Float_t fFallTimeHiGain;              // The usual fall time of the pulse in the high-gain
-  Float_t fRiseTimeLoGain;              //! The usual rise time of the pulse in the low-gain
-  Float_t fFallTimeLoGain;              //! The usual fall time of the pulse in the low-gain
+  Float_t fRiseTimeLoGain;              // The usual rise time of the pulse in the low-gain
+  Float_t fFallTimeLoGain;              // The usual fall time of the pulse in the low-gain
 
   Float_t fLoGainStretch;               // The stretch of the low-gain w.r.t. the high-gain pulse
 
-  Int_t   fRandomIter;                  // Counter used to randomize weights for noise calculation
+  Int_t   fRandomIter;                  //! Counter used to randomize weights for noise calculation
   
   Int_t   ReadEnv(const TEnv &env, TString prefix, Bool_t print);
@@ -100,5 +100,5 @@
                                Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
 
-  ClassDef(MExtractTimeAndChargeSpline, 3)   // Task to Extract Arrival Times and Charges using a Fast Cubic Spline
+  ClassDef(MExtractTimeAndChargeSpline, 4)   // Task to Extract Arrival Times and Charges using a Cubic Spline
 };
 
