Ignore:
Timestamp:
01/10/06 22:12:58 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7340 r7460  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2004
     22#   Copyright: MAGIC Software Development, 2000-2006
    2323#
    2424#
    2525# ========================================================================
    2626#
     27# This script launches the filling of the results of ganymed into the db
     28# for all datasets of which the results are not yet in the database.
     29#
     30# After checking, if the script is already running, the todolist is
     31# written by using the macro getdolist.C
     32# Then for each dataset in the todo list the ganymed results are filled
     33# into the table Ganymed in the database using the macro fillganymed.C
     34# If this was successful, the status is inserted into the database using
     35# the macro setstatus.C
    2736#
    2837
     
    5261cd $mars
    5362
     63# check if script is already running
    5464date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    5565checklock0=$?
     
    6373esac
    6474
     75# get todo list
    6576echo "getting list..." >> $scriptlog 2>&1
    6677check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
     
    6879case $check0 in
    6980    1)   echo "check0=$check0 -> everything ok -> run fillganymed" >> $scriptlog 2>&1;;
    70     *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     81    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
     82         rm -v $todofile >> $scriptlog 2>&1
     83         rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     84         date  >> $scriptlog 2>&1
     85         exit;;
    7186esac
    7287
     88# retrieve datasets from todo file
    7389datasets=(`cat $todofile`)
    74 
    7590if [ "$datasets" = "" ]
    7691then
     
    8297fi
    8398
     99# run fillganymed for datasets
    84100echo "datasets: "${datasets[@]} >> $scriptlog 2>&1
    85 
    86101for dataset in ${datasets[@]}
    87102do
     
    110125           esac
    111126          ;;
    112       *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     127      *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    113128   esac
    114129done
Note: See TracChangeset for help on using the changeset viewer.