Changeset 17081 for trunk


Ignore:
Timestamp:
09/05/13 14:38:06 (11 years ago)
Author:
Daniela Dorner
Message:
new paths for macros, usage of fuction getdates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/FillAuxTemp.sh

    r14836 r17081  
    11#!/bin/bash
    22
    3 # option
    4 doupdate="yes" # update all entries (needed when new fields have been added)
    5 #doupdate="no" # fill only entries which are not yet existing (default)
     3# option whether to fill all row or only those where information is missing
     4# $doupdate might be given as environment variable
     5if [ "$doupdate" = "" ]
     6then
     7   doupdate="yes" # update all entries (needed when new fields have been added)
     8   doupdate="no" # fill only entries which are not yet existing (default)
     9fi
    610
    711source `dirname $0`/../Sourcefile.sh
    812printprocesslog "INFO starting $0 with option doupdate="$doupdate
    913
    10 logfile=$runlogpath"/FillTemp-"$datetime".log"
     14logfile=$runlogpath"/FillAuxTemp-"$datetime".log"
    1115date >> $logfile
    1216
     
    2125fi
    2226
    23 
    24 # get last 3, 6 or 9 nights
    25 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
    26 #        `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
    27 #        `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
    28         )
    29 dates=( `find -L $ziprawdata -mindepth 3 -type d | sort | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
     27# get dates
     28if [ "$certaindate" != "" ]
     29then
     30   getdates $certaindate
     31else
     32   # get all night
     33   #getdates "all"
     34   # get last 6 nights
     35   getdates 6
     36fi
     37
    3038printprocesslog "INFO processing the following night(s): "${dates[@]}
    3139echo  `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
    32 
    33 echo ${dates[@]}
    3440
    3541cd $mars
     
    151157      if [ -e $fsctempfile ] && [ $tempnumerrors -eq 0 ]
    152158      then
    153          fsctemps=( `root -q -b -l fact/camtemp.C\("\"$fsctempfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
    154          echo ${fsctemps[@]}
     159         fsctemps=( `root -q -b -l fact/processing/camtemp.C\("\"$fsctempfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
    155160         if [ "${fsctemps[0]}" == "" ]
    156161         then
     
    181186      if [ -e $magicweatherfile ] && [ $weathernumerrors -eq 0 ]
    182187      then
    183          mtemps=( `root -q -b -l fact/magictemp.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
     188         mtemps=( `root -q -b -l fact/processing/magictemp.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
    184189         if [ "${mtemps[0]}" == "" ]
    185190         then
     
    202207      query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum
    203208     
    204       echo $query
    205209      # send query to DB
    206210      sendquery >/dev/null
Note: See TracChangeset for help on using the changeset viewer.