Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JDAQProfile.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 profiling.
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 PRESCALE 1
26set_variable: FORMAT GRAPHICS_FORMAT gif
27set_variable+ BATCH GRAPHICS_BATCH -B
28
29if do_usage $*; then
30 usage "$script <input file> [prescale]"
31fi
32
33case $# in
34 2) set_variable PRESCALE $2;&
35 1) set_variable INPUT_FILE $1;;
36 *) fatal "Wrong number of arguments."
37esac
38
39set_variable OUTPUT_FILE profile.root
40
41if (( 1 )); then
42
43 $JPP_DIR/examples/JDAQ/JDAQProfile \
44 -f $INPUT_FILE \
45 -o $OUTPUT_FILE \
46 -P $PRESCALE \
47 -d $DEBUG --!
48fi
49
50
51if (( 1 )); then
52
53 JPlot1D \
54 -w 1200x600 \
55 -f"${OUTPUT_FILE}:#N" \
56 -f"${OUTPUT_FILE}:#M" \
57 -f"${OUTPUT_FILE}:#L" \
58 -> "time [100 ms]" \
59 -\^ "number of modules" \
60 -T "summary" \
61 -L BR \
62 -O HIST \
63 -o N.$FORMAT $BATCH
64fi
65
66
67if (( 1 )); then
68
69 JPlot1D \
70 -w 1200x600 \
71 -f ${OUTPUT_FILE}:L0 \
72 -> "time [100 ms]" \
73 -\^ "rate [kHz]" \
74 -T "L0 rate" \
75 -L BR \
76 -O HIST \
77 -o L0.$FORMAT $BATCH
78fi
79
80if (( 1 )); then
81
82 JPlot1D \
83 -w 1200x600 \
84 -f ${OUTPUT_FILE}:WR \
85 -> "time [100 ms]" \
86 -\^ "probability" \
87 -T "WR status" \
88 -O HIST \
89 -o WR.$FORMAT $BATCH
90fi
91
92if (( 1 )); then
93
94 JPlot1D \
95 -w 1200x600 \
96 -f ${OUTPUT_FILE}:trigger \
97 -> "time [100 ms]" \
98 -\^ "rate [Hz]" \
99 -T "Trigger rate" \
100 -O HIST \
101 -o trigger.$FORMAT $BATCH
102fi