Jpp  17.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compare-detector.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Utility script to compare two binary formatted detector files.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19 
20 set_variable SKIP 48 # "####" + <length> + <UUID>
21 
22 if do_usage $*; then
23  usage "$script <detector file> <detector file>"\
24  "\nComparison of binary formatted detector files excluding UUID."
25 fi
26 
27 if (( $# != 2 )); then
28  fatal "Wrong number of arguments."
29 fi
30 
31 tail -c+$SKIP $1 > ${TMPDIR:-/tmp}/d1.datx
32 tail -c+$SKIP $2 > ${TMPDIR:-/tmp}/d2.datx
33 
34 diff ${TMPDIR:-/tmp}/d1.datx ${TMPDIR:-/tmp}/d2.datx
35 
36 if (( $? != 0 )); then
37  fatal "Detectors $1 and $2 differ."
38 fi
39 
40 rm -f ${TMPDIR:-/tmp}/d1.datx ${TMPDIR:-/tmp}/d2.datx
41 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
exit
Definition: JPizza.sh:36
then echo
then fatal Wrong number of arguments fi tail c $SKIP
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 if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
* usage
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
script
Definition: JAcoustics.sh:2
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null