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);
