Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 9606)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 9607)
@@ -24,4 +24,7 @@
      - added missing SetFileNumber
 
+   * mjobs/MSequence.cc:
+     - added the missing file number to teh MC file names
+
 
 
Index: /trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 9606)
+++ /trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 9607)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz, 8/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2004-2008
+!   Copyright: MAGIC Software Development, 2004-2010
 !
 !
@@ -47,6 +47,10 @@
 //   Sequence:     31015
 //
+//   # Telescope number the sequence belongs to (if the resource is omitted
+//   #  the default is 1)
+//   Telescope:    1
+//
 //   # Observation Period (not needed, calculated from Night)
-//   # Period:       18
+//   # Period:     18
 //
 //   # Date of sunrise of the observation night - necessary if the path
@@ -218,5 +222,5 @@
     }
 
-    if (run<1000000 && file>0)
+    if (!fMonteCarlo && run<1000000 && file>0)
         *fLog << warn << "WARNING - Run number " << run << "<" << "1,000,000 but file " << file << ">0..." << endl;
 
@@ -448,5 +452,8 @@
 {
     if (!night && type==kCorsika)
+    {
+        // /magic/simulated/ceres/001/000/0001/cer123456
         return MString::Format("cer%06d", -run);
+    }
 
     const char *id="_";
@@ -489,5 +496,9 @@
     // This is for MCs (FIXME!!!!)
     if (run<0)
+    {
         n += MString::Format("%08d", -run);
+        if (file>0)
+            n += MString::Format(".%03d", file);
+    }
     else
     {
@@ -503,4 +514,5 @@
             n += MString::Format(".%03d", file);
     }
+
 
     n += "_";
@@ -536,8 +548,14 @@
 TString MSequence::GetFileRegexp(UInt_t i, const TArrayI &arr, const TArrayI &sub, FileType_t type) const
 {
+    // Entry doesn't exist
     if (i>=(UInt_t)arr.GetSize())
         return "";
 
-    return InflateFileName(fNight, arr[i]>999999?fTelescope:0, fMonteCarlo?-arr[i]:arr[i], sub.GetSize()>0?sub[i]:0, type);
+    // This is (so far) well defined for MAGIC data
+    if (!fMonteCarlo)
+        return InflateFileName(fNight, arr[i]>999999?fTelescope:0, arr[i], sub.GetSize()>0?sub[i]:0, type);
+
+    // Monte Carlos
+    return InflateFileName(fNight, fTelescope, -arr[i], sub.GetSize()>0?sub[i]:0, type);
 }
 
