Changeset 7465 for trunk/MagicSoft


Ignore:
Timestamp:
01/30/06 17:13:07 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=buildsequenceentries
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    5051
    5152todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/buildsequenceentries/$year
    53 getstatuslog=$getstatuslogpath/getstatus-buildsequenceentries-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/buildsequenceentries/`date +%Y/%m`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/buildsequenceentries-$datetime.log
     58scriptlog=$scriptlogpath/$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6263
    6364# check if script is already running
    64 date > $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     65date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6566checklock0=$?
    6667case $checklock0 in
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> buildsequenceentries is running -> exit" >> $scriptlog 2>&1
     70         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    8182   *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    8283        rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     84        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8485        date  >> $scriptlog 2>&1
    8586        exit;;
     
    9293   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9394   rm -v $todofile >> $scriptlog 2>&1
    94    rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     95   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9596   date  >> $scriptlog 2>&1
    9697   exit
     
    102103   echo "building sequence entries for date $date..." >> $scriptlog 2>&1
    103104   year2=`echo $date | cut -c 1-4`
    104    buildsequentriespath=$logpath/buildsequenceentries/$year2
     105   buildsequentriespath=$logpath/$program/$year2
    105106   makedir  $buildsequentriespath >> $scriptlog 2>&1
    106107
     
    109110   case $check1 in
    110111      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1
    111            setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2
    112            makedir $setstatuslogpath >> $scriptlog 2>&1
    113 
    114            check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
    115            case $check2 in
    116               1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    117               *)   echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;;
    118            esac
     112           statustime="Now()"
     113           failed="NULL"
     114           starttime="NULL"
     115           failedtime="NULL"
     116           var1=$year2
     117           var2=$date
     118           setstatus
    119119           ;;
    120       *)   echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
     120      *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
    121121   esac
    122122done
    123123
    124124rm -v $todofile >> $scriptlog 2>&1
    125 rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     125rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    126126
    127127set +C
  • trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=checkfileavail
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    4647
    4748todofile=$listpath/ToDo-$table-$column.txt
    48 getstatuslogpath=$logpath/getstatus/checkfileavail/$year
     49getstatuslogpath=$logpath/getstatus/$program/$year
    4950getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
    5051
     
    6162
    6263# check if script is already running
    63 date > $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     64date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6465checklock0=$?
    6566case $checklock0 in
    6667    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6768    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    68          echo "-> checkfileavail is running -> exit" >> $scriptlog 2>&1
     69         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    6970         date  >> $scriptlog 2>&1
    7071         exit;;
     
    8081   *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    8182        rm -v $todofile >> $scriptlog 2>&1
    82         rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     83        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8384        date  >> $scriptlog 2>&1
    8485        exit;;
     
    9192   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9293   rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     94   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9495   date  >> $scriptlog 2>&1
    9596   exit
     
    102103   no=`printf %08d $sequence | cut -c 0-4`
    103104   no2=`printf %08d $sequence`
    104    outpath=$logpath/checkfileavail/$no
     105   outpath=$logpath/$program/$no
    105106   echo "outpath: "$outpath  >> $scriptlog 2>&1
    106107   makedir $outpath  >> $scriptlog 2>&1
     
    112113   case $check1 in
    113114      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    114            setstatuslogpath=$logpath/setstatus/checkfileavail/$no
    115            makedir $setstatuslogpath  >> $scriptlog 2>&1
    116 
    117            check2=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
    118            case $check2 in
    119               1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;;
    120               *)   echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;;
    121            esac
     115           statustime="Now()"
     116           failed="NULL"
     117           starttime="NULL"
     118           failedtime="NULL"
     119           var1=$no
     120           var2=$sequence
     121           setstatus
    122122           ;;
    123123      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     
    126126
    127127rm -v $todofile  >> $scriptlog 2>&1
    128 rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     128rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    129129
    130130date  >> $scriptlog 2>&1
  • trunk/MagicSoft/Mars/datacenter/scripts/checkstardone

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=checkstardone
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    4748
    4849todofile=$listpath/ToDo-$table-$column.txt
    49 getstatuslogpath=$logpath/getstatus/checkstardone/$year
     50getstatuslogpath=$logpath/getstatus/$program/$year
    5051getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
    5152
    52 scriptlogpath=$logpath/run/checkstardone/`date +%Y/%m/%d`
     53scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5354makedir $scriptlogpath
    54 scriptlog=$scriptlogpath/checkstardone-$datetime.log
     55scriptlog=$scriptlogpath/$program-$datetime.log
    5556
    5657date >> $scriptlog 2>&1
     
    6162
    6263# check if script is already running
    63 date > $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1
     64date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6465checklock0=$?
    6566case $checklock0 in
    6667    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6768    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    68          echo "-> checkstardone is running -> exit" >> $scriptlog 2>&1
     69         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    6970         date  >> $scriptlog 2>&1
    7071         exit;;
     
    8081   *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    8182        rm -v $todofile >> $scriptlog 2>&1
    82         rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1
     83        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8384        date  >> $scriptlog 2>&1
    8485        exit;;
     
    9091   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9192   rm -v $todofile >> $scriptlog 2>&1
    92    rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1
     93   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9394   date  >> $scriptlog 2>&1
    9495   exit
     
    112113   echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
    113114
    114    outpath=$logpath/checkstardone/$no
     115   outpath=$logpath/$program/$no
    115116   echo "outpath: "$outpath  >> $scriptlog 2>&1
    116117   makedir $outpath  >> $scriptlog 2>&1
     
    129130   done
    130131   
    131    setstatuslogpath=$logpath/setstatus/checkstardone/$no
    132    makedir $setstatuslogpath  >> $scriptlog 2>&1
    133 
    134    check2=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-checkstardone-$dataset.log | grep int | sed -e 's/(int)//'`
    135    case $check2 in
    136       1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;;
    137       *)   echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;;
    138    esac
     132   statustime="Now()"
     133   failed="NULL"
     134   starttime="NULL"
     135   failedtime="NULL"
     136   var1=$no
     137   var2=$dataset
     138   setstatus
    139139done
    140140
    141141rm -v $todofile  >> $scriptlog 2>&1
    142 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1
     142rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    143143
    144144date  >> $scriptlog 2>&1
  • trunk/MagicSoft/Mars/datacenter/scripts/correcttime

    r7460 r7465  
    3939
    4040user=`whoami`
     41program=correct_raw_time
    4142source /home/$user/Mars/datacenter/scripts/sourcefile
    4243
     
    4748year=`date +%Y`
    4849
    49 getstatuslogpath=$logpath/getstatus/correct_raw_time/$year
     50getstatuslogpath=$logpath/getstatus/$program/$year
    5051getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
    5152makedir $getstatuslogpath >> $scriptlog 2>&1
     
    5354if [ -e $listpath/ToDo-$table-$column.txt ]
    5455then
    55    echo "correct_raw_time is already running -> exit"
     56   echo "$program is already running -> exit"
    5657   exit
    5758fi
     
    6364
    6465case $check0 in
    65    1)   echo "check0=$check0 -> everything ok -> run correct_raw_time";;
     66   1)   echo "check0=$check0 -> everything ok -> run $program";;
    6667   *)   echo "check0=$check0 -> ERROR -> step has to be repeated";;
    6768esac
     
    9394 
    9495  check1=0
    95   echo "run correct_raw_time..."
    96   /home/tape/MagicReadout/correct_raw_time $infile $outfile > $timecorrpath/correct_raw_time-$run.log
     96  echo "run $program..."
     97  /home/tape/MagicReadout/correct_raw_time $infile $outfile > $timecorrpath/$program-$run.log
    9798  check1=$?
    9899
     
    100101     1)   echo "check1=$check1 -> everything ok -> setting status..."
    101102          no=`printf %08d $run | cut -c 1-5`
    102           setstatuspath=$logpath/setstatus/correct_raw_time/$no
    103           echo "setstatuspath: "$setstatuspath
    104           makedir $setstatuspath
    105 
    106           check2=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuspath/setstatus-correct_raw_time-$run.log | grep int | sed -e 's/(int)//'`
    107           case $check2 in
    108              0)   echo "check2=0 -> ERROR -> step could not be set";;
    109              1)   echo "check2=1 -> everything ok, status has been set";;
    110           esac
     103          statustime="Now()"
     104          failed="NULL"
     105          starttime="NULL"
     106          failedtime="NULL"
     107          var1=$no
     108          var2=$run
     109          setstatus
    111110        ;;
    112111     *)   echo "check1=$check1 -> ERROR -> step has to be repeated";;
  • trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck

    r7460 r7465  
    4141
    4242user=`whoami`
     43program=datacheck
    4344source /home/$user/Mars/datacenter/scripts/sourcefile
    4445
     
    5455
    5556todofile=$listpath/ToDo-$table-$column
    56 getstatuslogpath=$logpath/getstatus/dodatacheck/$year
    57 getstatuslog=$getstatuslogpath/getstatus-dodatacheck-$datetime.log
    58 
    59 scriptlogpath=$logpath/run/dodatacheck/`date +%Y/%m`
     57getstatuslogpath=$logpath/getstatus/$program/$year
     58getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     59
     60scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    6061makedir $scriptlogpath
    61 scriptlog=$scriptlogpath/dodatacheck-$datetime.log
     62scriptlog=$scriptlogpath/$program-$datetime.log
    6263
    6364date >> $scriptlog 2>&1
     
    7071then
    7172   echo "other file(s) on disk " >> $scriptlog 2>&1
    72    echo " -> choose one file and start datacheck " >> $scriptlog 2>&1
     73   echo " -> choose one file and start $program " >> $scriptlog 2>&1
    7374else
    74    date > $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     75   date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    7576   checklock0=$?
    7677   case $checklock0 in
    7778       0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    7879       1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    79             echo "-> getting list for dodatacheck is running -> exit" >> $scriptlog 2>&1
     80            echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    8081            date  >> $scriptlog 2>&1
    8182            exit;;
     
    8788
    8889   case $check0 in
    89       1)   echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;;
     90      1)   echo "check0=$check0 -> everything ok -> do $program" >> $scriptlog 2>&1;;
    9091      *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    9192   esac
    92    rm -v $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     93   rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9394fi
    9495
     
    143144do
    144145   date
    145    echo "do datacheck for run "$run >> $scriptlog 2>&1
     146   echo "do $program for run "$run >> $scriptlog 2>&1
    146147   no=`printf %08d $run | cut -c 0-2`
    147148   no2=`printf %08d $run`
     
    163164
    164165   case $check1 in
    165        1)   echo "check1=$check1 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1
     166       1)   echo "check1=$check1 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
    166167            ;;
    167168       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     
    185186     
    186187      case $check2 in
    187           0)   echo "check2=$check2 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1
     188          0)   echo "check2=$check2 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
    188189               ;;
    189190          *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     
    225226
    226227   # set status
    227    echo "inserting the status for the datacheck for run $run into the db" >> $scriptlog 2>&1
    228    setstatuslogpath=$logpath/setstatus/datacheck/$date
    229    echo "setstatuslogpath: $setstatuslogpath" >> $scriptlog 2>&1
    230    makedir $setstatuslogpath >> $scriptlog 2>&1
    231    setstatuslog=$setstatuslogpath/setstatus-datacheck-$no2.log
    232    echo "setstatuslogfile: $setstatuslog" >> $scriptlog 2>&1
    233 
    234    check4=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    235    case $check4 in
    236       1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1
    237            ;;
    238       *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1
    239            ;;
    240    esac
     228   echo "inserting the status for the $program for run $run into the db" >> $scriptlog 2>&1
     229   statustime="Now()"
     230   failed="NULL"
     231   starttime="NULL"
     232   failedtime="NULL"
     233   var1=$date
     234   var2=$no2
     235   setstatus
    241236done
    242237
  • trunk/MagicSoft/Mars/datacenter/scripts/doexclusions

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=doexclusions
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    5051
    5152todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/doexclusions/$year
    53 getstatuslog=$getstatuslogpath/getstatus-doexclusions-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/doexclusions-$datetime.log
     58scriptlog=$scriptlogpath/$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6263
    6364# check if the script is already running
    64 date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     65date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6566checklock0=$?
    6667case $checklock0 in
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> getting list for doexclusions is running -> exit" >> $scriptlog 2>&1
     70         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    8182   *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    8283        rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     84        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8485        date  >> $scriptlog 2>&1
    8586        exit;;
     
    9192   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9293   rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     94   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9495   date  >> $scriptlog 2>&1
    9596   exit
     
    102103   echo "do exclusions for date "$date >> $scriptlog 2>&1
    103104   year2=`echo $date | cut -c 1-4`
    104    doexclusionspath=$logpath/doexclusions/$year2
     105   doexclusionspath=$logpath/$program/$year2
    105106   makedir $doexclusionspath >> $scriptlog 2>&1
    106107
     
    109110   case $check1 in
    110111      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    111            setstatuslogpath=$logpath/setstatus/doexclusions/$year2
    112            makedir $setstatuslogpath >> $scriptlog 2>&1
    113 
    114            check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-doexclusions-$date.log | grep int | sed -e 's/(int)//'`
    115 
    116            case $check2 in
    117               1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;;
    118               *)   echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;;
    119            esac
     112           statustime="Now()"
     113           failed="NULL"
     114           starttime="NULL"
     115           failedtime="NULL"
     116           var1=$year2
     117           var2=$date
     118           setstatus
    120119        ;;
    121120      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     
    124123
    125124rm -v $todofile >> $scriptlog 2>&1
    126 rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     125rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    127126
    128127set +C
  • trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=fillcallisto
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    4950
    5051todofile=$listpath/ToDo-$table-$column.txt
    51 getstatuslogpath=$logpath/getstatus/fillcallisto/$year
    52 getstatuslog=$getstatuslogpath/getstatus-fillcallisto-$datetime.log
     52getstatuslogpath=$logpath/getstatus/$program/$year
     53getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5354
    54 scriptlogpath=$logpath/run/fillcallisto/`date +%Y/%m/%d`
     55scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5556makedir $scriptlogpath
    56 scriptlog=$scriptlogpath/runfillcallisto-$datetime.log
     57scriptlog=$scriptlogpath/run$program-$datetime.log
    5758
    5859date >> $scriptlog 2>&1
     
    6869    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6970    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    70          echo "-> fillcallisto is running -> exit" >> $scriptlog 2>&1
     71         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    7172         date  >> $scriptlog 2>&1
    7273         exit;;
     
    7980
    8081case $check0 in
    81     1)   echo "check0=$check0 -> everything ok -> run fillcallisto" >> $scriptlog 2>&1;;
     82    1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8283    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    8384         rm -v $todofile >> $scriptlog 2>&1
     
    106107   signalfile=$path/signal$no2.root
    107108   calibfile=$path/calib$no2.root
    108    fillcallistologpath=$logpath/fillcallisto/$no
    109    echo "fillcallistologpath: "$fillcallistologpath >> $scriptlog 2>&1
     109   fillcallistologpath=$logpath/$program/$no
     110   echo "$programlogpath: "$fillcallistologpath >> $scriptlog 2>&1
    110111   makedir $fillcallistologpath >> $scriptlog 2>&1
    111112   fillcaliblog=$fillcallistologpath/fillcalib-$sequence.log
    112113   fillsignallog=$fillcallistologpath/fillsignal-$sequence.log
    113114
    114    echo "run fillcallisto for sequence $sequence" >> $scriptlog 2>&1
     115   echo "run $program for sequence $sequence" >> $scriptlog 2>&1
    115116   echo "run fillcalib..." >> $scriptlog 2>&1
    116117   check1=`root -q -b $macrospath/fillcalib.C+\("\"$calibfile\""\,kFALSE\) | tee $fillcaliblog | grep int | sed -e 's/(int)//'`
     
    125126   case $check2 in
    126127      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    127            echo "-> inserting the status for fillcallisto for sequence $sequence into the db" >> $scriptlog 2>&1
    128            setstatuslogpath=$logpath/setstatus/fillcallisto/$no
    129            makedir $setstatuslogpath >> $scriptlog 2>&1
    130            setstatuslog=$setstatuslogpath/setstatus-fillcallisto
    131 
    132            check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'`
    133            case $check4 in
    134              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    135              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    136            esac
     128           echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     129           statustime="Now()"
     130           failed="NULL"
     131           starttime="NULL"
     132           failedtime="NULL"
     133           var1=$no
     134           var2=$sequence
     135           setstatus
    137136          ;;
    138137      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillganymed

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=fillganymed
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    4849
    4950todofile=$listpath/ToDo-$table-$column.txt
    50 getstatuslogpath=$logpath/getstatus/fillganymws/$year
    51 getstatuslog=$getstatuslogpath/getstatus-fillganymed-$datetime.log
     51getstatuslogpath=$logpath/getstatus/$program/$year
     52getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5253
    53 scriptlogpath=$logpath/run/fillganymed/`date +%Y/%m/%d`
     54scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5455makedir $scriptlogpath
    55 scriptlog=$scriptlogpath/runfillganymed-$datetime.log
     56scriptlog=$scriptlogpath/run$program-$datetime.log
    5657
    5758date >> $scriptlog 2>&1
     
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> fillganymed is running -> exit" >> $scriptlog 2>&1
     70         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    7879
    7980case $check0 in
    80     1)   echo "check0=$check0 -> everything ok -> run fillganymed" >> $scriptlog 2>&1;;
     81    1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8182    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    8283         rm -v $todofile >> $scriptlog 2>&1
     
    105106   path="$datapath/ganymed/$no/$no2"
    106107   ganymedfile=$path/ganymed$no2.root
    107    fillganymedlogpath=$logpath/fillganymed/$no
    108    echo "fillganymedlogpath: "$fillganymedlogpath >> $scriptlog 2>&1
     108   fillganymedlogpath=$logpath/$program/$no
     109   echo "$programlogpath: "$fillganymedlogpath >> $scriptlog 2>&1
    109110   makedir $fillganymedlogpath >> $scriptlog 2>&1
    110    fillganymedlog=$fillganymedlogpath/fillganymed-$dataset.log
     111   fillganymedlog=$fillganymedlogpath/$program-$dataset.log
    111112
    112    echo "run fillganymed for dataset $dataset" >> $scriptlog 2>&1
     113   echo "run $program for dataset $dataset" >> $scriptlog 2>&1
    113114   check2=`root -q -b $macrospath/fillganymed.C+\("\"$ganymedfile\""\,kFALSE\) | tee $fillganymedlog | grep int | sed -e 's/(int)//'`
    114115   case $check2 in
    115116      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    116            echo "-> inserting the status for fillganymed for dataset $dataset into the db" >> $scriptlog 2>&1
    117            setstatuslogpath=$logpath/setstatus/fillganymed/$no
    118            makedir $setstatuslogpath >> $scriptlog 2>&1
    119            setstatuslog=$setstatuslogpath/setstatus-fillganymed-$no2.log
    120 
    121            check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    122            case $check4 in
    123              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    124              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    125            esac
     117           echo "-> inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
     118           statustime="Now()"
     119           failed="NULL"
     120           starttime="NULL"
     121           failedtime="NULL"
     122           var1=$no
     123           var2=$no2
     124           setstatus
    126125          ;;
    127126      *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillstar

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=fillstar
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    4849
    4950todofile=$listpath/ToDo-$table-$column.txt
    50 getstatuslogpath=$logpath/getstatus/fillstar/$year
    51 getstatuslog=$getstatuslogpath/getstatus-fillstar-$datetime.log
     51getstatuslogpath=$logpath/getstatus/$program/$year
     52getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5253
    53 scriptlogpath=$logpath/run/fillstar/`date +%Y/%m/%d`
     54scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5455makedir $scriptlogpath
    55 scriptlog=$scriptlogpath/runfillstar-$datetime.log
     56scriptlog=$scriptlogpath/run$program-$datetime.log
    5657
    5758date >> $scriptlog 2>&1
     
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> fillstar is running -> exit" >> $scriptlog 2>&1
     70         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    7879
    7980case $check0 in
    80     1)   echo "check0=$check0 -> everything ok -> run fillstar" >> $scriptlog 2>&1;;
     81    1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8182    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    8283         rm -v $todofile >> $scriptlog 2>&1
     
    105106   path="$datapath/star/$no/$no2"
    106107   starfile=$path/star$no2.root
    107    fillstarlogpath=$logpath/fillstar/$no
    108    echo "fillstarlogpath: "$fillstarlogpath >> $scriptlog 2>&1
     108   fillstarlogpath=$logpath/$program/$no
     109   echo "$programlogpath: "$fillstarlogpath >> $scriptlog 2>&1
    109110   makedir $fillstarlogpath >> $scriptlog 2>&1
    110    fillstarlog=$fillstarlogpath/fillstar-$sequence.log
     111   fillstarlog=$fillstarlogpath/$program-$sequence.log
    111112
    112    echo "run fillstar for sequence $sequence" >> $scriptlog 2>&1
     113   echo "run $program for sequence $sequence" >> $scriptlog 2>&1
    113114   check2=`root -q -b $macrospath/fillstar.C+\("\"$starfile\""\,kFALSE\) | tee $fillstarlog | grep int | sed -e 's/(int)//'`
    114115   case $check2 in
    115116      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    116            echo "-> inserting the status for fillstar for sequence $sequence into the db" >> $scriptlog 2>&1
    117            setstatuslogpath=$logpath/setstatus/fillstar/$no
    118            makedir $setstatuslogpath >> $scriptlog 2>&1
    119            setstatuslog=$setstatuslogpath/setstatus-fillstar-$no2.log
    120 
    121            check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    122            case $check4 in
    123              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    124              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    125            esac
     117           echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     118           statustime="Now()"
     119           failed="NULL"
     120           starttime="NULL"
     121           failedtime="NULL"
     122           var1=$no
     123           var2=$no2
     124           setstatus
    126125          ;;
    127126      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=callisto
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    4344
    4445# define callisto.rc files
    45 callistorcnew=$setuppath/callisto/callisto.rc
    46 callistorcmarapr05=$setuppath/callisto/callisto_MarApr05.rc
     46callistorcnew=$setuppath/$program/$program.rc
     47callistorcmarapr05=$setuppath/$program/$program_MarApr05.rc
    4748
    4849table=SequenceProcessStatus
     
    5455
    5556todofile=$listpath/ToDo-$table-$column
    56 getstatuslogpath=$logpath/getstatus/callisto/$year
    57 getstatuslog=$getstatuslogpath/getstatus-callisto-$datetime.log
    58 
    59 scriptlogpath=$logpath/run/callisto/`date +%Y/%m/%d`
     57getstatuslogpath=$logpath/getstatus/$program/$year
     58getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     59
     60scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    6061makedir $scriptlogpath
    61 scriptlog=$scriptlogpath/runcallisto-$datetime.log
     62scriptlog=$scriptlogpath/run$program-$datetime.log
    6263
    6364date >> $scriptlog 2>&1
     
    7475   echo " -> choose one file and start calibrating" >> $scriptlog 2>&1
    7576else
    76    date > $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     77   date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    7778   checklock0=$?
    7879   case $checklock0 in
    7980       0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    8081       1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    81             echo "-> getting list for callisto is running -> exit" >> $scriptlog 2>&1
     82            echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    8283            date  >> $scriptlog 2>&1
    8384            exit;;
     
    8990
    9091   case $check0 in
    91       1)   echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;;
     92      1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    9293      *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    93            rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     94           rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495           date  >> $scriptlog 2>&1
    9596           exit;;
    9697   esac
    97    rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     98   rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9899fi
    99100
     
    146147  no=`printf %08d $sequence | cut -c 0-4`
    147148  no2=`printf %08d $sequence`
    148   outpath="$datapath/callisto/$no/$no2"
     149  outpath="$datapath/$program/$no/$no2"
    149150  echo "outpath: "$outpath >> $scriptlog 2>&1
    150151  makedir $outpath >> $scriptlog 2>&1
     
    154155 
    155156  # find callisto.rc file
    156   if [ -e $outpath/callisto.rc ]
     157  if [ -e $outpath/$program.rc ]
    157158  then
    158      echo "found callisto.rc in $outpath -> using this " >> $scriptlog 2>&1
    159      callistorcseq=$outpath/callisto.rc
     159     echo "found $program.rc in $outpath -> using this " >> $scriptlog 2>&1
     160     callistorcseq=$outpath/$program.rc
    160161  else
    161      echo "no callisto.rc found in $outpath -> making link " >> $scriptlog 2>&1
     162     echo "no $program.rc found in $outpath -> making link " >> $scriptlog 2>&1
    162163     if [ 49735 -lt $sequence ] && [ $sequence -lt 53516 ]
    163164     then
    164         ln -vs $callistorcmarapr05 $outpath/callisto.rc >> $scriptlog 2>&1
     165        ln -vs $callistorcmarapr05 $outpath/$program.rc >> $scriptlog 2>&1
    165166     else
    166         ln -vs $callistorcnew $outpath/callisto.rc >> $scriptlog 2>&1
     167        ln -vs $callistorcnew $outpath/$program.rc >> $scriptlog 2>&1
    167168     fi
    168      callistorcseq=$outpath/callisto.rc
     169     callistorcseq=$outpath/$program.rc
    169170  fi
    170171
    171172  echo "run callisto..." >> $scriptlog 2>&1
    172   ./callisto -b -q -v4 -f -raw --log=$outpath/callisto$no2.log --html=$outpath/callisto$no2.html --out=$outpath --config=$callistorcseq $sequfile  2>> $scriptlog > /dev/null
     173  ./callisto -b -q -v4 -f -raw --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath --config=$callistorcseq $sequfile  2>> $scriptlog > /dev/null
    173174  check1=$?
    174175
     
    246247         
    247248          # set status for calibration if merpp updates are also done
    248           echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1
    249           setstatuslogpath=$logpath/setstatus/callisto/$no
    250           makedir $setstatuslogpath >> $scriptlog 2>&1
    251           setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log
    252 
    253           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    254           case $check4 in
    255              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    256              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    257           esac
     249          echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     250          statustime="Now()"
     251          failed="NULL"
     252          starttime="NULL"
     253          failedtime="NULL"
     254          var1=$no
     255          var2=$no2
     256          setstatus
    258257          ;;
    259258     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runganymed

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=ganymed
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    5051
    5152todofile=$listpath/ToDo-$table-$column
    52 getstatuslogpath=$logpath/getstatus/ganymed/$year
    53 getstatuslog=$getstatuslogpath/getstatus-ganymed-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/ganymed/`date +%Y/%m/%d`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/runganymed-$datetime.log
     58scriptlog=$scriptlogpath/run$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6465
    6566# check if getting of list is already running
    66 date > $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1
     67date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    6768checklock0=$?
    6869case $checklock0 in
    6970    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    7071    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    71          echo "-> getting list for ganymed is running -> exit" >> $scriptlog 2>&1
     72         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    7273         date  >> $scriptlog 2>&1
    7374         exit;;
     
    8081then
    8182   echo "other file(s) on disk " >> $scriptlog 2>&1
    82    echo " -> choose one file and run ganymed" >> $scriptlog 2>&1
     83   echo " -> choose one file and run $program" >> $scriptlog 2>&1
    8384else
    8485   echo "getting list..." >> $scriptlog 2>&1
     
    8687   
    8788   case $check0 in
    88        1)   echo "check0=$check0 -> everything ok -> run ganymed" >> $scriptlog 2>&1;;
     89       1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8990       *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    9091   esac
    9192fi
    9293
    93 rm -v $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1
     94rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495
    9596# choosing todo file
     
    141142  no=`printf %08d $dataset | cut -c 0-5`
    142143  no2=`printf %08d $dataset`
    143   outpath="$datapath/ganymed/$no/$no2"
     144  outpath="$datapath/$program/$no/$no2"
    144145  echo "outpath: "$outpath >> $scriptlog 2>&1
    145146  makedir $outpath >> $scriptlog 2>&1
     
    156157     mode="onoff" >> $scriptlog 2>&1
    157158  fi
    158   ganymedrc=$setuppath/ganymed/ganymed_$mode.rc
     159  ganymedrc=$setuppath/$program/$program_$mode.rc
    159160 
    160   echo "run ganymed..." >> $scriptlog 2>&1
    161   ./ganymed -b -q -v4 -f --ind=$datapth/star --config=$ganymedrc --log=$outpath/ganymed$no2.log --html=$outpath/ganymed$no2.html --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
     161  echo "run $program..." >> $scriptlog 2>&1
     162  ./ganymed -b -q -v4 -f --ind=$datapath/star --config=$ganymedrc --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
    162163  check1=$?
    163164
    164165  case $check1 in
    165166     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1
    166           echo "-> inserting the status for ganymed for dataset $dataset into the db" >> $scriptlog 2>&1
    167           setstatuslogpath=$logpath/setstatus/ganymed/$no
    168           makedir $setstatuslogpath >> $scriptlog 2>&1
    169           setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log
    170 
    171           check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    172           case $check4 in
    173              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    174              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    175           esac
     167          echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
     168          statustime="Now()"
     169          failed="NULL"
     170          starttime="NULL"
     171          failedtime="NULL"
     172          var1=$no
     173          var2=$no2
     174          setstatus
    176175          ;;
    177176     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runstar

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=star
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    5051
    5152todofile=$listpath/ToDo-$table-$column
    52 getstatuslogpath=$logpath/getstatus/star/$year
    53 getstatuslog=$getstatuslogpath/getstatus-star-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/star/`date +%Y/%m/%d`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/runstar-$datetime.log
     58scriptlog=$scriptlogpath/run$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6465
    6566# check if getting of list is already running
    66 date > $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1
     67date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    6768checklock0=$?
    6869case $checklock0 in
    6970    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    7071    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    71          echo "-> getting list for star is running -> exit" >> $scriptlog 2>&1
     72         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    7273         date  >> $scriptlog 2>&1
    7374         exit;;
     
    8687   
    8788   case $check0 in
    88        1)   echo "check0=$check0 -> everything ok -> run star" >> $scriptlog 2>&1;;
     89       1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8990       *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    9091   esac
    9192fi
    9293
    93 rm -v $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1
     94rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495
    9596# choosing todo file
     
    124125esac
    125126
    126 
    127127# retrieve sequence from todo file
    128128sequences=(`cat $todofile`)
     
    142142  no=`printf %08d $sequence | cut -c 0-4`
    143143  no2=`printf %08d $sequence`
    144   outpath="$datapath/star/$no/$no2"
    145   inpath=`echo $outpath | sed -e 's/star/callisto/'`
     144  outpath="$datapath/$program/$no/$no2"
     145  inpath=`echo $outpath | sed -e 's/$program/callisto/'`
    146146  echo "inpath: "$inpath >> $scriptlog 2>&1
    147147  echo "outpath: "$outpath >> $scriptlog 2>&1
     
    151151  echo "sequfile: "$sequfile >> $scriptlog 2>&1
    152152 
    153   echo "run star..." >> $scriptlog 2>&1
    154   ./star -b -q -v4 -f --log=$outpath/star$no2.log --html=$outpath/star$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
     153  echo "run $program..." >> $scriptlog 2>&1
     154  ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
    155155  check1=$?
    156156
    157157  case $check1 in
    158158     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1
    159           echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1
    160           setstatuslogpath=$logpath/setstatus/star/$no
    161           makedir $setstatuslogpath >> $scriptlog 2>&1
    162           setstatuslog=$setstatuslogpath/setstatus-star-$no2.log
    163 
    164           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    165           case $check4 in
    166              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    167              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    168           esac
     159          echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     160          statustime="Now()"
     161          failed="NULL"
     162          starttime="NULL"
     163          failedtime="NULL"
     164          var1=$no
     165          var2=$no2
     166          setstatus
    169167          ;;
    170168     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7460 r7465  
    6060   fi
    6161}
     62
     63function setstatus()
     64{
     65   setstatuslogpath=$logpath/setstatus/$program/$var1
     66   makedir $setstatuslogpath >> $scriptlog 2>&1
     67   setstatuslog=$setstatuslogpath/setstatus-$program-$var2.log
     68   checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$failed\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
     69   case $checkstatus in
     70      1)   echo "checkstatus=$checkstatus -> everything ok, status has been set" >> $scriptlog 2>&1;;
     71      *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
     72   esac
     73}
  • trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=writesequencefile
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    4849
    4950todofile=$listpath/ToDo-$table-$column.txt
    50 getstatuslogpath=$logpath/getstatus/writesequencefiles/$year
    51 getstatuslog=$getstatuslogpath/getstatus-writesequencefiles-$datetime.log
     51getstatuslogpath=$logpath/getstatus/$program/$year
     52getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5253
    53 scriptlogpath=$logpath/run/writesequencefiles/`date +%Y/%m/%d`
     54scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5455makedir $scriptlogpath
    55 scriptlog=$scriptlogpath/runwritesequencefiles-$datetime.log
     56scriptlog=$scriptlogpath/run$program-$datetime.log
    5657
    5758date >> $scriptlog 2>&1
     
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> writesequencefiles is running -> exit" >> $scriptlog 2>&1
     70         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    7879
    7980case $check0 in
    80     1)   echo "check0=$check0 -> everything ok -> run writesequencefiles" >> $scriptlog 2>&1;;
     81    1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8182    *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    8283         rm -v $todofile >> $scriptlog 2>&1
     
    106107   makedir $sequencepath >> $scriptlog 2>&1
    107108
    108    writesequencefilelogpath=$logpath/writesequencefile/$no
    109    echo "writesequencefilelogpath: "$writesequencefilelogpath >> $scriptlog 2>&1
     109   writesequencefilelogpath=$logpath/$program/$no
     110   echo "$programlogpath: "$writesequencefilelogpath >> $scriptlog 2>&1
    110111   makedir $writesequencefilelogpath >> $scriptlog 2>&1
    111112
     
    114115   case $check2 in
    115116      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    116            echo "-> inserting the status for writesequencefile for sequence $sequence into the db" >> $scriptlog 2>&1
    117            setstatuslogpath=$logpath/setstatus/writesequencefile/$no
    118            makedir $setstatuslogpath >> $scriptlog 2>&1
    119            setstatuslog=$setstatuslogpath/setstatus-writesequencefile-$no2.log
    120 
    121            check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    122            case $check4 in
    123              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    124              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    125            esac
     117           echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     118           statustime="Now()"
     119           failed="NULL"
     120           starttime="NULL"
     121           failedtime="NULL"
     122           var1=$no
     123           var2=$no2
     124           setstatus
    126125          ;;
    127126      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note: See TracChangeset for help on using the changeset viewer.