Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 5857)
+++ trunk/MagicSoft/Mars/Changelog	(revision 5858)
@@ -33,4 +33,7 @@
     - speed up Process by storing pre-calculated calibration constants
       in arrays (needed 40% of CPU time of the eventloop before, now: 23%) 
+
+  * mcalib/MCalibCalcFromPast.[h,cc]
+    - committed final version, now also in the Makefile
 
 
Index: trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 5857)
+++ trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 5858)
@@ -7,4 +7,5 @@
 #pragma link C++ class MCalibColorSet+;
 #pragma link C++ class MCalibColorSteer+;
+#pragma link C++ class MCalibCalcFromPast+;
 
 #pragma link C++ class MCalibrate+;
Index: trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 5857)
+++ trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 5858)
@@ -233,8 +233,10 @@
 // --------------------------------------------------------------------------
 //
-// Initializes new containers in the 
-// Intensity Cams, if the number of calibration events has reach fNumEventsDump. 
-// Executes CallPostProcess of the MCalibration*Calc classes in that case.
-//
+// - Initializes new containers in the 
+// - Intensity Cams, if the number of calibration events has reach fNumEventsDump. 
+// - Executes Finalize() of the MCalibration*Calc classes in that case.
+// - Sets the latest MCalibrationChargeCam as update class into MCalibrateData
+// - Initialize new MCalibration*Cams into the intensity cams.
+// 
 Int_t MCalibCalcFromPast::Process()
 {
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc	(revision 5857)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc	(revision 5858)
@@ -45,6 +45,10 @@
 #include <TGraphErrors.h>
 #include <TOrdCollection.h>
+#include <TH1D.h>
 
 #include "MLog.h"
+#include "MLogManip.h"
+
+#include "MHCamera.h"
 
 #include "MGeomCam.h"
@@ -540,2 +544,373 @@
   return nvalid;
 }
