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

Last change on this file since 16746 was 15386, checked in by Daniela Dorner, 12 years ago
removed sourcekey
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6
7seqfile=$1
8seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
9#inpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
10inpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
11#outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/star/"`
12outpath=`dirname $seqfile | sed -e "s/sequences/star/"`
13makedir $outpath
14logfile=$outpath"/"$seqnum"-images.log"
15
16cd $mars
17
18# run star
19printprocesslog "INFO starting star.C for sequence "$seqnum
20
21check1=`root -q -b fact/star.C\("\"$seqfile\""\,4.0\,2.5\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
22
23case $check1 in
24 0) printprocesslog "INFO star was successful for sequence "$seqnum" (check1=$check1)"
25 # run merpp
26 printprocesslog "INFO starting merpp3.C for sequence "$seqnum
27 logfile=$outpath"/"$seqnum"-merpp.log"
28
29 check1=`root -q -b fact/merpp3.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
30
31 case $check1 in
32 0) printprocesslog "INFO merpp was successful for sequence "$seqnum" (check1=$check1)"
33 ;;
34 *) printprocesslog "ERROR merpp3.C failed for sequence "$seqnum" (check1=$check1)"
35 # delete image file in this case to be sure that ganymed doesn't try to process it
36 imgfile=$outpath"/"$seqnum"_I.root"
37 if ls $imgfile >/dev/null 2>&1
38 then
39 rm -v $imagefile
40 fi
41 ;;
42 esac
43 ;;
44 *) printprocesslog "ERROR star.C failed for sequence "$seqnum" (check1=$check1)"
45 ;;
46esac
47
48finish
49
Note: See TracBrowser for help on using the repository browser.