source: trunk/Mars/datacenter/scripts/runcallisto_mc@ 9898

Last change on this file since 9898 was 9610, checked in by Daniela Dorner, 14 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.4 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# Christian Farnier 07/2010 <mailto:christian.farnier@unige.ch>
22#
23# Copyright: MAGIC Software Development, 2000-2010
24#
25#
26# ========================================================================
27#
28# This script is launching the calibration of mc sequences.
29#
30
31source `dirname $0`/sourcefile
32printprocesslog "INFO starting $0"
33program=callisto
34step=Callisto
35
36set -C
37
38# get sequence #
39gettodo "1"
40sequence=${primaries[0]}
41cereskey=${primaries[1]}
42
43# lock sequ for cal
44lockfile=$lockpath/lock-$step-$sequence-$cereskey.txt
45checklock
46
47cd $mars
48
49# run calibration for sequence
50printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey"
51
52# define files and paths
53sequfile="$mcsequpath/`printf %08d $sequence | cut -c 1-4`/sequence`printf %08d $sequence`.txt"
54outpath=$mcpath/$program/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
55makedir $outpath
56log=$outpath/$program`printf %08d $sequence`
57callistorc=$setuppath/$program/callisto.rc
58inpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
59
60setstatus "start"
61
62command="./callisto -b -q -v4 -f --out=$outpath --ind=$inpath --log=$log.log --html=$log.html --config=$callistorc $sequfile"
63printprocesslog "INFO executing "$command
64$command
65check1=$?
66
67case $check1 in
68 0) printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)"
69 ;;
70 *) printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)"
71 check=$check1
72 ;;
73esac
74
75setstatus "stop"
76
77finish
78
Note: See TracBrowser for help on using the repository browser.