Jpp  debug
the software that should make you happy
JPulsar.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mbouwhuis
5 #
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to run JPulsar.
12 #
13 # ------------------------------------------------------------------------------------------
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 if do_usage $*; then
24  usage "$script <detector file> <input file> <output file>"
25 fi
26 
27 if (( $# == 3 )); then
28  set_variable DETECTOR $1
29  set_variable INPUT_FILE $2
30  set_variable OUTPUT_FILE $3
31 else
32  fatal "Wrong number of arguments."
33 fi
34 
35 
36 if [[ ! -f $DETECTOR ]]; then
37  fatal "Missing detector file $DETECTOR"
38 fi
39 
40 
41 if [[ ! -f $INPUT_FILE ]]; then
42  fatal "Missing input file $INPUT_FILE"
43 fi
44 
45 echo "Detector to overwrite: $DETECTOR."
46 echo "Input: $INPUT_FILE."
47 echo "Output: $OUTPUT_FILE"
48 
49 #
50 # DOM IDs in DU-2, reference channels from elog http://elog.km3net.de/DU+Integration/35
51 #
52 cat>dom_channel_map_du2<<EOF
53 808992603 5
54 808974928 5
55 808995481 5
56 808966287 5
57 808467569 5
58 808430036 5
59 808430571 5
60 808996420 5
61 808987051 5
62 808965918 5
63 808447091 5
64 808430449 5
65 808468365 5
66 808987121 0
67 808474231 0
68 809503299 0
69 808972586 0
70 808982574 0
71 EOF
72 
73 #
74 # DOM IDs in DU-3
75 #
76 cat>dom_channel_map_du3<<EOF
77 808451481 8
78 808951763 8
79 806487207 8
80 808984760 8
81 808985313 8
82 808467131 8
83 808979223 8
84 808469410 8
85 808982559 8
86 809003766 8
87 808994625 8
88 808961271 8
89 806472277 8
90 809548782 8
91 808987120 8
92 808981888 8
93 808963072 8
94 808976325 8
95 EOF
96 
97 
98 #
99 # DOM IDs in DU-4
100 #
101 cat>dom_channel_map_du4<<EOF
102 808982550 12
103 809006175 12
104 808964845 12
105 808960476 12
106 809547596 30
107 808991947 30
108 808987098 30
109 808991967 30
110 808987950 30
111 808991955 30
112 809503407 30
113 809526122 30
114 808950076 30
115 808982608 12
116 808430346 12
117 808469399 12
118 808984598 12
119 808977112 12
120 EOF
121 
122 #
123 # DOM IDs in DU-4; top hemisphere
124 #
125 cat>dom_channel_map_du4_top<<EOF
126 808982550 4
127 809006175 4
128 808964845 4
129 808960476 4
130 809547596 4
131 808991947 4
132 808987098 4
133 808991967 4
134 808987950 4
135 808991955 4
136 809503407 4
137 809526122 4
138 808950076 4
139 808982608 7
140 808430346 7
141 808469399 7
142 808984598 7
143 808977112 7
144 EOF
145 
146 JPulsar \
147  -! "`cat dom_channel_map_du4_top`" \
148  -f $INPUT_FILE \
149  -A \
150  -o $OUTPUT_FILE \
151  -a $DETECTOR
152 
153 
154 
155 JPulsar \
156  -! "`cat dom_channel_map_du4_top`" \
157  -f $INPUT_FILE \
158  -a $DETECTOR