Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
29  INPUT_FILE=$2
30  OUTPUT_FILE=$3
31 else
32  echo "Wrong number of arguments."
33  exit
34 fi
35 
36 
37 if [[ ! -f $DETECTOR ]]; then
38  echo "Missing detector file $DETECTOR"
39 fi
40 
41 
42 if [[ ! -f $INPUT_FILE ]]; then
43  echo "Missing input file $INPUT_FILE"
44  exit
45 fi
46 
47 echo "Detector to overwrite: $DETECTOR."
48 echo "Input: $INPUT_FILE."
49 echo "Output: $OUTPUT_FILE"
50 
51 #
52 # DOM IDs in DU-2, reference channels from elog http://elog.km3net.de/DU+Integration/35
53 #
54 cat>dom_channel_map_du2<<EOF
55 808992603 5
56 808974928 5
57 808995481 5
58 808966287 5
59 808467569 5
60 808430036 5
61 808430571 5
62 808996420 5
63 808987051 5
64 808965918 5
65 808447091 5
66 808430449 5
67 808468365 5
68 808987121 0
69 808474231 0
70 809503299 0
71 808972586 0
72 808982574 0
73 EOF
74 
75 #
76 # DOM IDs in DU-3
77 #
78 cat>dom_channel_map_du3<<EOF
79 808451481 8
80 808951763 8
81 806487207 8
82 808984760 8
83 808985313 8
84 808467131 8
85 808979223 8
86 808469410 8
87 808982559 8
88 809003766 8
89 808994625 8
90 808961271 8
91 806472277 8
92 809548782 8
93 808987120 8
94 808981888 8
95 808963072 8
96 808976325 8
97 EOF
98 
99 
100 #
101 # DOM IDs in DU-4
102 #
103 cat>dom_channel_map_du4<<EOF
104 808982550 12
105 809006175 12
106 808964845 12
107 808960476 12
108 809547596 30
109 808991947 30
110 808987098 30
111 808991967 30
112 808987950 30
113 808991955 30
114 809503407 30
115 809526122 30
116 808950076 30
117 808982608 12
118 808430346 12
119 808469399 12
120 808984598 12
121 808977112 12
122 EOF
123 
124 #
125 # DOM IDs in DU-4; top hemisphere
126 #
127 cat>dom_channel_map_du4_top<<EOF
128 808982550 4
129 809006175 4
130 808964845 4
131 808960476 4
132 809547596 4
133 808991947 4
134 808987098 4
135 808991967 4
136 808987950 4
137 808991955 4
138 809503407 4
139 809526122 4
140 808950076 4
141 808982608 7
142 808430346 7
143 808469399 7
144 808984598 7
145 808977112 7
146 EOF
147 
148 JPulsar \
149  -! "`cat dom_channel_map_du4_top`" \
150  -f $INPUT_FILE \
151  -A \
152  -o $OUTPUT_FILE \
153  -a $DETECTOR
154 
155 
156 
157 JPulsar \
158  -! "`cat dom_channel_map_du4_top`" \
159  -f $INPUT_FILE \
160  -a $DETECTOR
set_variable DETECTOR
Definition: JLegolas.sh:31
exit
Definition: JPizza.sh:36
&set_variable INPUT_FILE
Definition: JLegolas.sh:30
fi JEventTimesliceWriter a
then JPizza f
Definition: JPizza.sh:46
then echo
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
version
Definition: JCalibratePMT.sh:7
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A