Last change
on this file since 17689 was 17155, checked in by Daniela Dorner, 11 years ago |
adapted macro paths, included wait in case there are already enough callisto.C running
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 |
|
---|
4 | source `dirname $0`/../Sourcefile.sh
|
---|
5 | printprocesslog "INFO starting $0"
|
---|
6 |
|
---|
7 | seqfile=$1
|
---|
8 | seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
|
---|
9 | #outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
|
---|
10 | outpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
|
---|
11 | makedir $outpath
|
---|
12 | logfile=$outpath"/"$seqnum"-calibration.log"
|
---|
13 |
|
---|
14 | # make sure that no other RunCallisto.sh is started for this seq
|
---|
15 | touch $logfile
|
---|
16 |
|
---|
17 | cd $mars
|
---|
18 |
|
---|
19 | # check how many callistos are running
|
---|
20 | callistocount=`ps aux | grep callisto.C | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
|
---|
21 |
|
---|
22 | while [ $callistocount -ge $numcallistos ]
|
---|
23 | do
|
---|
24 | source `dirname $0`/../Sourcefile.sh
|
---|
25 | printprocesslog "INFO wait "$callistowait" as "$callistocound" callistos running ( "$numcallistos" allowed). "
|
---|
26 | sleep $callistowait
|
---|
27 | callistocount=`ps aux | grep callisto.C | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
|
---|
28 | done
|
---|
29 |
|
---|
30 | # run callisto
|
---|
31 | printprocesslog "INFO starting callisto.C for sequence "$seqnum
|
---|
32 |
|
---|
33 | check1=`root -q -b fact/analysis/callisto.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
|
---|
34 |
|
---|
35 | case $check1 in
|
---|
36 | 0) printprocesslog "INFO callisto was successful for sequence "$seqnum" (check1=$check1)"
|
---|
37 | `dirname $0`/RunStar.sh $seqfile &
|
---|
38 | ;;
|
---|
39 | *) printprocesslog "ERROR callisto.C failed for sequence "$seqnum" (check1=$check1)"
|
---|
40 | ;;
|
---|
41 | esac
|
---|
42 |
|
---|
43 | finish
|
---|
44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.