source: trunk/DataCheck/Processing/RunMCStar.sh@ 18856

Last change on this file since 18856 was 13399, checked in by Daniela Dorner, 13 years ago
added (scripts and setup for MC processing)
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3# This script is launching star for mc sequences.
4#
5
6source `dirname $0`/../Sourcefile.sh
7printprocesslog "INFO starting $0"
8program=star
9step=Star
10
11set -C
12
13# get sequence #
14numchanged=0
15while (( 0 < 21 ))
16do
17 if ! [ $numchanged -eq 1 ]
18 then
19 if ! [ "$sequence" = "" ] && ! [ "$cereskey" = "" ]
20 then
21 printprocesslog "INFO $program for sequence $sequence cereskey $cereskey is already running => request new number "
22 fi
23 gettodo "1"
24 sequence=${primaries[0]}
25 cereskey=${primaries[1]}
26 if [ "$sequence" = "" ] || [ "$cereskey" = "" ]
27 then
28 printprocesslog "INFO nothing to do for $program "
29 fi
30 else
31 printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey"
32 break
33 fi
34 setstatus "start"
35done
36
37cd $mars
38
39# run calibration for sequence
40
41# define files and paths
42sequfile="$mcsequpath/`printf %08d $sequence | cut -c 1-4`/sequence`printf %08d $sequence`.txt"
43outpath=$mcpath/$program/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
44makedir $outpath
45log=$outpath/$program`printf %08d $sequence`
46inpath=$mcpath/callisto/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
47
48command="./star -b -q -v4 -f --ind=$inpath --out=$outpath --log=$log.log --html=$log.html $sequfile"
49printprocesslog "INFO executing "$command
50$command
51check1=$?
52
53case $check1 in
54 0) printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)"
55 ;;
56 *) printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)"
57 check=$check1
58 ;;
59esac
60
61setstatus "stop"
62
63finish
64
Note: See TracBrowser for help on using the repository browser.