10 echo-info "`basename $0` <runnum> <version> <qualifiers>"
11 echo-info "`basename $0` 1234 v04_30_03 e9"
14 function parse_args(){
29 RELEASE_DIR=/home/lbnedaq/nearline/nearline_test_release_${VERSION}
30 SCRIPT_PATH=${RELEASE_DIR}/srcs/dunetpc/dune/NearlineMonitor/scripts
31 PRODUCTS_DIR=${RELEASE_DIR}/localProducts_larsoft_${VERSION}_${QUALIFIERS}_prof
32 OUTPUT_PATH=/lbne/data2/users/lbnedaq/nearline/${VERSION}
35 echo-info "RELEASE_DIR $RELEASE_DIR"
36 echo-info "SCRIPT_PATH $SCRIPT_PATH"
37 echo-info "PRODUCTS_DIR $PRODUCTS_DIR"
38 echo-info "OUTPUT_PATH $OUTPUT_PATH"
41 function find_run_file(){
42 RUN_ZEROS=`printf %06i $RUN`
43 echo-info "RUN_ZEROS $RUN_ZEROS"
44 TRANSFERRED_DIR=/data/lbnedaq/data/transferred_files
45 NUM_FILES=`find ${TRANSFERRED_DIR}/lbne_r${RUN_ZEROS}_sr??_*.root 2>/dev/null | wc -l`
47 if [ $NUM_FILES -eq 0 ];then
48 echo-error "Failed to find RUN $RUN_ZEROS"
50 elif [ $NUM_FILES -gt 1 ];then
51 echo-error "Found more than one file for RUN $RUN_ZEROS : `find ${TRANSFERRED_DIR}/lbne_r${RUN_ZEROS}_sr??_*.root 2>/dev/null`"
54 FILE_FULL_PATH=`find ${TRANSFERRED_DIR}/lbne_r${RUN_ZEROS}_sr??_*.root 2>/dev/null`
55 echo-info "FILE_FULL_PATH $FILE_FULL_PATH"
58 function process_file(){
59 FILE=`basename $FILE_FULL_PATH`
63 RunDir=${OUTPUT_PATH}/$bigrun/$run
67 echo-info "./ProcessSingleFile.sh $RunDir $FILE_FULL_PATH $PRODUCTS_DIR"
69 if [ $DEBUG -eq 1 ];then
70 ./ProcessSingleFile.sh $RunDir $FILE_FULL_PATH $PRODUCTS_DIR
72 nohup ./ProcessSingleFile.sh $RunDir $FILE_FULL_PATH $PRODUCTS_DIR >> /dev/null 2>&1 &