Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JFirmware.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10
11set_variable DEBUG 2
12set_variable WORKDIR `pwd`
13set_variable DIR $JPP_DIR/examples/JDB/
14set_variable: FORMAT GRAPHICS_FORMAT gif
15set_variable+ BATCH GRAPHICS_BATCH -B
16
17
18if do_usage $*; then
19 usage "$script <detector identifier> (location)+"\
20 "The location is defined as XXXX.YY, where XXXX and YY correspond to string and floor, respectively."
21fi
22
23if (( $# < 2 )); then
24 fatal "Wrong number of arguments."
25fi
26
27set_variable DETID $argv[1]
28
29LOCATIONS=($argv[2,-1])
30
31JCookie.sh
32
33RUNS=(`JRuns -D $DETECTOR -F RUN`)
34
35for RUN in $RUNS[*]; do
36 echo -n "$RUN"
37 if [[ ! -f $RUN.txt ]]; then
38 JPrintFirmwareVersion -D $DETID -r $RUN >& $WORKDIR/$RUN.txt
39 fi
40done
41echo
42
43$DIR/JFirmware \
44 -f $WORKDIR/\*.txt \
45 -o $WORKDIR/firmware.root \
46 -d $DEBUG
47
48JPlot1D \
49 -w 1200x600 \
50 -f$WORKDIR/firmware.root:${^LOCATIONS} \
51 -> "run" \
52 -\^ "version" \
53 -L TL \
54 -T "" \
55 -o firmware.$FORMAT $BATCH