Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9608)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9609)
@@ -31,4 +31,7 @@
        number to be 1.
 
+   * mjobs/MJSimulation.[h,cc]:
+     - added run-number to ceres.root filename
+
 
 
Index: trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJSimulation.cc	(revision 9608)
+++ trunk/MagicSoft/Mars/mjobs/MJSimulation.cc	(revision 9609)
@@ -149,5 +149,5 @@
 */
 
-Bool_t MJSimulation::WriteResult(const MParList &plist, const MSequence &seq)
+Bool_t MJSimulation::WriteResult(const MParList &plist, const MSequence &seq, Int_t num)
 {
     if (fPathOut.IsNull())
@@ -184,5 +184,5 @@
     }
 
-    const TString name = seq.IsValid() ? Form("ceres%08d.root", seq.GetSequence()) : "ceres.root";
+    const TString name =  Form("ceres%08d.root", num);
     return WriteContainer(cont, name, "RECREATE");
 }
@@ -315,5 +315,5 @@
     case kModeData:
         header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTData);
-         header.SetRunInfo(0, fRunNumber<0 ? 3 : fRunNumber);
+        header.SetRunInfo(0, fRunNumber<0 ? 3 : fRunNumber);
         break;
 
@@ -931,5 +931,5 @@
     //-------------------------------------------
 
-    if (!WriteResult(plist, seq))
+    if (!WriteResult(plist, seq, header.GetRunNumber()))
         return kFALSE;
 
Index: trunk/MagicSoft/Mars/mjobs/MJSimulation.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJSimulation.h	(revision 9608)
+++ trunk/MagicSoft/Mars/mjobs/MJSimulation.h	(revision 9609)
@@ -26,5 +26,5 @@
     Int_t  fRunNumber;      // 8 digits run number to be used for the file names
 
-    Bool_t WriteResult(const MParList &plist, const MSequence &seq);
+    Bool_t WriteResult(const MParList &plist, const MSequence &seq, Int_t run);
     Bool_t CheckEnvLocal();
 
