Index: trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 9036)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 9054)
@@ -50,20 +50,12 @@
 
 # get todo list
-getdolist  >> $scriptlog 2>&1
-
-# retrieve sequences from todofile
-sequences=(`cat $todofile`)
-if [ "$sequences" = "" ]
-then 
-   echo "nothing to do -> exit"  >> $scriptlog 2>&1
-   finish >> $scriptlog 2>&1
-fi
-echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
-rm -v $todofile >> $scriptlog 2>&1
+gettodo  >> $scriptlog 2>&1
 
 cd $mars
 
-for sequence in ${sequences[@]}
-do 
+for (( s=0 ; s < $num ; s++ ))
+do
+   sequence=${primaries[$s+$s]}
+   telnum=${primaries[$s+$s+1]}
    echo "checking files for sequence $sequence..." >> $scriptlog 2>&1 
    printprocesslog "INFO checking files for sequence $sequence"
@@ -74,8 +66,7 @@
    checkfileavaillog=$checkfileavailpath/$program-$no2.log
 
-   primvar=$sequence
    setstatus "start" >> $scriptlog 2>&1
 
-   check1=`root -q -b $macrospath/checkfileavail.C+\($sequence,1\) | tee $checkfileavaillog | intgrep`
+   check1=`root -q -b $macrospath/checkfileavail.C+\($sequence,$telnum\) | tee $checkfileavaillog | intgrep`
 
    case $check1 in