+
+
+// -------------------------------------------------------------------
+//
+// Returns a TGraphErrors with the development of the number of 
+// photo-electrons vs. camera number for pixel 'pixid' 
+//
+TGraphErrors *MCalibrationIntensityChargeCam::GetVarVsTime( const Int_t pixid , const Option_t *opt )
+{
+  
+  const Int_t size = GetSize();
+
+  if (size == 0)
+    return NULL;
+  
+  TString option(opt);
+
+  TArrayF nr(size);
+  TArrayF nrerr(size);
+  TArrayF var   (size);
+  TArrayF varerr(size);
+  
+  for (Int_t i=0;i<size;i++)
+    {
+      //
+      // Get the calibration cam from the intensity cam
+      //
+      MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);
+      //
+      // Get the calibration pix from the calibration cam
+      //
+      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[pixid];
+      //
+      nr[i]    = i;
+      nrerr[i] = 0.;
+      var[i]    = -1.;
+      varerr[i] = -1.;
+      //
+      // Don't use bad pixels
+      //
+      if (!pix.IsFFactorMethodValid())
+        continue;
+      //
+      if (option.Contains("RSigma"))
+        {
+          var   [i] = pix.GetRSigma();
+          varerr[i] = pix.GetRSigmaErr();
+        }
+      if (option.Contains("AbsTime"))
+        {
+          var   [i] = pix.GetAbsTimeMean();
+          varerr[i] = pix.GetAbsTimeRms();
+        }
+      if (option.Contains("ConversionHiLo"))
+        {
+          var   [i] = pix.GetConversionHiLo();
+          varerr[i] = pix.GetConversionHiLoErr();
+        }
+      if (option.Contains("ConvertedMean"))
+        {
+          var   [i] = pix.GetConvertedMean();
+          varerr[i] = pix.GetConvertedMeanErr();
+        }
+      if (option.Contains("ConvertedSigma"))
+        {
+          var   [i] = pix.GetConvertedSigma();
+          varerr[i] = pix.GetConvertedSigmaErr();
+        }
+      if (option.Contains("ConvertedRSigma"))
+        {
+          var   [i] = pix.GetConvertedRSigma();
+          varerr[i] = pix.GetConvertedRSigmaErr();
+        }
+      if (option.Contains("MeanConvFADC2Phe"))
+        {
+          var   [i] = pix.GetMeanConvFADC2Phe();
+          varerr[i] = pix.GetMeanConvFADC2PheErr();
+        }
+      if (option.Contains("MeanFFactorFADC2Phot"))
+        {
+          var   [i] = pix.GetMeanFFactorFADC2Phot();
+          varerr[i] = pix.GetMeanFFactorFADC2PhotErr();
+        }
+      if (option.Contains("Ped"))
+        {
+          var   [i] = pix.GetPed();
+          varerr[i] = pix.GetPedErr();
+        }
+      if (option.Contains("PedRms"))
+        {
+          var   [i] = pix.GetPedRms();
+          varerr[i] = pix.GetPedRmsErr();
+        }
+      if (option.Contains("PheFFactorMethod"))
+        {
+          var   [i] = pix.GetPheFFactorMethod();
+          varerr[i] = pix.GetPheFFactorMethodErr();
+        }
+      if (option.Contains("RSigmaPerCharge"))
+        {
+          var   [i] = pix.GetRSigmaPerCharge();
+          varerr[i] = pix.GetRSigmaPerChargeErr();
+        }
+  }
+  
+  
+  TGraphErrors *gr = new TGraphErrors(size,
+                                     nr.GetArray(),var.GetArray(),
+                                     nrerr.GetArray(),varerr.GetArray());
+  gr->SetTitle(Form("%s%3i","Pixel ",pixid));
+  gr->GetXaxis()->SetTitle("Camera Nr.");
+  //  gr->GetYaxis()->SetTitle("<Q> [FADC cnts]");
+  return gr;
+}
+
+// --------------------------------------------------------------------------------
+//
+// Returns a TGraphErrors with a pre-defined variable with name (handed over in 'opt')
+// per area index 'aidx' vs. the calibration camera number 
+//
+TGraphErrors *MCalibrationIntensityChargeCam::GetVarPerAreaVsTime( const Int_t aidx, const MGeomCam &geom, const Option_t *opt)
+{
+  
+  const Int_t size = GetSize();
+  
+  if (size == 0)
+    return NULL;
+
+  TString option(opt);
+
+  TArrayF vararea(size);
+  TArrayF varareaerr(size);
+  TArrayF nr(size);
+  TArrayF nrerr(size);
+  
+  TH1D *h = 0;
+
+  for (Int_t i=0;i<GetSize();i++)
+    {
+      //
+      // Get the calibration cam from the intensity cam
+      //
+      MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);
+
+      //
+      // Get the calibration pix from the calibration cam
+      //
+      Double_t variab   = 0.;
+      Double_t variab2  = 0.;
+      Double_t variance = 0.;
+      Int_t    num      = 0;
+      Float_t  pvar     = 0.;
+
+      MHCamera camcharge(geom,"CamCharge","Variable;;channels");
+      //
+      // Get the area calibration pix from the calibration cam
+      //
+      for (Int_t j=0; j<cam->GetSize(); j++)
+        {
+          const MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[j];
+          //
+          // Don't use bad pixels
+          //
+          if (!pix.IsFFactorMethodValid())
+            continue;
+          //
+          //
+          if (aidx != geom[j].GetAidx())
+            continue;
+
+          pvar = 0.;
+          
+          if (option.Contains("RSigma"))
+            pvar = pix.GetRSigma();
+          if (option.Contains("AbsTime"))
+            pvar = pix.GetAbsTimeMean();
+          if (option.Contains("ConversionHiLo"))
+            pvar = pix.GetConversionHiLo();
+          if (option.Contains("ConvertedMean"))
+            pvar = pix.GetConvertedMean();
+          if (option.Contains("ConvertedSigma"))
+            pvar = pix.GetConvertedSigma();
+          if (option.Contains("ConvertedRSigma"))
+            pvar = pix.GetConvertedRSigma();
+          if (option.Contains("MeanConvFADC2Phe"))
+            pvar = pix.GetMeanConvFADC2Phe();
+          if (option.Contains("MeanFFactorFADC2Phot"))
+            pvar = pix.GetMeanFFactorFADC2Phot();
+          if (option.Contains("Ped"))
+            pvar = pix.GetPed();
+          if (option.Contains("PedRms"))
+            pvar = pix.GetPedRms();
+          if (option.Contains("PheFFactorMethod"))
+            pvar = pix.GetPheFFactorMethod();
+          if (option.Contains("RSigmaPerCharge"))
+            pvar = pix.GetRSigmaPerCharge();
+
+          variab  += pvar;
+          variab2 += pvar*pvar;
+          num++;
+          
+          camcharge.Fill(j,pvar);
+          camcharge.SetUsed(j);
+        }
+      
+      if (num > 1)
+        {
+          variab  /= num;
+          variance = (variab2 - variab*variab*num) / (num-1);
+
+          vararea[i] = variab;
+          if (variance > 0.)
+            varareaerr[i] = TMath::Sqrt(variance);
+          else
+            varareaerr[i] = 999999999.;
+
+          //
+          // Make also a Gauss-fit to the distributions. The RMS can be determined by 
+          // outlier, thus we look at the sigma and the RMS and take the smaller one, afterwards.
+          // 
+          h = camcharge.ProjectionS(TArrayI(),TArrayI(1,&aidx),"_py",750);
+          h->SetDirectory(NULL);
+          h->Fit("gaus","QL");
+          TF1 *fit = h->GetFunction("gaus");
+
+          Float_t ci2   = fit->GetChisquare();
+          Float_t sigma = fit->GetParameter(2);
+
+          if (ci2 > 500. || sigma > varareaerr[i])
+            {
+              h->Fit("gaus","QLM");
+              fit = h->GetFunction("gaus");
+
+              ci2   = fit->GetChisquare();
+              sigma = fit->GetParameter(2);
+            }
+          
+          const Float_t mean  = fit->GetParameter(1);
+          const Float_t ndf   = fit->GetNDF();
+          
+          *fLog << inf << "Camera Nr: " << i << endl;
+          *fLog << inf << option.Data() << " area idx: " << aidx << " Results: " << endl;
+          *fLog << inf << "Mean: " << Form("%4.3f",mean) 
+                << "+-" << Form("%4.3f",fit->GetParError(1))
+                << "  Sigma: " << Form("%4.3f",sigma) << "+-" << Form("%4.3f",fit->GetParError(2)) 
+                << "  Chisquare: " << Form("%4.3f",fit->GetChisquare()) << "  NDF  : " << ndf << endl;          
+          delete h;
+          gROOT->GetListOfFunctions()->Remove(fit);
+
+          if (sigma < varareaerr[i] && ndf > 2)
+            {
+              vararea   [i] = mean;
+              varareaerr[i] = sigma;
+            }
+        }
+      else
+        {
+          vararea[i]    = -1.;
+          varareaerr[i] = 0.;
+        }
+
+      nr[i] = i;
+      nrerr[i] = 0.;
+    }
+  
+  TGraphErrors *gr = new TGraphErrors(size,
+                                     nr.GetArray(),vararea.GetArray(),
+                                     nrerr.GetArray(),varareaerr.GetArray());
+  gr->SetTitle(Form("%s Area %3i Average",option.Data(),aidx));
+  gr->GetXaxis()->SetTitle("Camera Nr.");
+  //  gr->GetYaxis()->SetTitle("<Q> [1]");      
+  return gr;
+}
+
+
+// -------------------------------------------------------------------
+//
+// Returns a TGraphErrors with the mean effective number of photo-electrons per 
+// area index 'aidx' vs. the calibration camera number 
+//
+TGraphErrors *MCalibrationIntensityChargeCam::GetPhePerAreaVsTime( const Int_t aidx, const MGeomCam &geom)
+{
+  
+  const Int_t size = GetSize();
+  
+  if (size == 0)
+    return NULL;
+  
+  TArrayF phearea(size);
+  TArrayF pheareaerr(size);
+  TArrayF time(size);
+  TArrayF timeerr(size);
+  
+  for (Int_t i=0;i<GetSize();i++)
+    {
+      //
+      // Get the calibration cam from the intensity cam
+      //
+      MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);
+
+      //
+      // Get the calibration pix from the calibration cam
+      //
+      const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx);
+      const Float_t phe          = apix.GetPheFFactorMethod();
+      const Float_t pheerr       = apix.GetPheFFactorMethodErr();
+
+      phearea[i]       = phe;
+      pheareaerr[i]    = pheerr;
+
+      time[i] = i;
+      timeerr[i] = 0.;
+    }
+  
+  TGraphErrors *gr = new TGraphErrors(size,
+                                     time.GetArray(),phearea.GetArray(),
+                                     timeerr.GetArray(),pheareaerr.GetArray());
+  gr->SetTitle(Form("%s%3i","Phes Area %d Average",aidx));
+  gr->GetXaxis()->SetTitle("Camera Nr.");
+  gr->GetYaxis()->SetTitle("<N_phes> [1]");      
+  return gr;
+}
+
+// -------------------------------------------------------------------
+//
+// Returns a TGraphErrors with the event-by-event averaged charge per 
+// area index 'aidx' vs. the calibration camera number 
+//
+TGraphErrors *MCalibrationIntensityChargeCam::GetChargePerAreaVsTime( const Int_t aidx, const MGeomCam &geom)
+{
+  
+  const Int_t size = GetSize();
+  
+  if (size == 0)
+    return NULL;
+  
+  TArrayF chargearea(size);
+  TArrayF chargeareaerr(size);
+  TArrayF nr(size);
+  TArrayF nrerr(size);
+  
+  for (Int_t i=0;i<GetSize();i++)
+    {
+      //
+      // Get the calibration cam from the intensity cam
+      //
+      MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);
+
+      //
+      // Get the calibration pix from the calibration cam
+      //
+      const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx);
+      const Float_t charge          = apix.GetConvertedMean();
+      const Float_t chargeerr       = apix.GetConvertedSigma();
+
+      chargearea[i]       = charge;
+      chargeareaerr[i]    = chargeerr;
+
+      nr[i]    = i;
+      nrerr[i] = 0.;
+    }
+  
+  TGraphErrors *gr = new TGraphErrors(size,
+                                     nr.GetArray(),chargearea.GetArray(),
+                                     nrerr.GetArray(),chargeareaerr.GetArray());
+  gr->SetTitle(Form("%s%3i","Averaged Charges Area Idx %d",aidx));
+  gr->GetXaxis()->SetTitle("Camera Nr.");
+  gr->GetYaxis()->SetTitle("<Q> [FADC cnts]");      
+  return gr;
+}
+
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.h	(revision 5857)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.h	(revision 5858)
@@ -28,20 +28,4 @@
   MCalibrationIntensityChargeCam(const char *name=NULL, const char *title=NULL);
 
