Index: trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 7232)
@@ -31,11 +31,9 @@
 // to group the runs of one night into sequences, this marco:
 // - reads the runinformation of one night from the database
-// - sorts the runs by source
-// - groups the runs to sequences such that each run belongs
+// - group the runs into sets of following runs with the same conditions
+// - groups the runs in this sets to sequences such that each run belongs
 //   to the nearest (in time) calibration run
-//
-// apart from that the runs in one sequence must have the same
-// hv-settings, trigger tables, light conditions, DT tables,
-// trigger delay tables and testflag
+// - check if the runs with the same runtype have the same calibration script
+//   and the same trigger tables
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -62,5 +60,5 @@
 int debug = 0;
 
-Bool_t DeleteSequence(MSQLServer &serv, Int_t sequ, Bool_t dummy)
+Bool_t DeleteSequence(MSQLServer &serv, TString datapath, TString sequpath, Int_t sequ, Bool_t dummy)
 {
     TString query1(Form("DELETE FROM Calibration WHERE fSequenceFirst=%d", sequ));
@@ -70,7 +68,7 @@
     TString query5(Form("DELETE FROM Sequences WHERE fSequenceFirst=%d AND fManuallyChangedKEY=1", sequ));
 
-    TString fname(Form("/mnt/stk01/sequences/%04d/sequence%08d.txt", sequ/10000, sequ));
-    TString command(Form("rm -r /magic/data/callisto/%04d/%08d/", sequ/10000, sequ));
-    TString command2(Form("rm -r /magic/data/star/%04d/%08d/", sequ/10000, sequ));
+    TString fname(Form("%s/%04d/sequence%08d.txt", sequpath.Data(),sequ/10000, sequ));
+    TString command(Form("rm -r %s/callisto/%04d/%08d/", datapath.Data(), sequ/10000, sequ));
+    TString command2(Form("rm -r %s/star/%04d/%08d/", datapath.Data(), sequ/10000, sequ));
 
     if (dummy)
@@ -177,5 +175,5 @@
 }
 
-Bool_t CheckSequence(MSQLServer &serv, Int_t from, Int_t to, Bool_t dummy)
+Bool_t CheckSequence(MSQLServer &serv, TString datapath, TString sequpath, Int_t from, Int_t to, Bool_t dummy)
 {
     Bool_t rc=kFALSE;
@@ -213,5 +211,5 @@
             {
                 cout << "deleting sequence " << sequences.At(i) << "... <" << i << ">" << endl;
-                if(!DeleteSequence(serv, sequences.At(i), dummy))
+                if(!DeleteSequence(serv, datapath, sequpath, sequences.At(i), dummy))
                    rc=kFALSE;
             }
@@ -267,5 +265,5 @@
         {
             cout << "different sequsizes -> deleting sequence " << sequences.At(0) << endl;
-            return DeleteSequence(serv, sequences.At(0), dummy);
+            return DeleteSequence(serv, datapath, sequpath, sequences.At(0), dummy);
         }
 
@@ -275,5 +273,5 @@
                 continue;
             cout << "different runs -> deleting sequence " << sequences.At(0) << endl;
-            return DeleteSequence(serv, sequences.At(0), dummy);
+            return DeleteSequence(serv, datapath, sequpath, sequences.At(0), dummy);
         }
 
@@ -405,5 +403,5 @@
 }
 
