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

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