/[PAMELA software]/tof/ground/run-test.sh
ViewVC logotype

Contents of /tof/ground/run-test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Thu Mar 9 12:31:47 2006 UTC (18 years, 9 months ago) by pam-de
Branch: v_tag, MAIN
CVS Tags: r_tag, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: application/x-sh
Error occurred while calculating annotation data.
Initial Release

1 #################################################################
2 # Shell script to run the tracker reduction programs
3 #################################################################
4 #
5 #
6 #
7 #----------------------------------------------------------------
8 #local variables:
9 rawdata_dir='raw-data/'
10 rzdata_dir='rz-test/'
11
12 if [ -n "$1" -a -n "$2" ] ;then
13
14 lines=$(grep -n -c $ $1)
15 list=`more $1`
16
17 #################################################################
18 # ------------------------- LEVEL0 ------------------------------
19 #
20 # This part of the script creates the input to level0.exe and run it,
21 # starting from a txt list of file IDs (format: YYMMDD_XXX).
22 #
23 # Tipical input of level0.exe is as follows:
24 # ../level0.exe << EOF
25 # 5 # N. of downlink to process
26 # raw-data/ # raw-data directory
27 # 050323_011 # 1^ file id
28 # 050324_001 # 2^
29 # 050324_002 # ....
30 # 050324_003 #
31 # 050324_004 #
32 # rz-test/ # output rz directory
33 # 100000 # maximum number of events to be processed
34 # EOF
35 #################################################################
36 if [ $2 = 'level0' ]; then
37 echo $lines > input
38 echo $rawdata_dir >> input
39 for dnlk in $list
40 do
41 echo $dnlk >> input
42 done
43 echo $rzdata_dir >> input
44 echo '100000' >> input
45 ./level0.exe < input > $1-level0
46 # rm -f input
47
48 #################################################################
49 # ------------------------- LEVEL1 ------------------------------
50 #
51 # This script creates the input to level1.exe and run it
52 # starting from a txt list of file IDs (format: YYMMDD_XXX).
53 #
54 # Tipical input of level1.exe is as follows:
55 # ../level1.exe << EOF
56 # raw-data/ # raw-data directory
57 # 050323_011 # file id
58 # rz-test/ # input/output rz directory
59 # 100000 # maximum number of events to be processed
60 # EOF
61 #################################################################
62 elif [ $2 = 'level1' ]; then
63 if [ -f $1-level1 ];then
64 rm $1-level1
65 fi
66 touch $1-level1
67 for dnlk in $list
68 do
69 ./level1.exe >> $1-level1 <<EOF
70 $rzdata_dir
71 $dnlk
72 100000
73 EOF
74 done
75 #################################################################
76 # ------------------------- LEVEL2 ------------------------------
77 #
78 # This script creates the input to level2.exe and run it
79 # starting from a txt list of file IDs (format: YYMMDD_XXX).
80 #
81 # Tipical input of level1.exe is as follows:
82 # ../level2.exe << EOF
83 # raw-data/ # raw-data directory
84 # 050323_011 # file id
85 # rz-test/ # input/output rz directory
86 # 100000 # maximum number of events to be processed
87 # F # (debug flag)
88 # EOF
89 #################################################################
90 elif [ $2 = 'level2' ]; then
91 if [ -f $1-level2 ];then
92 rm $1-level2
93 fi
94 touch $1-level2
95 for dnlk in $list
96 do
97 ./level2.exe >> $1-level2 <<EOF
98 $rzdata_dir
99 $dnlk
100 100000
101 COG2
102 F
103 EOF
104 done
105 #################################################################
106 # --------------------- TOFTRACK -----------------------------
107 #
108 # This script creates the input to tofsoft.exe and run it
109 # starting from a txt list of file IDs (format: YYMMDD_XXX).
110 #
111 # Typical input of toftrack.exe is as follows:
112 # ../toftrack.exe << EOF
113 # raw-data/ # raw-data directory
114 # 050323_011 # file id
115 # rz-test/ # input/output rz directory
116 # 100000 # maximum number of events to be processed
117 # F # (debug flag)
118 # EOF
119 #################################################################
120 elif [ $2 = 'toftrack' ]; then
121 if [ -f $1-toftrack ];then
122 rm $1-toftrack
123 fi
124 touch $1-toftrack
125 for dnlk in $list
126 do
127 ./toftrack.exe <<EOF
128 $rzdata_dir
129 $dnlk
130 1
131 100000
132 EOF
133 done
134 fi
135 else
136 echo ""
137 echo "USAGE:"
138 echo "./run-test.sh downlink-list-file-name level0/1/2/tofsoft"
139 echo "( ex: ./run-test.sh 050323.txt level0 & )"
140 echo "( ex: ./run-test.sh 050323.txt level1 & )"
141 echo "( ex: ./run-test.sh 050323.txt level2 & )"
142 echo "( ex: ./run-test.sh 050323.txt toftrack & )"
143 echo ""
144 fi
145

  ViewVC Help
Powered by ViewVC 1.1.23