-  // Setters   
-  void  SetFFactorMethodValid           ( const Bool_t  b=kTRUE ) {
-    ((MCalibrationChargeCam*)GetCam())->SetFFactorMethodValid(b); }
-  void  SetNumPhotonsBlindPixelMethod   ( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsBlindPixelMethod(f); } 
-  void  SetNumPhotonsFFactorMethod      ( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsFFactorMethod   (f); }      
-  void  SetNumPhotonsPINDiodeMethod     ( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsPINDiodeMethod  (f); }   
-  void  SetNumPhotonsBlindPixelMethodErr( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsBlindPixelMethodErr(f); } 
-  void  SetNumPhotonsFFactorMethodErr   ( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsFFactorMethodErr(f); }      
-  void  SetNumPhotonsPINDiodeMethodErr  ( const Float_t f )  {
-    ((MCalibrationChargeCam*)GetCam())->SetNumPhotonsPINDiodeMethodErr(f); }   
-
   Int_t CountNumValidEntries(const UInt_t pixid, const MCalibrationCam::PulserColor_t col=MCalibrationCam::kNONE) const;
   
@@ -52,4 +36,10 @@
   TGraphErrors *GetPheVsChargePerArea( const Int_t aidx, const MCalibrationCam::PulserColor_t col=MCalibrationCam::kNONE);
   TH2F         *GetRazmikPlotResults( const Int_t aidx, const MGeomCam &geom );
