source: trunk/DataCheck/Processing/CheckRatesFileAvail.sh@ 19187

Last change on this file since 19187 was 18708, checked in by Daniela Dorner, 8 years ago
avoid warnings for missing files for the first few days; fixed bug in finding start and stop time; improved logging
  • Property svn:executable set to *
File size: 1008 bytes
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6program=CheckRatesFileAvail
7step=RatesFileAvailISDC
8transferdelay=3 #days
9
10set -C
11
12# check if script is already running
13lockfile=$lockpath/lock-$program.txt
14checklock
15
16# get todo list
17gettodo
18
19
20for (( s=0 ; s < $num ; s++ ))
21do
22 night=${primaries[$s]}
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 ratesfile=$auxpath/$night".FTM_CONTROL_TRIGGER_RATES.fits"
27
28 test -e $ratesfile
29 check1=$?
30 case $check1 in
31 0) printprocesslog "INFO found "$ratesfile
32 ;;
33 *) if [ $night -lt $checknight ]
34 then
35 printprocesslog "WARN "$ratesfile" missing (check1="$check1")."
36 check=$check1
37 else
38 check="no"
39 printprocesslog "INFO "$ratesfile" missing (check1="$check1")."
40 fi
41 ;;
42 esac
43
44 setstatus "stop"
45done
46
47finish
48
Note: See TracBrowser for help on using the repository browser.