source: trunk/DataCheck/QuickLook/RunGanymed.sh@ 17850

Last change on this file since 17850 was 17111, checked in by Daniela Dorner, 11 years ago
removed not needed line
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6
7# get and check variables
8if ! [ "$1" = "" ]
9then
10 dsfile=$1
11 ra=$2
12 dec=$3
13fi
14
15if [ "$dsfile" = "" ]
16then
17 echo "ERROR variable dsfile empty."
18 printprocesslog "ERROR variable dsfile empty."
19fi
20
21if [ "$ra" = "" ]
22then
23 echo "ERROR variable ra empty."
24 printprocesslog "ERROR variable ra empty."
25fi
26
27if [ "$dec" = "" ]
28then
29 echo "ERROR variable dec empty."
30 printprocesslog "ERROR variable dec empty."
31fi
32
33outpath=`dirname $dsfile | sed -e 's/datasets/ganymed/'`
34makedir $outpath
35
36dsnum=`basename $dsfile | sed -e 's/dataset//' -e 's/[.]txt//'`
37output=$outpath/$dsnum
38logfile=$output"-ganymed.log"
39
40cd $mars
41
42# run ganymed
43printprocesslog "INFO starting ganymed.C for dataset "$dsfile
44#echo "INFO starting ganymed.C for dataset "$dsfile
45
46printprocesslog "INFO command: root -q -b fact/analysis/ganymed.C\("\"$dsfile\""\,"\"$output\""\,$ra\,$dec\) | tee $logfile | intgrep"
47check1=`root -q -b fact/analysis/ganymed.C\("\"$dsfile\""\,"\"$output\""\,$ra\,$dec\) | tee $logfile | intgrep`
48
49case $check1 in
50 0) printprocesslog "INFO ganymed.C was successful for dataset "$dsfile" ra "$ra" dec "$dec" (check1=$check1)"
51 ;;
52 *) printprocesslog "ERROR ganymed.C failed for dataset "$dsfile" ra "$ra" dec "$dec" (check1=$check1)"
53 ;;
54esac
55
56finish
57
Note: See TracBrowser for help on using the repository browser.