-Bool_t NewSequence(MSQLServer &serv, Int_t from, Int_t to, Bool_t dummy)
+Bool_t NewSequence(MSQLServer &serv, TString datapath, TString sequpath, Int_t from, Int_t to, Bool_t dummy)
 {
     cout << "Found Sequence (" << from << ", " << to << ") ... checking runs..." << flush;
@@ -429,5 +427,5 @@
     cout << "checking Sequence..." << endl;
 
-    if (!CheckSequence(serv, from, to, dummy))
+    if (!CheckSequence(serv, datapath, sequpath, from, to, dummy))
     {
         cout << " inserting sequence not necessary" << endl;
@@ -446,5 +444,5 @@
 }
 
-Bool_t Process(MSQLServer &serv, Int_t from, Int_t to, Bool_t dummy)
+Bool_t Process(MSQLServer &serv, TString datapath, TString sequpath, Int_t from, Int_t to, Bool_t dummy)
 {
 
@@ -589,5 +587,5 @@
             if (n!=-1)
             {
-                if (!NewSequence(serv, start, last, dummy))
+                if (!NewSequence(serv, datapath, sequpath, start, last, dummy))
                 {
                     rc = kFALSE;
@@ -605,5 +603,5 @@
     if (n!=-1 && start!=last)
     {
-        if (!NewSequence(serv, start, last, dummy))
+        if (!NewSequence(serv, datapath, sequpath, start, last, dummy))
             rc = kFALSE;
     }
@@ -617,5 +615,5 @@
 
 
-int buildsequenceentries(TString day, Bool_t dummy=kTRUE)
+int buildsequenceentries(TString day, TString datapath, TString sequpath, Bool_t dummy=kTRUE)
 {
     TEnv env("sql.rc");
@@ -704,5 +702,5 @@
         cout << endl << "datablock from " << runstart2 << " to " << runstop2 << endl;
 
-        if (!Process(serv, runstart2, runstop2, dummy))
+        if (!Process(serv, datapath, sequpath, runstart2, runstop2, dummy))
             rc = kFALSE;
 
@@ -712,5 +710,5 @@
 
 
-int buildsequenceentries()
+int buildsequenceentries(TString datapath, TString sequpath, Bool_t dummy=kTRUE)
 {
     TEnv env("sql.rc");
@@ -733,5 +731,5 @@
     {
         cout << "date: " << (*row)[0] << endl;
-        buildsequenceentries((*row)[0]);
+        buildsequenceentries((*row)[0], dummy);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/macros/createdataset.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/createdataset.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/createdataset.C	(revision 7232)
@@ -27,4 +27,10 @@
 // createdataset.C
 // ===============
+//
+// this script is not run automatically
+// the purpose of this script is to make it easier for people to write
+// datasetfiles
+//
+// be careful with the path in this macro, if you use it for test-reasons!
 //
 /////////////////////////////////////////////////////////////////////////////
Index: trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C	(revision 7232)
@@ -44,5 +44,5 @@
 
 
-int findcacofiles(TString date)
+int findcacofiles(TString date, TString logpath)
 {
     TEnv env("sql.rc");
@@ -72,15 +72,12 @@
     }
 
-    Int_t idx = date.First('-');
-    TString year = date(0, idx);
-    cout << "year: " << year << endl;
-
-    ofstream fout("/magic/datacenter/autologs/filesondisk/"+year+"/findcacofiles-"+date+".txt");
+    TString filename(Form("%s/findcacofiles-%s.txt", logpath.Data(), date.Data()));
+    ofstream fout(filename, ios::app);
     if (!fout)
     {
-        cout << "ERROR - Cannot open file." << endl;
-        return kFALSE;
+        cout << "ERROR - Cannot open file " << filename << endl;
+        return 0;
     }
-    TString runnumber=0;
+
     TSQLRow *row=0;
     while ((row = res->Next()))
Index: trunk/MagicSoft/Mars/datacenter/macros/getdolist.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/getdolist.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/getdolist.C	(revision 7232)
@@ -45,5 +45,5 @@
 
 
-int getdolist(TString table, TString column, TString date)
+int getdolist(TString table, TString column, TString date, TString listpath)
 {
     TEnv env("sql.rc");
@@ -118,6 +118,11 @@
         return 0;
 
-    ofstream fout("/magic/datacenter/lists/ToDo-"+table+"-"+column+".txt", ios::app);
-//    ofstream fout("/data/MAGIC/datacenter/"+table+"-"+column+".txt", ios::app);
+    TString filename(Form("%s/ToDo%s-%s.txt", listpath.Data(), table.Data(), column.Data()));
+    ofstream fout(filename, ios::app);
+    if (!fout)
+    {
+        cout << "ERROR - Cannot open file " << filename << endl;
+        return 0;
+    }
 
     TSQLRow *row=0;
Index: trunk/MagicSoft/Mars/datacenter/macros/resetcolumn.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/resetcolumn.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/resetcolumn.C	(revision 7232)
@@ -33,5 +33,5 @@
 // for this step in the DB has to be reset. This can be done with this macro.
 //
-// As arguments you have to give the column, the table and the from which
+// As arguments you have to give the column, the table and from which
 // to which Date/Sequence/Run you want to reset the value.
 //
Index: trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C	(revision 7232)
@@ -233,5 +233,5 @@
 }
 
-Bool_t GetSequence(MSQLServer &serv, TSQLRow &data)
+Bool_t GetSequence(MSQLServer &serv, TSQLRow &data, TString sequpath)
 {
     UShort_t y;
@@ -257,5 +257,5 @@
         return kFALSE;
 
-    TString fname(Form("/mnt/stk01/sequences/%04d/sequence%08d.txt", atoi(data[0])/10000, atoi(data[0])));
+    TString fname(Form("%s/sequences/%04d/sequence%08d.txt", sequpath.Data(), atoi(data[0])/10000, atoi(data[0])));
     cout << "Creating " << fname << "..." << flush;
 
@@ -308,5 +308,5 @@
 
 // This tool will work from Period017 (2004_05_17) on...
-int writesequencefile(Int_t sequno)
+int writesequencefile(Int_t sequno, TString sequpath)
 {
     TEnv env("sql.rc");
@@ -333,5 +333,5 @@
     TSQLRow *row = 0;
     while ((row = res->Next()))
-        if (!GetSequence(serv, *row))
+        if (!GetSequence(serv, *row, sequpath))
             return 0;
 
Index: trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 7232)
@@ -83,5 +83,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
@@ -117,5 +117,5 @@
       fi
    fi
-   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
+   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
 
    case $check1 in
Index: trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7232)
@@ -74,5 +74,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 7232)
@@ -75,5 +75,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
@@ -99,5 +99,5 @@
    no=`printf %08d $dataset | cut -c 0-5`
    echo "checking files for dataset $dataset..." >> $scriptlog 2>&1 
-   datasetfile=/magic/datasets/$no/dataset`printf %08d $dataset`.txt
+   datasetfile=$datasetpath/$no/dataset`printf %08d $dataset`.txt
    sequences=(`cat $datasetfile | grep Sequences | sed -e 's/SequencesOn://g' | sed -e 's/SequencesOff://g'`)
    
Index: trunk/MagicSoft/Mars/datacenter/scripts/correcttime
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/correcttime	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/correcttime	(revision 7232)
@@ -59,5 +59,5 @@
 
 echo "getting list..."
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7232)
@@ -83,5 +83,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/filesondisk	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/filesondisk	(revision 7232)
@@ -85,5 +85,5 @@
 
 echo "checking missing cacofiles..."
-check1=`root -q -b $macrospath/findcacofiles.C+\("\"$date\""\) | tee $filesondisklogpath/findcacofiles-$date.log | grep int | sed -e 's/(int)//'`
+check1=`root -q -b $macrospath/findcacofiles.C+\("\"$date\""\,"\"$filesondisklogpath\""\) | tee $filesondisklogpath/findcacofiles-$date.log | grep int | sed -e 's/(int)//'`
 
 case $check1 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7232)
@@ -83,5 +83,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/fillstar
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7232)
@@ -83,5 +83,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
Index: trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets	(revision 7232)
@@ -64,5 +64,5 @@
 
 
-datasetfiles=(`ls /magic/datasets/*/*`)
+datasetfiles=(`ls $datasetpath/*/*`)
 echo "datasetfiles: "${datasetfiles[@]}  >> $scriptlog 2>&1 
 echo "" >> $scriptlog 2>&1 
Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7232)
@@ -32,5 +32,5 @@
 set -C
 
-callistorcnew=/magic/datacenter/setup/callisto/callisto.rc
+callistorcnew=$setuppath/callisto/callisto.rc
 
 table=SequenceProcessStatus
@@ -95,5 +95,5 @@
    
    echo "getting list..." >> $scriptlog 2>&1
-   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    
    case $check0 in 
@@ -187,5 +187,5 @@
     fi
   fi
-  sequfile="/magic/sequences/$no/sequence$no2.txt"
+  sequfile="$sequpath/$no/sequence$no2.txt"
   echo "sequfile: "$sequfile >> $scriptlog 2>&1
   
Index: trunk/MagicSoft/Mars/datacenter/scripts/runganymed
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7232)
@@ -90,5 +90,5 @@
 else
    echo "getting list..." >> $scriptlog 2>&1
-   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    
    case $check0 in 
@@ -181,5 +181,5 @@
     fi
   fi
-  datasetfile="/magic/datasets/$no/dataset$no2.txt"
+  datasetfile="$datasetpath/$no/dataset$no2.txt"
   echo "datasetfile: "$datasetfile >> $scriptlog 2>&1
   wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 
@@ -191,5 +191,5 @@
      mode="onoff" >> $scriptlog 2>&1 
   fi
-  ganymedrc=/magic/datacenter/setup/ganymed/ganymed_$mode.rc
+  ganymedrc=$setuppath/ganymed/ganymed_$mode.rc
   
   echo "run ganymed..." >> $scriptlog 2>&1
Index: trunk/MagicSoft/Mars/datacenter/scripts/runstar
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7232)
@@ -90,5 +90,5 @@
 else
    echo "getting list..." >> $scriptlog 2>&1
