4 if [ -z $JPP_DIR ];
then
5 echo "Variable JPP_DIR undefined."
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null
16 usage "$script <source directory> <detector identifier> <suffix> <archive> <version>"\
17 "\nAuxiliary script to download online detector files from database and to store these in archive."\
18 "\nNote that the given suffix and version should match with that in the file names."
21 if (( $# == 5 ));
then
28 fatal
"Wrong number of arguments."
38 for FILE_NAME
in `ls ${
DIR}/${PREFIX}
_*\.${
SUFFIX}.txt`;
do
45 DATABASE[$RUN]=$FILE_NAME
48 if (( ${#DATABASE} == 0 ));
then
49 fatal
"No input files at ${DIR}/${PREFIX}_*\.${SUFFIX}.txt."
52 MINRUN=`
echo ${(
k)DATABASE} | tr
' ' '\n' | sort -g | head -
n 1`
53 MAXRUN=`
echo ${(
k)DATABASE} | tr
' ' '\n' | sort -g | tail -
n 1`
55 for (( i0 = $MINRUN; $i0 <= $MAXRUN; ));
do
57 if (( ${+DATABASE[$i0]} == 1 ));
then
59 notice
"Run $i0 $DATABASE[$i0]"
63 for (( i1 = $i0 + 1; $i1 <= $MAXRUN; i1 += 1 ));
do
65 if (( ${+DATABASE[$i1]} == 0 ));
then
69 notice
"Run $i1 $DATABASE[$i1]"
75 if (( $? != 0 ));
then
80 putFile.sh ${DATABASE[$i0]} $ARCHIVE
$DETECTOR_ID $i0 $(($i1 - 1)) $TYPE $VERSION
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]
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
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
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
usr share Modules init zsh export TMPDIR
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script< source directory > nThe source directory corresponds to a pre calibrated D0ARCA009 detector fi case set_variable DIR
do JPrintDAQHeader f $INPUT_FILE d read DETECTOR_ID RUN FRAME_INDEX TIMESLICE_START set_variable OUTPUT_FILE $WORKDIR KM3NeT_
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
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
then usage $script< archive >(input file)+< QA/QC file >" "\nThe archive should correspond to the GIT repository\"auxiliary_data/jpp/\"""\nAuxiliary script to produce the following QA/QC data then fatal Wrong number of arguments fi set_variable ARCHIVE
fi set_variable FILENAME $WORKDIR
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
then eval ls $DIR $ID $TYPE _
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
#define DEBUG(A)
Message macros.