source: trunk/Mars/datacenter/scripts/runstar_mc@ 10038

Last change on this file since 10038 was 9611, checked in by Daniela Dorner, 14 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/sh
2#
3# ========================================================================
4#
5# *
6# * This file is part of MARS, the MAGIC Analysis and Reconstruction
7# * Software. It is distributed to you in the hope that it can be a useful
8# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
9# * It is distributed WITHOUT ANY WARRANTY.
10# *
11# * Permission to use, copy, modify and distribute this software and its
12# * documentation for any purpose is hereby granted without fee,
13# * provided that the above copyright notice appear in all copies and
14# * that both that copyright notice and this permission notice appear
15# * in supporting documentation. It is provided "as is" without express
16# * or implied warranty.
17# *
18#
19#
20# Author(s): Daniela Dorner 07/2010 <mailto:daniela.dorner@unige.ch>
21#
22# Copyright: MAGIC Software Development, 2000-2010
23#
24#
25# ========================================================================
26#
27# This script is launching star for mc sequences.
28#
29
30source `dirname $0`/sourcefile
31printprocesslog "INFO starting $0"
32program=star
33step=Star
34
35set -C
36
37# get sequence #
38gettodo "1"
39sequence=${primaries[0]}
40cereskey=${primaries[1]}
41
42# lock sequ for cal
43lockfile=$lockpath/lock-$step-$sequence-$cereskey.txt
44checklock
45
46cd $mars
47
48# run calibration for sequence
49printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey"
50
51# define files and paths
52sequfile="$mcsequpath/`printf %08d $sequence | cut -c 1-4`/sequence`printf %08d $sequence`.txt"
53outpath=$mcpath/$program/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
54makedir $outpath
55log=$outpath/$program`printf %08d $sequence`
56inpath=$mcpath/callisto/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
57
58setstatus "start"
59
60command="./star -b -q -v4 -f --ind=$inpath --out=$outpath --log=$log.log --html=$log.html $sequfile"
61printprocesslog "INFO executing "$command
62$command
63check1=$?
64
65case $check1 in
66 0) printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)"
67 ;;
68 *) printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)"
69 check=$check1
70 ;;
71esac
72
73setstatus "stop"
74
75finish
76
Note: See TracBrowser for help on using the repository browser.