Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7258)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7259)
@@ -24,4 +24,12 @@
      - added (script to make the links for the correct callisto.rc in 
        case when callisto_Dec04Jan05.rc is needed)
+
+   * datacenter/macros/writesequencefile.C:
+     - added writing of ZdMin and ZdMax to the sequencefile
+
+   * sinope.cc
+     - added printing of Usage() in case of missing arguments
+     - added option --outf to make it possible to give the filename 
+       (needed for automation of datacheck)
 
 
Index: trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C	(revision 7258)
+++ trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C	(revision 7259)
@@ -257,5 +257,5 @@
         return kFALSE;
 
-    TString fname(Form("%s/sequences/%04d/sequence%08d.txt", sequpath.Data(), atoi(data[0])/10000, atoi(data[0])));
+    TString fname(Form("%s/%04d/sequence%08d.txt", sequpath.Data(), atoi(data[0])/10000, atoi(data[0])));
     cout << "Creating " << fname << "..." << flush;
 
@@ -267,17 +267,19 @@
     }
 
-    fout << "Sequence:        " << data[0] << endl;
-    fout << "Period:          " << period  << endl;
-    fout << "Night:           " << date    << endl;
-    fout << "LightConditions: " << str[5] << endl;
-    fout << endl;
-    fout << "Start:           " << data[8] << endl;
-    fout << "LastRun:         " << data[1] << endl;
-    fout << "Project:         " << str[0]  << endl;
-    fout << "Source:          " << str[1]  << endl;
-    fout << "L1TriggerTable:  " << str[2]  << endl;
-    fout << "L2TriggerTable:  " << str[3]  << endl;
-    fout << "HvSettings:      " << str[4]  << endl;
-    fout << "NumEvents:       " << data[9] << endl;
+    fout << "Sequence:        " << data[0]  << endl;
+    fout << "Period:          " << period   << endl;
+    fout << "Night:           " << date     << endl;
+    fout << "LightConditions: " << str[5]   << endl;
+    fout << endl;
+    fout << "Start:           " << data[8]  << endl;
+    fout << "LastRun:         " << data[1]  << endl;
+    fout << "Project:         " << str[0]   << endl;
+    fout << "Source:          " << str[1]   << endl;
+    fout << "ZdMin:           " << data[10] << endl;
+    fout << "ZdMax:           " << data[11] << endl;
+    fout << "L1TriggerTable:  " << str[2]   << endl;
+    fout << "L2TriggerTable:  " << str[3]   << endl;
+    fout << "HvSettings:      " << str[4]   << endl;
+    fout << "NumEvents:       " << data[9]  << endl;
     fout << endl;
 
@@ -327,5 +329,6 @@
     TString query(Form("SELECT fSequenceFirst, fSequenceLast, fProjectKEY, fSourceKEY,"
                        " fL1TriggerTableKEY, fL2TriggerTableKEY, fHvSettingsKEY, "
-                       " fLightConditionsKEY, fRunStart, fNumEvents"
+                       " fLightConditionsKEY, fRunStart, fNumEvents, "
+                       " fZenithDistanceMin, fZenithDistanceMax "
                        " FROM Sequences WHERE fSequenceFirst=%d", sequno));
     TSQLResult *res = serv.Query(query);
Index: trunk/MagicSoft/Mars/sinope.cc
===================================================================
--- trunk/MagicSoft/Mars/sinope.cc	(revision 7258)
+++ trunk/MagicSoft/Mars/sinope.cc	(revision 7259)
@@ -109,4 +109,5 @@
 
 TString kOutpath="";
+TString kOutfile="";
 MStatusDisplay *d=0;
 
@@ -220,4 +221,5 @@
     gLog << "                             [default=standard path in datacenter]" << endl;
     gLog << "   --out=path                Path to write the all results to [def=local path]" << endl;
+    gLog << "   --outf=filename           Filename of the outputfiles [def=sinope{runnumber}.*]" << endl;
     gLog << "   --num={number}            Number of events to process (default=1000)" << endl;
     gLog << "   --print-seq               Print Sequence information" << endl;
@@ -289,4 +291,5 @@
     const TString kInpathD    = arg.GetStringAndRemove("--ind=",  "");
     /*const TString*/ kOutpath    = arg.GetStringAndRemove("--out=",  "");
+    /*const TString*/ kOutfile    = arg.GetStringAndRemove("--outf=",  "");
 
     const Int_t   kNumEvents  = arg.GetIntAndRemove("--num=", header.GetNumEvents());
@@ -299,4 +302,5 @@
         arg.Print("options");
         gLog << endl;
+        Usage();
         return 2;
     }
@@ -306,4 +310,5 @@
         gLog << warn << "ERROR - No '--run=' option given... required." << endl;
         gLog << endl;
+        Usage();
         return 2;
     }
@@ -312,4 +317,5 @@
         gLog << warn << "ERROR - No '--date=' option given... required." << endl;
         gLog << endl;
+        Usage();
         return 2;
     }
@@ -361,5 +367,8 @@
     if (!kOutpath.EndsWith("/"))
         kOutpath += "/";
-    kOutpath += Form("sinope%08d.", kRunNumber);
+    if (kOutfile.IsNull())
+        kOutpath += Form("sinope%08d.", kRunNumber);
+    else
+        kOutpath += kOutfile+".";
 
     if (!kOverwrite)
