source: trunk/DataCheck/QuickLook/RunStar.sh@ 18009

Last change on this file since 18009 was 17901, checked in by Daniela Dorner, 11 years ago
improved logging
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6
7logfile=$1
8
9cd $mars
10
11# run star
12printprocesslog "INFO starting star_file.C for file "$2
13
14echo "root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep"
15check1=`root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep`
16
17case $check1 in
18 0) printprocesslog "INFO star was successful for file "$2" (check1=$check1)"
19 # run merpp
20 printprocesslog "INFO starting merpp.C for file "$4
21 logfile=`echo $logfile | sed -e 's/images/merpp/g'`
22
23 echo "root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep"
24 check2=`root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep`
25
26 case $check2 in
27 0) printprocesslog "INFO merpp was successful for file "$4" (check2=$check2)"
28 ;;
29 *) printprocesslog "ERROR merpp_file.C failed for file "$4" -> check log "$logfile" (check2=$check2)"
30 # delete image file in this case to be sure that ganymed doesn't try to process it
31 if ls $4 >/dev/null 2>&1
32 then
33 rm -v $4
34 fi
35 ;;
36 esac
37 ;;
38 *) printprocesslog "ERROR star_file.C failed for file "$2" -> check log "$1" (check1=$check1)"
39 if ls $4 >/dev/null 2>&1
40 then
41 rm -v $4
42 fi
43 ;;
44esac
45
46finish
47
Note: See TracBrowser for help on using the repository browser.