Jpp  18.0.0-rc.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test-Tuna.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # ------------------------------------------------------------------------------------------
5 #
6 # Auxiliary script to test slow control data from database.
7 #
8 # ------------------------------------------------------------------------------------------
9 
10 if [ -z $JPP_DIR ]; then
11  echo "Variable JPP_DIR undefined."
12  exit
13 fi
14 
15 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16 
17 set_variable: DEBUG DATABASE_DEBUG 2
18 set_variable: WORKDIR DATABASE_WORKDIR ${TMPDIR:-/tmp}/
19 set_variable: CANVAS DATABASE_CANVAS 1200x600
20 set_variable: TIMEAXIS DATABASE_TIMESAXIS %d:%m:%y%F1970-01-01 00:00:00
21 set_variable: GRAPHICS DATABASE_GRAPHICS gif
22 
23 if do_usage $*; then
24  usage "$script <input file> <parameters file> [working directory]"
25 fi
26 
27 case $# in
31  *) fatal "Wrong number of arguments."
32 esac
33 
34 if [[ ! -f $INPUT_FILE ]]; then
35  fatal "File $INPUT_FILE not found."
36 fi
37 
38 if [[ ! -f $PARAMETERS_FILE ]]; then
39  echo $PARAMETERS_FILE > $WORKDIR/.parameters.txt # temporary file
40  set_variable PARAMETERS_FILE $WORKDIR/.parameters.txt
41 fi
42 
43 mkdir -p $WORKDIR
44 
46 
47 JTestTuna \
48  -f $INPUT_FILE:\.\* \
49  -P $PARAMETERS_FILE \
50  -o $OUTPUT_FILE \
51  -d $DEBUG
52 
53 for QUANTITY in `JPrintResult -f ${OUTPUT_FILE}:\.\* -O "%s"`; do
54 
55  notice "Creating graphics ${WORKDIR}/${QUANTITY}.${GRAPHICS}."
56 
57  set_variable quantity `echo $QUANTITY | sed 's/\[/\\\[/g;s/\]/\\\]/g'`
58 
59  JPlot1D \
60  -w "$CANVAS" \
61  -f "${OUTPUT_FILE}:${quantity}$" \
62  -T "?" \
63  -t "$TIMEAXIS" \
64  -o ${WORKDIR}/${QUANTITY}.${GRAPHICS} \
65  -d $DEBUG -B
66 done
67 
68 rm -f $OUTPUT_FILE
69 rm -f $WORKDIR/.parameters.txt
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
&set_variable PARAMETERS_FILE
Definition: file-Tuna.sh:28
then rm
Definition: sftpput.zsh:30
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
set_variable INPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then display $WORKDIR
Definition: plot-Domino.sh:128
then echo
Definition: JQAQC.sh:90
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
script
Definition: JAcoustics.sh:2
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62