Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5236)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5237)
@@ -1920,51 +1920,55 @@
 Bool_t MJCalibration::WriteResult(TObject *geom)
 {
-    if (fPathOut.IsNull())
-        return kTRUE;
-
-    const TString oname(GetOutputFile());
-
-    *fLog << inf << "Writing to file: " << oname << endl;
-
-    TFile file(oname, "UPDATE", "File created by MJCalibration", 9);
-    if (!file.IsOpen())
-    {
-        *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
-        return kFALSE;
-    }
-
-    *fLog << inf << " - MStatusDisplay..." << flush;
-    if (fDisplay && fDisplay->Write()<=0)
-    {
-        *fLog << err << "Unable to write MStatusDisplay to " << oname << endl;
-        return kFALSE;
-    }
-    *fLog << inf << "ok." << endl;
-
-    TObjArray cont;
-    if (IsIntensity())
-    {
-        cont.Add(&fIntensBadCam);
-        cont.Add(&fIntensCalibCam);
-        cont.Add(&fIntensQECam);
-        cont.Add(&fIntensBlindCam);
-    }
-    else
-    {
-        cont.Add(&fBadPixels);
-        cont.Add(&fCalibrationCam);
-        cont.Add(&fQECam);
-        cont.Add(&fCalibrationBlindCam);
-    }
-    cont.Add(&fCalibrationPINDiode);
-    if (IsRelTimes())
-      cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam);
-
-    if (!geom)
-        *fLog << warn << " - WARNING - MGeomCam... not found!" << endl;
-    else
-      cont.Add(geom);
-
-    return WriteContainer(cont);
+
+  if (IsNoStorage())
+    return kTRUE;
+
+  if (fPathOut.IsNull())
+    return kTRUE;
+  
+  const TString oname(GetOutputFile());
+  
+  *fLog << inf << "Writing to file: " << oname << endl;
+
+  TFile file(oname, "UPDATE", "File created by MJCalibration", 9);
+  if (!file.IsOpen())
+    {
+      *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
+      return kFALSE;
+    }
+  
+  *fLog << inf << " - MStatusDisplay..." << flush;
+  if (fDisplay && fDisplay->Write()<=0)
+    {
+      *fLog << err << "Unable to write MStatusDisplay to " << oname << endl;
+      return kFALSE;
+    }
+  *fLog << inf << "ok." << endl;
+  
+  TObjArray cont;
+  if (IsIntensity())
+    {
+      cont.Add(&fIntensBadCam);
+      cont.Add(&fIntensCalibCam);
+      cont.Add(&fIntensQECam);
+      cont.Add(&fIntensBlindCam);
+    }
+  else
+    {
+      cont.Add(&fBadPixels);
+      cont.Add(&fCalibrationCam);
+      cont.Add(&fQECam);
+      cont.Add(&fCalibrationBlindCam);
+    }
+  cont.Add(&fCalibrationPINDiode);
+  if (IsRelTimes())
+    cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam);
+  
+  if (!geom)
+    *fLog << warn << " - WARNING - MGeomCam... not found!" << endl;
+  else
+    cont.Add(geom);
+  
+  return WriteContainer(cont);
 }
 
