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