#!/bin/bash ######## default time window = 100 tick timeWin=100 if [ -z $SOLARISANADIR ]; then echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh." echo "better add \"source \" into .bashrc" exit fi if [ $# -eq 0 ] || [ $1 == "-help" ]; then echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [DataHoSei]" echo " RunNum = run number / \"lastRun\" " echo " EventBld = 2/1/0/-1/-2 || 2 = with Trace" echo " GeneralSort = n/0/-n || n = number of worker" echo " TraceMethod = -1/0/1/2 || -1 no trace, 0 save trace, 1 fit, 2 trapezoid(not implemented)" echo " DataHoSei = 2/1/0 || 1 = single run, 2 = using the list in ChainMonitors.C" echo " 10 = single run and post to websrv, 20 = list runs and post to websrv" echo "" echo " * negative option = force (except for TraceMethod)." echo " * Defult timeWindow for Event builder is 100 tick = 800 ns." echo "" exit 1 fi; RUN=$1 runNum=$1 EventBld=0 nWorker=1 TraceMethod=0 isMonitor=0 if [ $# -ge 2 ]; then EventBld=$2; fi if [ $# -ge 3 ]; then nWorker=$3; fi if [ $# -ge 4 ]; then TraceMethod=$4; fi if [ $# -ge 5 ]; then isMonitor=$5; fi source ${SOLARISANADIR}/armory/Process_BasicConfig source ${SOLARISANADIR}/working/expName.sh if [ "$RUN" == "lastRun" ]; then RUN=$runID fi RUN=${RUN%0} #remove zero RUN=$(printf '%03d' $RUN) ##add back the zero #################################### if [ ${PCID} -eq 1 ]; then source Process_EventBuilder $RUN $EventBld $timeWin else source Process_Download $RUN source Process_EventBuilder $RUN $EventBld $timeWin fi #################################### GeneralSort source Process_Sort $RUN $nWorker $TraceMethod #################################### Monitor