Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JDAQHitRouter.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 JDAQHitRouter.
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 histogram.root
27set_variable: FORMAT GRAPHICS_FORMAT gif
28set_variable+ BATCH GRAPHICS_BATCH -B
29
30if do_usage $*; then
31 usage "$script <detector> (input file)+"
32fi
33
34if (( $# < 2 )); then
35 fatal "Wrong number of arguments."
36fi
37
38set_variable DETECTOR $argv[1]
39set_variable INPUT_FILES $argv[2,-1]
40
41timer_start
42
43$JPP_DIR/examples/JDAQ/JDAQHitRouter \
44 -a $DETECTOR \
45 -f${^INPUT_FILES} \
46 -o $OUTPUT_FILE \
47 -d $DEBUG
48
49timer_stop
50timer_print
51
52JPlot1D \
53 -f ${OUTPUT_FILE}:h1 \
54 -> "#Deltat [#mus]" \
55 -\^ "number of events [a.u.]" \
56 -o dt.$FORMAT $BATCH
57
58
59JPlot2D \
60 -f "${OUTPUT_FILE}:h2\[%\]" \
61 -> "string" \
62 -< "floor" \
63 -Z \
64 -O COLZ \
65 -w 1200x600 \
66 -N "X 510" \
67 -N "Y 510" \
68 -T "Trigger" \
69 -o trigger.$FORMAT $BATCH
70
71JPlot2D \
72 -f ${OUTPUT_FILE}:h3 \
73 -> "string" \
74 -< "floor" \
75 -Z \
76 -O COLZ \
77 -w 1200x600 \
78 -N "X 510" \
79 -N "Y 510" \
80 -T "Snapshot" \
81 -o snapshot.$FORMAT $BATCH