+
+  TGraphErrors *GetPhePerAreaVsTime( const Int_t aidx, const MGeomCam &geom );
+  TGraphErrors *GetChargePerAreaVsTime( const Int_t aidx, const MGeomCam &geom );
+  TGraphErrors *GetVarPerAreaVsTime( const Int_t aidx, const MGeomCam &geom, const Option_t *opt );
+
+  TGraphErrors *GetVarVsTime( const Int_t pixid , const Option_t *opt );
   
   ClassDef(MCalibrationIntensityChargeCam, 1) // Container Intensity Charge Calibration Results Camera
Index: trunk/MagicSoft/Mars/mcalib/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mcalib/Makefile	(revision 5857)
+++ trunk/MagicSoft/Mars/mcalib/Makefile	(revision 5858)
@@ -21,7 +21,5 @@
 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../mhcalib -I../mhbase \
            -I../manalysis -I../mraw -I../mtools -I../mmc -I../mhist  \
-           -I../mimage -I../msignal -I../mbadpixels -I../mpedestal \
-           -I../mtrigger
-
+           -I../mimage -I../msignal -I../mbadpixels -I../mpedestal 
 # mhbase:    MBinning MH 
 # mgui:      MCamEvent (McalibrationCam)
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 5857)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 5858)
@@ -81,5 +81,4 @@
 
 #include "MRawRunHeader.h"
