Jpp  17.3.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
archive-put-Detector.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: DEBUG ARCHIVE_DEBUG 2
13 set_array CALIBRATION tcal rcal pcal ccal acal scal
14 
15 if do_usage $*; then
16  usage "$script <archive> <variant> <detector file> <first run> <last run> [(calibration)+]"\
17  "\nPut calibration data into archive."\
18  "\nThe optional arguments refer to a list of specific" \"${^CALIBRATION}\" "calibrations."
19 fi
20 
21 if (( $# >= 5 )); then
22 
23  if (( $# > 5 )); then
24  set_array CALIBRATION $argv[6,-1]
25  fi
26 
27  set_array RUNS $argv[4] $argv[5]
28  set_variable DETECTOR $argv[3]
29  set_variable VARIANT $argv[2]
30  set_variable ARCHIVE $argv[1]
31 else
32  fatal "Wrong number of arguments."
33 fi
34 
35 function clean()
36 {
37  rm -f $WORKDIR/[a-z]cal.txt >& /dev/null
38 }
39 
40 clean
41 
42 echo $DETECTOR
43 
44 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
45 
46 JDestructDetector \
47  -a $DETECTOR \
48  -o $WORKDIR/%.txt \
49  -d $DEBUG
50 
51 CHECK_EXIT_CODE
52 
53 for KEY in $CALIBRATION[*]; do
54  putFile.sh $WORKDIR/${KEY}.txt $ARCHIVE $DETECTOR_ID $RUNS[1] $RUNS[2] $KEY $VARIANT
55 done
56 
57 clean
clean eval JPrintDetector a $DETECTOR O IDENTIFIER for CALSET in tcal rcal pcal ccal acal scal
*fatal Wrong number of arguments
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
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
script
Definition: JAcoustics.sh:2
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62