Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
getModule.sh
Go to the documentation of this file.
1#!/bin/zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Auxiliary script to print detector modules.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17
18source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19
20if do_usage $*; then
21 usage "$script <detector file>"
22fi
23
24case $# in
25 1) set_variable DETECTOR $1;;
26 *) fatal "Wrong number of arguments";;
27esac
28
29eval `JPrintDetector -a $DETECTOR -O SUMMARY`
30
31kill_child_processes_at_exit
32
33attach getModule -a $DETECTOR
34
35for STRING in $STRINGS[*]; do
36
37 for (( FLOOR = $FIRST_FLOOR; $FLOOR <= $LAST_FLOOR; FLOOR += 1 )); do
38
39 sput $STRING $FLOOR
40
41 sget MODULE
42
43 printf "(%04d,%02d) %10d\n" $STRING $FLOOR $MODULE
44
45 done
46done
47
48detach