source: trunk/MagicSoft/Mars/datacenter/scripts/runstar_mc@ 9608

Last change on this file since 9608 was 9605, checked in by Daniela Dorner, 15 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.1 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`
56
57setstatus "start"
58
59command="./star -b -q -v4 -f --out=$outpath --log=$log.log --html=$log.html sequfile"
60printprocesslog "INFO executing "$command
61$command
62check1=$?
63
64case $check1 in
65 0) printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)"
66 ;;
67 *) printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)"
68 check=$check1
69 ;;
70esac
71
72setstatus "stop"
73
74finish
75
Note: See TracBrowser for help on using the repository browser.