Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 7069)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 7095)
@@ -173,4 +173,5 @@
     SetOscillations(kTRUE);
     SetSizeCheck   (kTRUE);
+    SetIsReset     (kTRUE);
 
     SetLowerFitLimitHiGain();
@@ -383,4 +384,5 @@
 void MHCalibrationCam::ResetHists()
 {
+  SetIsReset();
   
   ResetHistTitles();
@@ -396,5 +398,5 @@
         { fAverageHiGainSectors->ForEach(MHCalibrationPix,Reset)();  }
     }
-  
+
   if (!IsLoGain())
     return;
@@ -428,6 +430,6 @@
         MHCalibrationPix &pix = (*this)[i];        
         h = pix.GetHGausHist();
-        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->SetName (Form("H%sHiGainPix%04d",fHistName.Data(),i));
+        h->SetTitle(Form("%s High Gain Pixel %04d Runs: ",fHistTitle.Data(),i));
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -441,13 +443,13 @@
             MHCalibrationPix &pix = GetAverageHiGainArea(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%d","H",fHistName.Data(),"HiGainArea",j));
+            h->SetName (Form("H%sHiGainArea%d",fHistName.Data(),j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
             if (fGeom->InheritsFrom("MGeomCamMagic"))
-              h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis ",
-                               j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis %s High Gain Runs: ",
+                                 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels"));
             else
-              h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),
-                               " averaged on event-by-event basis High Gain Area Idx ",j," Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis High Gain Area Idx %d Runs: ",
+                                 fHistTitle.Data(), j));
           }
       
@@ -457,7 +459,7 @@
             MHCalibrationPix &pix = GetAverageHiGainSector(j);        
             h = pix.GetHGausHist();
-            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->SetName (Form("H%sHiGainSector%02d",fHistName.Data(),j));
+            h->SetTitle(Form("%s averaged on event-by-event basis High Gain Sector %02d Runs: ",
+                             fHistTitle.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
@@ -473,6 +475,6 @@
         MHCalibrationPix &pix = (*this)(i);        
         h = pix.GetHGausHist();
-        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->SetName (Form("H%sLoGainPix%04d",fHistName.Data(),i));
+        h->SetTitle(Form("%s Low Gain Pixel %04d Runs: ", fHistTitle.Data(),i));
         h->SetXTitle(fHistXTitle.Data());
         h->SetYTitle(fHistYTitle.Data());
@@ -486,13 +488,13 @@
             MHCalibrationPix &pix = GetAverageLoGainArea(j);        
             h = pix.GetHGausHist();
-            h->SetName (Form("%s%s%s%d","H",fHistName.Data(),"LoGainArea",j));
+            h->SetName (Form("H%sLoGainArea%d", fHistName.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
             if (fGeom->InheritsFrom("MGeomCamMagic"))
-              h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis ",
-                               j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis %s Low Gain Runs: ",
+                                 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels"));
             else
-              h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),
-                               " averaged on event-by-event basis Low Gain Area Idx ",j," Runs: "));
+                h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Area Idx %d Runs: ",
+                                 fHistTitle.Data(), j));
           }
       
@@ -502,7 +504,7 @@
             MHCalibrationPix &pix = GetAverageLoGainSector(j);        
             h = pix.GetHGausHist();
-            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->SetName (Form("H%sLoGainSector%02d",fHistName.Data(),j));
+            h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Sector %02d Runs: ",
+                             fHistTitle.Data(), j));
             h->SetXTitle(fHistXTitle.Data());
             h->SetYTitle(fHistYTitle.Data());
