Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 5480)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 5557)
@@ -631,7 +631,5 @@
 // arr[1]: Error (rms) of averaged conversion factors (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedConvFADC2PhotPerArea  ( const MGeomCam &geom, const MCalibrationQECam &qecam,
+TArrayF MCalibrationChargeCam::GetAveragedConvFADC2PhotPerArea  ( const MGeomCam &geom, const MCalibrationQECam &qecam,
                                            const UInt_t ai,  MBadPixelsCam *bad)
 {
@@ -667,7 +665,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
 
   return arr;
@@ -687,7 +685,5 @@
 // arr[1]: Error (rms) of averaged conversion factors (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedConvFADC2PhotPerSector( const MGeomCam &geom, const MCalibrationQECam &qecam,
+TArrayF MCalibrationChargeCam::GetAveragedConvFADC2PhotPerSector( const MGeomCam &geom, const MCalibrationQECam &qecam,
                                              const UInt_t sec, MBadPixelsCam *bad)
 {
@@ -722,8 +718,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
-
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
   return arr;
 }  
@@ -741,8 +736,6 @@
 // arr[1]: Error (rms) of averaged mean arrival times (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedArrivalTimeMeanPerArea  ( const MGeomCam &geom, 
-                                           const UInt_t ai,  MBadPixelsCam *bad)
+TArrayF MCalibrationChargeCam::GetAveragedArrivalTimeMeanPerArea(const MGeomCam &geom,
+                                                                 const UInt_t ai,  MBadPixelsCam *bad)
 {
 
@@ -772,8 +765,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
-
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
   return arr;
 }
@@ -791,8 +783,6 @@
 // arr[1]: Error (rms) of averaged mean arrival times (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedArrivalTimeMeanPerSector( const MGeomCam &geom, 
-                                             const UInt_t sec, MBadPixelsCam *bad)
+TArrayF MCalibrationChargeCam::GetAveragedArrivalTimeMeanPerSector(const MGeomCam &geom,
+                                                                   const UInt_t sec, MBadPixelsCam *bad)
 {
   const Int_t np = GetSize();
@@ -821,8 +811,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
-
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
   return arr;
 }  
@@ -840,8 +829,6 @@
 // arr[1]: Error (rms) of averaged arrival time RMSs (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedArrivalTimeRmsPerArea  ( const MGeomCam &geom, 
-                                           const UInt_t ai,  MBadPixelsCam *bad)
+TArrayF MCalibrationChargeCam::GetAveragedArrivalTimeRmsPerArea  ( const MGeomCam &geom,
+                                                                   const UInt_t ai,  MBadPixelsCam *bad)
 {
 
@@ -871,8 +858,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
-
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
   return arr;
 }
@@ -890,7 +876,5 @@
 // arr[1]: Error (rms) of averaged arrival time RMSs (default: 0.)
 //
-// ATTENTION: THE USER HAS TO DELETE THE RETURNED TARRAYF ACCORDINGLY
-//
-TArrayF *MCalibrationChargeCam::GetAveragedArrivalTimeRmsPerSector( const MGeomCam &geom, const UInt_t sec, MBadPixelsCam *bad)
+TArrayF MCalibrationChargeCam::GetAveragedArrivalTimeRmsPerSector( const MGeomCam &geom, const UInt_t sec, MBadPixelsCam *bad)
 {
   const Int_t np = GetSize();
@@ -918,7 +902,7 @@
     }
 
-  TArrayF *arr = new TArrayF(2);
-  arr->AddAt(nr   ? mean/nr : -1.,0);
-  arr->AddAt(nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0. ,1);
+  TArrayF arr(2);
+  arr[0] = nr   ? mean/nr : -1;
+  arr[1] = nr>1 ? TMath::Sqrt((mean2 - mean*mean/nr)/(nr-1)) : 0;
 
   return arr;
