Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JDAQEvent.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5version=1.0
6script=${0##*/}
7
8# ------------------------------------------------------------------------------------------
9#
10# Example script for JDAQEvent.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23
24set_variable DEBUG 2
25set_variable WORKDIR ${TMPDIR:-/tmp}/
26set_variable OUTPUT_FILE $WORKDIR/event.root
27set_variable TRIGGER_MASK 10 # 3D Shower
28set_variable TRIGGER_MASK 100 # MX Shower
29set_variable TRIGGER_MASK 10000 # 3D Muon
30set_variable TRIGGER_MASK 11111 # All
31
32if do_usage $*; then
33 usage "$script <input file> [output file]"
34fi
35
36case $# in
37 2) set_variable OUTPUT_FILE $2;&
38 1) set_variable INPUT_FILE $1;;
39 *) fatal "Wrong number of arguments."
40esac
41
42if (( 1 )); then
43
44 print_variable INPUT_FILE OUTPUT_FILE
45 check_input_file $INPUT_FILE
46
47 timer_start
48
49 $JPP_DIR/examples/JDAQ/JDAQEvent \
50 -f $INPUT_FILE \
51 -o $OUTPUT_FILE \
52 -T $TRIGGER_MASK \
53 -d $DEBUG --!
54
55 timer_stop
56 timer_print
57fi
58
59if (( 1 )); then
60 JPlot1D \
61 -f ${OUTPUT_FILE}:hn \
62 -> "hits" \
63 -\^ "number of events [a.u.]"
64
65 JPlot1D \
66 -f ${OUTPUT_FILE}:ha \
67 -f ${OUTPUT_FILE}:hb \
68 -> "modules" \
69 -\^ "number of events [a.u.]"
70
71 JPlot1D \
72 -f ${OUTPUT_FILE}:h0 \
73 -> "PMT" \
74 -\^ "number of events [a.u.]"
75
76 JPlot1D \
77 -f ${OUTPUT_FILE}:h1 \
78 -> "time-over-threshold [ns]" \
79 -\^ "number of events [a.u.]" \
80
81 JPlot1D \
82 -f ${OUTPUT_FILE}:h2 \
83 -> "time [ns]" \
84 -\^ "number of events [a.u.]" \
85 -w 800x400
86fi