-#include "MTriggerPattern.h"
 
 ClassImp(MHCalibrationCam);
@@ -121,6 +120,5 @@
        fColor(MCalibrationCam::kNONE), fIntensBad(NULL),
        fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), 
-       fRunHeader(NULL), fTrigPattern(NULL), fInterlacedFlags(0), 
-       fMaskInterlaced(0)
+       fRunHeader(NULL)
 {
 
@@ -151,5 +149,4 @@
     SetOscillations(kTRUE);
     SetSizeCheck   (kTRUE);
-    SetInterlaced  (kFALSE);
 }
 
@@ -515,20 +512,4 @@
   }
 
-  if (IsInterlaced())
-    {
-      fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern");
-      if (!fTrigPattern)
-        {
-          *fLog << err << "MTriggerPattern not found... abort." << endl;
-          return kFALSE;
-        }
-      if (IsInterlacedTypePed())
-        fMaskInterlaced |= MTriggerPattern::kPedestal;
-      if (IsInterlacedTypeCal())
-        fMaskInterlaced |= MTriggerPattern::kCalibration;
-      if (IsInterlacedTypePin())
-        fMaskInterlaced |= MTriggerPattern::kPinDiode;
-    }
-  
   return SetupHists(pList);
 }
@@ -863,9 +844,4 @@
 {
 
-  if (IsInterlaced())
-    // check whether one of the bits in fMaskInterlaced is set in the trigger pattern
-    if (!(fTrigPattern->GetPrescaled() & fMaskInterlaced))
-      return kTRUE;
-
   if (!IsSizeCheck())
     return FillHists(par,w);
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 5857)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 5858)
@@ -29,5 +29,4 @@
 class MGeomCam;
 class MRawRunHeader;
-class MTriggerPattern;
 class MCalibrationIntensityCam;
 class MCalibrationCam;