-   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    
    case $check0 in 
@@ -184,5 +184,5 @@
     fi
   fi
-  sequfile="/magic/sequences/$no/sequence$no2.txt"
+  sequfile="$sequpath/$no/sequence$no2.txt"
   echo "sequfile: "$sequfile >> $scriptlog 2>&1
   
Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7232)
@@ -35,7 +35,12 @@
 scriptspath=$mars/datacenter/scripts
 
+logpath=/magic/datacenter/autologs
 lockpath=/magic/datacenter/locks
 listpath=/magic/datacenter/lists
-logpath=/magic/datacenter/autologs
+setuppath=/magic/datacenter/setup
+
 datapath=/magic/data
+subsystempath=/magic/subsystemdata
+sequpath=/magic/sequences
+datasetpath=/magic/datasets
 
Index: trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 7228)
+++ trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 7232)
@@ -83,5 +83,5 @@
 
 echo "getting list..." >> $scriptlog 2>&1
-check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
+check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
 
 case $check0 in 
@@ -107,5 +107,5 @@
    no=`printf %08d $sequence | cut -c 0-4`
    no2=`printf %08d $sequence`
-   sequencepath=/magic/sequences/$no
+   sequencepath=$sequpath/$no
    if [ ! -d $sequencepath ]
    then
@@ -131,5 +131,5 @@
 
    echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1
-   check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\) | tee $writesequencefilelogpath/writesequencefile-$no2.log | grep int | sed -e 's/(int)//'`
+   check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelogpath/writesequencefile-$no2.log | grep int | sed -e 's/(int)//'`
    case $check2 in
       1)   echo "check2=$check2 -> everthing ok " >> $scriptlog 2>&1
