Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
module-Z:plot.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
12 set_variable WORKDIR ${ACOUSTICS_WORKDIR:-./}
13 set_variable BACKGROUND ${ACOUSTICS_BACKGROUND:+-B}
14 
15 if ( do_usage $* ); then
16  usage "$script <string identifier> <floor[-floor]>"
17 fi
18 
19 if (( $# != 2 )); then
20  fatal "Wrong number of arguments."
21 fi
22 
24 set_variable FLOORS $argv[2]
25 
26 for (( FLOOR = ${FLOORS%%-*}; $FLOOR <= ${FLOORS##*-}; FLOOR += 1 )); do
27 
28  typeset -Z 0 STRING
29  typeset -Z 0 FLOOR
30 
31  set_variable MODULE_TXT $WORKDIR/modulez_${STRING}_${FLOOR}.txt
32  set_variable MODULE_ROOT $WORKDIR/modulez_${STRING}_${FLOOR}.root
33 
34  if [[ ! -f $MODULE_TXT ]] then
35  fatal "No file $MODULE_TXT."
36  fi
37 
38  JGraph \
39  -f $MODULE_TXT \
40  -o $MODULE_ROOT
41 
42  typeset -Z 4 STRING
43  typeset -Z 2 FLOOR
44 
45  JPlot1D \
46  -f ${MODULE_ROOT}:\.\* \
47  -\> "#Deltaz [m]" \
48  -\^ "#chi^{2}/NDF" \
49  -N "X 505" \
50  -T "($STRING,$FLOOR)" \
51  -o $WORKDIR/modulez_${STRING}_${FLOOR}.gif $BACKGROUND
52 
53  rm -f $MODULE_ROOT
54 
55 done
56 
57 if [[ "$FLOORS" == "1-18" ]]; then
58 
59  echo -n "Creating graphics for string $STRING.."
60 
61  montage \
62  -tile 6x3 \
63  -geometry +0+0 \
64  $WORKDIR/modulez_${STRING}_*.gif \ $WORKDIR/modulez_${STRING}.gif >& /dev/null
65 
66  echo " -> $WORKDIR/modulez_${STRING}.gif"
67 
68  rm -f $WORKDIR/modulez_${STRING}_*.gif
69 
70 fi
71 
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
exit
Definition: JPizza.sh:36
do set_array DAQHEADER JPrintDAQHeader f
Definition: JTuneHV.sh:79
then echo
do set_variable OUTPUT_DIRECTORY $WORKDIR T
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable ACOUSTICS_DEBUG
Definition: JAcoustics.sh:17
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
Definition: JDomino.sh:39
alias put_queue eval echo n
Definition: qlib.csh:19
do typeset Z STRING typeset Z FLOOR set_variable MODULE_TXT $WORKDIR modulez_
Definition: module-Z:fit.sh:33
then display $WORKDIR
Definition: plot-Domino.sh:127
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
script
Definition: JAcoustics.sh:2
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:28
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62