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
JDB/JToAshortMonitor.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: QUALITY_FACTOR ACOUSTICS_QUALITYFACTOR 2.0e3
14 set_variable: FORMAT GRAPHICS_FORMAT gif
15 set_variable+ BATCH GRAPHICS_BATCH -B
16 
17 if do_usage $*; then
18  usage "$script <detector identifier> (run[-run])+"\
19  "\nAuxiliary script to monitor acoustic data from database."
20 fi
21 
22 if (( $# > 1 )); then
24  set_array RUNS $argv[2,-1]
25 else
26  fatal "Wrong number of arguments."
27 fi
28 
29 JCookie.sh
30 
32 
33 for RANGE in $RUNS[*]; do
34 
35  for (( RUN = ${RANGE%%-*}; $RUN <= ${RANGE##*-}; RUN += 1 )); do
36 
37  set_variable INPUT_FILE $WORKDIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}_toashort.root
38 
39  if [[ ! -f $INPUT_FILE ]]; then
40 
41  JConvertDB \
42  -q toashort \
43  -@ "detid = `getDetector -D $DETECTOR_ID`" \
44  -@ "minrun = $RUN" \
45  -@ "maxrun = $RUN" \
46  -@ "QUALITYFACTOR >= $QUALITY_FACTOR" \
47  -o $INPUT_FILE \
48  -d $DEBUG --!
49  fi
50 
51  if [[ -f $INPUT_FILE ]]; then
53  fi
54  done
55 done
56 
57 $JPP_DIR/examples/JDB/JToAshortMonitor \
58  -f${^INPUT_FILES} \
59  -o ${TMPDIR:-/tmp}/toashort.root \
60  -d $DEBUG
61 
62 JPlot1D \
63  -f ${TMPDIR:-/tmp}/toashort.root:quality \
64  -\> "log10(quality)" \
65  -\^ "number of entries" \
66  -XX \
67  -T "" \
68  -L "TL 0.6" \
69  -o $WORKDIR/quality.$FORMAT $BATCH
70 
71 JPlot1D \
72  -w 1200x600 \
73  -f ${TMPDIR:-/tmp}/toashort.root:toa \
74  -\^ "log10(quality)" \
75  -N "X 505" \
76  -t "$TIMESTAMP" \
77  -S 0.5 \
78  -T "" \
79  -L "BL 0.6" \
80  -o $WORKDIR/toa.$FORMAT $BATCH
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then usage $script< detector identifier >< startdate\"YYYY-MM-DDHH:MM:SS\"><finaldate\"YYYY-MM-DDHH:MM:SS\"><QA/QCfile> fi case set_variable QAQC_TXT $argv[4]
Definition: JDataMonitor.sh:24
set_array RUNS
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O SUMMARY JPrintDAQHeader f $INPUT_FILE read A DAQ_HEADER set_variable DETECTOR_ID
Definition: JSquid.sh:28
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
then usage $script(input file)+< QA/QC file >" "\nAuxiliary script to produce the following QA/QC data then fatal Wrong number of arguments fi set_array INPUT_FILES $argv[1,-2] set_variable QAQC_FILE $argv[-1] mkdir p $WORKDIR set_variable ACOUSTICS_DEBUG
Definition: JQAQC.sh:80
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
do JPrintDAQHeader f $INPUT_FILE d read DETECTOR_ID RUN FRAME_INDEX TIMESLICE_START set_variable OUTPUT_FILE $WORKDIR KM3NeT_
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES for RANGE in $RUNS[*]
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 rm i $OUTPUT_FILE fi let RUN
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
set_variable LOG XX
Definition: JMuonPostfit.sh:81
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
set_variable INPUT_FILE
do sput $STRING $FLOOR sget MODULE INPUT_FILES
Definition: JCanberra.sh:77
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:40
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then display $WORKDIR
Definition: plot-Domino.sh:128
then eval ls $DIR $ID $TYPE _
Definition: getArchive.sh:104
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 fatal Invalid detector identifier $DETECTOR_ID fi set_variable RUNSETUPID typeset a RANGE RANGE[1]
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62