@@ -89,5 +88,4 @@
   MGeomCam         *fGeom;                //! Camera geometry
   MRawRunHeader    *fRunHeader;           //! Run Header
-  MTriggerPattern  *fTrigPattern;         //! Trigger Pattern
   
   TOrdCollection *fHiGainArray;           // Array of calibration pixels, one per pixel
@@ -97,18 +95,7 @@
 
   enum { kDebug, kLoGain, kAverageing,
-         kOscillations, kSizeCheck,
-         kInterlaced  };                  // Possible global flags
+         kOscillations, kSizeCheck };     // Possible global flags
    
   Byte_t  fFlags;                         // Bit-field to hold the global flags
-  
-  enum InterlacedMode_t
-    {
-      kInterlacedPed = BIT(0),
-      kInterlacedCal = BIT(1),
-      kInterlacedPin = BIT(2)
-    };                                    // Possible interlaced event types to be treated
-
-  Byte_t  fInterlacedFlags;               // Bit-field to hold the interlaced flags
-  Byte_t  fMaskInterlaced;                // Mask to define the interlaced event types
   
   virtual Bool_t SetupHists ( const MParList *pList ) { return kTRUE; }
@@ -157,10 +144,5 @@
   Bool_t IsOscillations() const  { return TESTBIT(fFlags,kOscillations); }
   Bool_t IsSizeCheck   () const  { return TESTBIT(fFlags,kSizeCheck);    }
-  Bool_t IsInterlaced  () const  { return TESTBIT(fFlags,kInterlaced);   }
-
-  Bool_t IsInterlacedTypePed() const { return TESTBIT(fInterlacedFlags,kInterlacedPed); }
-  Bool_t IsInterlacedTypeCal() const { return TESTBIT(fInterlacedFlags,kInterlacedCal); }
-  Bool_t IsInterlacedTypePin() const { return TESTBIT(fInterlacedFlags,kInterlacedPin); }
-  
+
   void   Remove  ( TOrdCollection *col );
   
@@ -222,12 +204,4 @@
 								? SETBIT(fFlags,kSizeCheck) 
 								: CLRBIT(fFlags,kSizeCheck); }
-  void SetInterlaced              ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kInterlaced) 
-								: CLRBIT(fFlags,kInterlaced); }
-
-  void SetInterlacedTypePed() { SETBIT(fInterlacedFlags,kInterlacedPed); }
-  void SetInterlacedTypeCal() { SETBIT(fInterlacedFlags,kInterlacedCal); }
-  void SetInterlacedTypePin() { SETBIT(fInterlacedFlags,kInterlacedPin); }
-
   void SetHistName  ( const char *name )  { fHistName  = name;  }
   void SetHistTitle ( const char *name )  { fHistTitle = name;  }
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 5857)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 5858)
@@ -282,6 +282,5 @@
 
   InitHiGainArrays(npixels,nareas,nsectors);
-  if (IsLoGain())
-    InitLoGainArrays(npixels,nareas,nsectors);
+  InitLoGainArrays(npixels,nareas,nsectors);
 
   fSumareahi  .Set(nareas); 
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignalFromOutside.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignalFromOutside.h	(revision 5857)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignalFromOutside.h	(revision 5858)
@@ -43,4 +43,6 @@
     Byte_t fStorage;                  // Bit-field for chosen storage type
 
+    Bool_t fInterlaced;               // Distinguish interlaced from other calibrations
+    
     Bool_t IsNoStorage    () const { return TESTBIT(fStorage,kNoStorage);    }
     Bool_t IsHistsStorage () const { return TESTBIT(fStorage,kHistsStorage); }
@@ -66,4 +68,5 @@
     void SetNoStorage    ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kNoStorage)    : CLRBIT(fStorage,kNoStorage); }
     void SetHistsStorage ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kHistsStorage) : CLRBIT(fStorage,kHistsStorage); }
+    void SetInterlaced ( const Bool_t b=kTRUE )  { fInterlaced = b; }
     
     Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam, MCalibrationChargeCam &chargecam,
