Jpp  15.0.1-rc.1-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
software/JCompass/JAHRSMonitor.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 if [ -z $JPP_DIR ]; then
10  echo "Variable JPP_DIR undefined."
11  exit
12 fi
13 
14 source $JPP_DIR/setenv.sh $JPP_DIR
15 
16 set_variable: DEBUG COMPASS_DEBUG 2
17 set_variable: WORKDIR COMPASS_WORKDIR ./
18 
19 if do_usage $*; then
20  usage "$script <detector file> <run>"
21 fi
22 
23 if (( $# != 2 )); then
24  fatal "Wrong number of parameters."
25 fi
26 
29 
30 set_variable AHRS_CALIBRATION_FILE $WORKDIR/ahrs_calibration.txt
31 
32 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
33 
34 typeset -a INPUT_FILES
35 
36 set_variable INPUT_FILE $WORKDIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}_ahrs.root
37 
38 if [[ ! -f $INPUT_FILE ]]; then
39 
40  echo -n "Writing $INPUT_FILE... "
41 
42  JConvertDB \
43  -q "ahrs" \
44  -@ "detid = $DETECTOR_ID" \
45  -@ "minrun = $RUN" \
46  -@ "maxrun = $RUN" \
47  -o $INPUT_FILE \
48  -d $DEBUG --
49 
50  if (( $? == 0 )); then
51  echo "OK"
52  else
53  fatal "No AHRS data"
54  fi
55 fi
56 
57 if [[ ! -f $AHRS_CALIBRATION_FILE ]]; then
58 
59  JAHRSCalibration \
60  -D $DETECTOR_ID \
61  -o $AHRS_CALIBRATION_FILE \
62  -d $DEBUG
63 fi
64 
65 JAHRSMonitor \
66  -a $DETECTOR \
67  -c $AHRS_CALIBRATION_FILE \
68  -f $INPUT_FILE \
69  -q "0.1 0.2 0.3" \
70  -Q 1 \
71  -d $DEBUG --!
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison fi case set_variable RANGE $argv[3]
Q(UTCMax_s-UTCMin_s)-livetime_s
then JMuonPostfit f
then usage $script< detector file >< inputfile > nUtility script to create PDF and CDF of transition time distribution fi case set_variable WORKDIR
Definition: JLegolas.sh:31
set_variable INPUT_FILE
exit
Definition: JPizza.sh:36
then echo
const int n
Definition: JPolint.hh:660
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null if do_usage *then usage $script< detector identifier > fi case set_variable DETECTOR_ID
Definition: JTDC.sh:11
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
then rm i $OUTPUT_FILE fi let RUN
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
set_array INPUT_FILES
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then display $WORKDIR
Definition: plot-Domino.sh:128
set_variable DETECTOR
do set_variable INPUT_FILE $WORKDIR KM3NeT_
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
version
Definition: JCalibratePMT.sh:7
do if[[!-f $ACOUSTICS_WORKDIR/${KEY}.txt]]
Definition: JAcoustics.sh:39