Index: /trunk/Mars/ceres.cc
===================================================================
--- /trunk/Mars/ceres.cc	(revision 19626)
+++ /trunk/Mars/ceres.cc	(revision 19627)
@@ -76,6 +76,8 @@
     gLog << "   --mode=calibration        calibration data (no input files required) or" << endl;
     gLog << "   --mode=data               process data files [default]" << endl << endl;
-    gLog << "   --run-number=#            Optionally set the run number of the run to simulate" << endl;
-    gLog << "   --fits                    Write FITS output files instead of root files." << endl << endl;
+    gLog << "   --run-number=#            Optionally set the run number to simulate" << endl;
+    gLog << "   --fits                    Write FITS output files instead of root files." << endl;
+    gLog << "   --list                    The specified .txt file contains a file list" << endl;
+    gLog << "                              (see MDirIter::ReadFile)." << endl << endl;
     gLog << endl;
 //    gLog << "     -f:  force reading of runheader" << endl;
@@ -177,4 +179,5 @@
     const TString kOpMode     = arg.GetStringAndRemove("--mode=", "data");
     const Bool_t  kFitsFile   = arg.HasOnlyAndRemove("--fits");
+    const Bool_t  kFileList   = arg.HasOnlyAndRemove("--list");
 
     Int_t opmode = -1;
@@ -274,6 +277,6 @@
     // Setup sequence and check its validity
     //
-    MSequence seq(kSequence, kInpath);
-    if (!kSequence.IsNull())
+    MSequence seq(kFileList ? "" : kSequence, kInpath);
+    if (!kSequence.IsNull() && !kFileList)
     {
         if (kPrintSeq)
@@ -305,4 +308,16 @@
     else
     {
+        if (kFileList)
+        {
+            arg.RemoveArgument(0);
+
+            MDirIter Next;
+            Next.ReadList(kSequence);
+
+            TString name;
+            while (!(name=Next()).IsNull())
+                arg.AddEntry(name);
+        }
+
         if (kPrintFiles)
             PrintFiles(arg, kFALSE);
