Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6968)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6969)
@@ -24,5 +24,8 @@
  2005/04/21 Thomas Bretz
 
-    * mjobs/MJCalibrateSignal.cc:
+    * mhcalib/MHCalibrationRelTimeCam.cc:
+      - fixed usage of a uninitialized pointer
+
+    * mjobs/MJCalibrateSignal.cc, mjobs/MJCalibration.cc:
       - fixed usage of MFTriggerPattern
 
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 6968)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 6969)
@@ -22,47 +22,48 @@
 !
 \* ======================================================================== */
+
 /////////////////////////////////////////////////////////////////////////////
-//                                                                        
-// MHCalibrationRelTimeCam                                                
-//                                                                        
-// Fills the extracted relative arrival times of MArrivalTimeCam into 
+//
+// MHCalibrationRelTimeCam
+//
+// Fills the extracted relative arrival times of MArrivalTimeCam into
 // the MHCalibrationPix-classes MHCalibrationPix for every:
 //
-// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray  
-//   or MHCalibrationCam::fHiGainArray, respectively, depending if 
+// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray
+//   or MHCalibrationCam::fHiGainArray, respectively, depending if
 //   MArrivalTimePix::IsLoGainUsed() is set.
 //
-// - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera), 
-//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and 
+// - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera),
+//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and
 //   MHCalibrationCam::fAverageHiGainAreas
 //
-// - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera), 
-//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors 
-//   and MHCalibrationCam::fAverageHiGainSectors 
-//
-// Every relative time is calculated as the difference between the individual 
-// pixel arrival time and the one of pixel 1 (hardware number: 2). 
-// The relative times are filled into a histogram and an array, in order to perform 
-// a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an 
+// - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera),
+//   stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors
+//   and MHCalibrationCam::fAverageHiGainSectors
+//
+// Every relative time is calculated as the difference between the individual
+// pixel arrival time and the one of pixel 1 (hardware number: 2).
+// The relative times are filled into a histogram and an array, in order to perform
+// a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an
 // event-by-event basis and written into the corresponding average pixels.
 //
-// The histograms are fitted to a Gaussian, mean and sigma with its errors 
-// and the fit probability are extracted. If none of these values are NaN's and 
-// if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%), 
+// The histograms are fitted to a Gaussian, mean and sigma with its errors
+// and the fit probability are extracted. If none of these values are NaN's and
+// if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%),
 // the fit is declared valid.
-// Otherwise, the fit is repeated within ranges of the previous mean 
-// +- MHCalibrationPix::fPickupLimit (default: 5) sigma (see MHCalibrationPix::RepeatFit())
-// In case this does not make the fit valid, the histogram means and RMS's are 
-// taken directly (see MHCalibrationPix::BypassFit()) and the following flags are set:
+// Otherwise, the fit is repeated within ranges of the previous mean
+// - MHCalibrationPix::fPickupLimit (default: 5) sigma (see MHCalibrationPix::RepeatFit())
+//   In case this does not make the fit valid, the histogram means and RMS's are
+//   taken directly (see MHCalibrationPix::BypassFit()) and the following flags are set:
 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeNotFitted ) and
-// - MBadPixelsPix::SetUnsuitable(   MBadPixelsPix::kUnreliableRun    ) 
-// 
-// Outliers of more than MHCalibrationPix::fPickupLimit (default: 5) sigmas 
-// from the mean are counted as Pickup events (stored in MHCalibrationPix::fPickup) 
-//
-// The class also fills arrays with the signal vs. event number, creates a fourier 
-// spectrum (see MHGausEvents::CreateFourierSpectrum()) and investigates if the 
-// projected fourier components follow an exponential distribution. 
-// In case that the probability of the exponential fit is less than 
+// - MBadPixelsPix::SetUnsuitable(   MBadPixelsPix::kUnreliableRun    )
+//
+// Outliers of more than MHCalibrationPix::fPickupLimit (default: 5) sigmas
+// from the mean are counted as Pickup events (stored in MHCalibrationPix::fPickup)
+//
+// The class also fills arrays with the signal vs. event number, creates a fourier
+// spectrum (see MHGausEvents::CreateFourierSpectrum()) and investigates if the
+// projected fourier components follow an exponential distribution.
+// In case that the probability of the exponential fit is less than
 // MHGausEvents::fProbLimit (default: 0.5%), the following flags are set:
 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeOscillating ) and
@@ -83,5 +84,5 @@
 // the number involved pixels in order to be able to compare it to the average of 
 // sigmas in the camera.
-//                                                                         
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationRelTimeCam.h"
@@ -136,4 +137,5 @@
 const TString MHCalibrationRelTimeCam::gsHistYTitle = "Nr. events";
 const TString MHCalibrationRelTimeCam::fgReferenceFile = "mjobs/calibrationref.rc";
+
 // --------------------------------------------------------------------------
 //
@@ -808,7 +810,9 @@
   pix.CreateGraphEvents();
   TGraph *gr = pix.GetGraphEvents();
-
-  xaxe2->SetTitle(gr->GetXaxis()->GetTitle());
-  yaxe2->SetTitle(gr->GetYaxis()->GetTitle());  
+  if (gr)
+  {
+      xaxe2->SetTitle(gr->GetXaxis()->GetTitle());
+      yaxe2->SetTitle(gr->GetYaxis()->GetTitle());
+  }
 
   null2->Draw();
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6968)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6969)
@@ -1849,4 +1849,5 @@
     MTriggerPatternDecode     trgpat;
     MFTriggerPattern          fcalib("CalibFilter");
+    fcalib.SetDefault(kFALSE);
     fcalib.DenyCalibration(MFTriggerPattern::kPrescaled);
 
