Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
multi-plotk40.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Example script to plot JFitK40 results.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19 
20 if ( do_usage $* ); then
21  usage "$script <detector file> <input file>"
22 fi
23 
24 case $# in
27  *) fatal "Invalid number of arguments"
28 esac
29 
30 set_variable TYPE F # histogram type
31 
32 eval `JPrintDetector -a $DETECTOR -O SUMMARY`
33 
34 attach getModule -a $DETECTOR
35 
36 typeset -Z 3 STRING
37 typeset -Z 2 FLOOR
38 
39 for STRING in $STRINGS[*]; do
40 
41  for (( FLOOR = $FIRST_FLOOR; $FLOOR <= $LAST_FLOOR; FLOOR += 1 )); do
42 
43  print -u $FD_O "$STRING $FLOOR"
44 
45  read MODULE <& $FD_I
46 
47  echo "($STRING,$FLOOR) $MODULE"
48 
49  JPlot2D \
50  -f ${INPUT_FILE}:${MODULE}.2${TYPE} \
51  -z "-0.1 1.5" \
52  -\> "PMT pair" \
53  -\< "#Deltat [ns]" \
54  -\^ "Rate [Hz]" \
55  -T "($STRING,$FLOOR)" \
56  -O COLZ \
57  -o /tmp/${TYPE}_${STRING}_${FLOOR}.gif \
58  -B
59 
60  done
61 
62  montage \
63  -tile 6x3 \
64  -geometry +0+0 \
65  /tmp/${TYPE}_${STRING}_*.gif \
66  ${TYPE}_${STRING}.gif
67 
68 done
69 
70 detach
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
set_variable DETECTOR
Definition: JLegolas.sh:31
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
Definition: io_ascii.hh:139
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
exit
Definition: JPizza.sh:36
&set_variable INPUT_FILE
Definition: JLegolas.sh:30
fi JEventTimesliceWriter a
then JPizza f
Definition: JPizza.sh:46
then echo
do montage tile geometry tmp
do set_variable OUTPUT_DIRECTORY $WORKDIR T
*fatal Invalid number of arguments esac set_variable TYPE F eval JPrintDetector a $DETECTOR O SUMMARY attach getModule a $DETECTOR typeset Z STRING typeset Z FLOOR for STRING in $STRINGS[*]
* usage
print
Definition: JConvertDusj.sh:44
double u[N+1]
Definition: JPolint.hh:706
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
esac done
Definition: JAddHDE.sh:21