source: branches/trigger_burst_research/DataCheck/PlotQuality.sh@ 18803

Last change on this file since 18803 was 18211, checked in by Daniela Dorner, 9 years ago
small fix for certaindate check
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2#
3source `dirname $0`/../Sourcefile.sh
4printprocesslog "INFO starting $0 $1"
5
6# get dates
7if [ "$certaindate" != "" ]
8then
9 checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'\|'^[0-9][0-9][0-9]$'`
10 if [ "$checkstring" = "" ]
11 then
12 echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
13 finish
14 fi
15 getdates $certaindate
16else
17 if [ "$1" = "" ]
18 then
19 # get last 6 nights if hour between 7 and 19h, else only current night
20 getdates 3 7 19
21 else
22 getdates $1
23 fi
24fi
25
26# for testing only
27anapath=/loc_data/analysis
28
29cd $mars
30
31for date in ${dates[@]}
32do
33 #echo "processing "$date"..."
34 outpath=$anapath/quality/$date
35 makedir $outpath
36 logfile=$anapath/quality/$date/quality.log
37 year=`echo $date | cut -d/ -f1`
38 month=`echo $date | cut -d/ -f2 | sed -e 's/^0//g'`
39 day=`echo $date | cut -d/ -f3 | sed -e 's/^0//g'`
40 printprocesslog "DEBUG root -q -b fact/plots/quality.C\("$year"\,"$month"\,"$day"\,\""$outpath"\"\) | tee $logfile | intgrep"
41 check1=`root -q -b fact/plots/quality.C\($year\,$month\,$day\,\""$outpath"\"\) 2>&1 | tee $logfile | intgrep`
42
43 case $check1 in
44 0) printprocesslog "INFO quality.C was successful for date "$date" (check1=$check1)"
45 ;;
46 *) printprocesslog "ERROR quality.C failed for date "$date" (check1=$check1)"
47 ;;
48 esac
49done
50
51
52finish
53
Note: See TracBrowser for help on using the repository browser.