source: trunk/DataCheck/Processing/RunMCCallisto.sh@ 19813

Last change on this file since 19813 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.8 KB
Line 
1#!/bin/bash
2#
3# This script is launching the calibration of mc sequences.
4#
5
6source `dirname $0`/../Sourcefile.sh
7printprocesslog "INFO starting $0"
8program=callisto
9step=Callisto
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`
46callistorc=$setuppath/$program/`printf %03d $cereskey`/callisto.rc
47inpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
48
49command="./callisto -b -q -v4 -f --out=$outpath --ind=$inpath --log=$log.log --html=$log.html --config=$callistorc $sequfile"
50printprocesslog "INFO executing "$command
51$command
52check1=$?
53
54case $check1 in
55 0) printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)"
56 ;;
57 *) printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)"
58 check=$check1
59 ;;
60esac
61
62setstatus "stop"
63
64finish
65
Note: See TracBrowser for help on using the repository browser.