source: trunk/DataCheck/Processing/CheckAuxFilesAvail.sh@ 13216

Last change on this file since 13216 was 13055, checked in by Daniela Dorner, 13 years ago
adapted scripts to changes in directory structure
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6program=CheckAuxFilesAvail
7step=AuxFilesAvailISDC
8
9set -C
10
11# check if script is already running
12lockfile=$lockpath/lock-$program.txt
13checklock
14
15# get todo list
16gettodo
17
18
19for (( s=0 ; s < $num ; s++ ))
20do
21 night=${primaries[$s]}
22
23 setstatus "start"
24
25 auxpath=$auxdata"/"`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`
26 drivefile=$auxpath/$night".DRIVE_CONTROL_TRACKING_POSITION.fits"
27 weatherfile=$auxpath/$night".MAGIC_WEATHER_DATA.fits"
28 ratesfile=$auxpath/$night".FTM_CONTROL_TRIGGER_RATES.fits"
29 temperaturefile=$auxpath/$night".FSC_CONTROL_TEMPERATURE.fits"
30 humidityfile=$auxpath/$night".FSC_CONTROL_HUMIDITY.fits"
31
32 test -e $drivefile
33 check1=$?
34 test -e $weatherfile
35 check2=$?
36 test -e $ratesfile
37 check3=$?
38 test -e $temperaturefile
39 check4=$?
40 test -e $humidityfile
41 check5=$?
42
43 totalcheck=`echo $check1 + $check2 + $check3 + $check4 + $check5 | bc -l`
44 totalcheck2=${check1}${check2}${check3}${check4}${check5}
45
46 case $totalcheck in
47 0) printprocesslog "INFO found auxfiles for night "$night"."
48 ;;
49 *) printprocesslog "WARN "$totalcheck" auxiliary files missing ("$totalcheck2") for night "$night"."
50 check=$totalcheck2
51 ;;
52 esac
53
54 setstatus "stop"
55done
56
57finish
58
Note: See TracBrowser for help on using the repository browser.