Ignore:
Timestamp:
08/25/06 22:09:49 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7938 r7944  
    3333#
    3434
     35source `dirname $0`/sourcefile
     36printprocesslog "INFO starting $0"
    3537program=doqualityplots
    36 source `dirname $0`/sourcefile
    3738
    3839set -C
     
    4041cd $mars
    4142
    42 datetime=`date +%F-%H-%M-%S`
    43 
    44 scriptlogpath=$runlogpath/$program
    45 makedir $scriptlogpath
    46 
    47 scriptlog=$scriptlogpath/doqualityplots-$datetime.log
    48 
     43scriptlog=$runlogpath/$program-$datetime.log
    4944date >> $scriptlog 2>&1
    5045
    5146# check if script is already running
    52 lockfile=$lockpath/lock-doqualityplots.txt
     47lockfile=$lockpath/lock-$program.txt
    5348checklock  >> $scriptlog 2>&1
    5449
    5550# producing the plots with the values from the database
    5651echo "producing plots: " >> $scriptlog 2>&1
     52printprocesslog "INFO producing data quality plots"
    5753check0=`root -q -b $macrospath/plotdb.C+\(\) | tee -a $scriptlog | grep int | sed -e 's/.*(int)//'`
    5854
    5955case $check0 in
    60     1)   echo "check0=$check0 -> everything ok -> move files" >> $scriptlog 2>&1;;
    61     *)   echo "check0=$check0 -> ERROR -> couldn't create plots -> exit" >> $scriptlog 2>&1
    62          rm -v $lockfile >> $scriptlog 2>&1
    63          exit;;
     56    1)   echo " check0=$check0 -> everything ok -> move files" >> $scriptlog 2>&1
     57         printprocesslog "INFO plots successfully produced"
     58         ;;
     59    *)   echo " check0=$check0 -> ERROR -> couldn't create plots -> exit" >> $scriptlog 2>&1
     60         printprocesslog "ERROR producing plots failed"
     61         finish >> $scriptlog 2>&1
     62         ;;
    6463esac
    6564
    6665# making files available in the web
     66printprocesslog "INFO moving files to web"
    6767webpath=/www/htdocs/datacenter/datacheck
    6868name=plotdb
     
    8484# second part
    8585# making plots for all datasets
     86printprocesslog "INFO producing plots for datasets"
    8687datasets=`find $datapath/ganymed -name ganymed*.root | grep -v summary`
    8788
    8889for dataset in ${datasets[@]}
    8990do
     91   printprocesslog "INFO producing plots for dataset $dataset"
    9092   nr=`echo $dataset | cut -d/ -f6`
    9193   nr2=`echo $nr | cut -c 1-5`
     
    9799   rm -v $plotlog >> $scriptlog 2>&1
    98100   check1=`root -q -b $macrospath/plotdb.C+\("\"$datasetfile\""\) 2>>$plotlog | tee -a $scriptlog | grep int | sed -e 's/.*(int)//'`
    99    echo "check1: "$check1 >> $scriptlog 2>&1
     101   echo " check1: "$check1 >> $scriptlog 2>&1
    100102   newpsfile=$outpath/plotdb$nr.ps
    101103   newrootfile=$outpath/plotdb$nr.root
     
    106108done
    107109
    108 rm -v $lockfile >> $scriptlog 2>&1
     110finish >> $scriptlog 2>&1
    109111
    110 set +C
    111 
    112 date  >> $scriptlog 2>&1
    113 
Note: See TracChangeset for help on using the changeset viewer.