Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
getModule.sh
Go to the documentation of this file.
1#!/usr/bin/env 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
31
32
33for STRING in $STRINGS[*]; do
34
35 for (( FLOOR = $FIRST_FLOOR; $FLOOR <= $LAST_FLOOR; FLOOR += 1 )); do
36
37 eval MODULE=\${STRING_${(l:4::0::0:)STRING}\[$(($FLOOR))\]:--1}
38
39
40 printf "(%04d,%02d) %10d\n" $STRING $FLOOR $MODULE
41
42 done
43done
44