9 if [ -
z $JPP_DIR ];
then
10 echo "Variable JPP_DIR undefined."
14 source $JPP_DIR/setenv.sh $JPP_DIR
20 usage "$script <detector identifier> (run[-run])+"\
21 "\nAuxiliary script to download AHRS data from database."
28 fatal
"Wrong number of arguments."
33 let
"NUMBER_OF_ERRORS = 0"
43 if [[ ! -
f $AHRS_FILE ]];
then
45 echo -
n "Writing $AHRS_FILE... "
49 -@
"detid = $DETECTOR_ID" \
59 let
"NUMBER_OF_ERRORS = $NUMBER_OF_ERRORS + 1"
64 if (( $NUMBER_OF_ERRORS != 0 ));
then
65 error
"Number of errors $NUMBER_OF_ERRORS"
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 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
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then fatal Missing detector file $DETECTOR fi eval JPrintDetector a $DETECTOR O IDENTIFIER RUNS
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
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
do set_variable INPUT_FILE $WORKDIR KM3NeT_
then fatal The output file must have the wildcard in the e g root fi 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 fatal Wrong number of arguments fi set_variable ARCHIVE $argv[1] set_variable VERSION $argv[2] set_variable DIR $argv[3] source JAcousticsToolkit sh set_variable DETECTOR $DIR $ACOUSTICS_DETECTOR if[[!-f $DETECTOR]]
then JHobbit a $DETECTOR f
then eval ls $DIR $ID $TYPE _
do echo Generating $dir eval D
then getFile sh $JPP_ARCHIVE $DETECTOR_ID $RUNS[1] $KEY $VERSION $WORKDIR
#define DEBUG(A)
Message macros.