@@ -872,4 +874,5 @@
 Bool_t MHCalibrationCam::Fill(const MParContainer *par, const Stat_t w)
 {
+  SetIsReset(kFALSE);
 
   if (!IsSizeCheck())
@@ -942,4 +945,6 @@
 Bool_t MHCalibrationCam::Finalize()
 {
+  if (IsReset())
+    return kTRUE;
 
   if (GetNumExecutions() < 2)
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 7069)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h	(revision 7095)
@@ -108,6 +108,12 @@
   Int_t  fPulserFrequency;                // Light pulser frequency
 
-  enum { kDebug, kLoGain, kAverageing,
-         kOscillations, kSizeCheck };     // Possible global flags
+  enum {
+      kDebug,
+      kLoGain,
+      kAverageing,
+      kOscillations,
+      kSizeCheck,
+      kIsReset
+  };     // Possible global flags
    
   Byte_t  fFlags;                         // Bit-field to hold the global flags
@@ -159,4 +165,7 @@
   Bool_t IsOscillations() const  { return TESTBIT(fFlags,kOscillations); }
   Bool_t IsSizeCheck   () const  { return TESTBIT(fFlags,kSizeCheck);    }
+  Bool_t IsReset       () const  { return TESTBIT(fFlags,kIsReset);      }
+
+  void ToggleFlag(Bool_t b, Byte_t flag) { b ? SETBIT(fFlags, flag) : CLRBIT(fFlags,flag); }
 
   void   Remove  ( TOrdCollection *col );
@@ -203,20 +212,13 @@
   const MHCalibrationPix  &operator()            (UInt_t i)  const;
  
-  void SetColor                   ( const MCalibrationCam::PulserColor_t color) { fColor = color; }
-  void SetAverageing              ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kAverageing) 
-								: CLRBIT(fFlags,kAverageing); }
-  void SetDebug                   ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kDebug) 
-								: CLRBIT(fFlags,kDebug); }
-  void SetLoGain                  ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kLoGain) 
-								: CLRBIT(fFlags,kLoGain); }
-  void SetOscillations            ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kOscillations) 
-								: CLRBIT(fFlags,kOscillations); }
-  void SetSizeCheck               ( const Bool_t b=kTRUE ) { b 
-								? SETBIT(fFlags,kSizeCheck) 
-								: CLRBIT(fFlags,kSizeCheck); }
+  void SetColor(const MCalibrationCam::PulserColor_t color) { fColor = color; }
+
+  void SetAverageing(const Bool_t b=kTRUE)   { ToggleFlag(b,kAverageing); }
+  void SetDebug(const Bool_t b=kTRUE)        { ToggleFlag(b,kDebug); }
+  void SetLoGain(const Bool_t b=kTRUE)       { ToggleFlag(b,kLoGain); }
+  void SetOscillations(const Bool_t b=kTRUE) { ToggleFlag(b,kOscillations); }
+  void SetSizeCheck(const Bool_t b=kTRUE)    { ToggleFlag(b,kSizeCheck); }
+  void SetIsReset(const Bool_t b=kTRUE)      { ToggleFlag(b,kIsReset); }
+
   void SetHistName  ( const char *name )  { fHistName  = name;  }
   void SetHistTitle ( const char *name )  { fHistTitle = name;  }
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc	(revision 7069)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc	(revision 7095)
@@ -1,2 +1,3 @@
+
 /* ======================================================================== *\
 !
@@ -371,10 +372,16 @@
     {
       MHCalibrationPix &histhi = GetAverageHiGainArea(j);
-      histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
+      if (IsOscillations())
+	histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
+      else
+	histhi.FillHist(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
 
       if (IsLoGain())
 	{
 	  MHCalibrationPix &histlo = GetAverageLoGainArea(j);
-	  histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
+	  if (IsOscillations())
+	    histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
+	  else
+	    histlo.FillHist(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
 	}
     }
@@ -383,10 +390,16 @@
     {
       MHCalibrationPix &hist = GetAverageHiGainSector(j);
-      hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
+      if (IsOscillations())
+	hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
+      else
+	hist.FillHist(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
 
       if (IsLoGain())
 	{
 	  MHCalibrationPix &histlo = GetAverageLoGainSector(j);
-	  histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
+	  if (IsOscillations())
+	    histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
+	  else
+	    histlo.FillHist(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
 	}
     }
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h	(revision 7069)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h	(revision 7095)
@@ -18,9 +18,8 @@
 class MGeomCam;
 class MArrivalTimeCam;
+
 class MHCalibrationHiLoCam : public MHCalibrationCam
 {
-
 private:
-
   static const Int_t   fgNbins;                      //! Default number of bins        (now set to: 900   )
   static const Axis_t  fgFirst;                      //! Default lower histogram limit (now set to: -13.5 )
@@ -52,7 +51,5 @@
   
 public:
-
   MHCalibrationHiLoCam(const char *name=NULL, const char *title=NULL);
-  ~MHCalibrationHiLoCam() {}
 
   // Clone
