SOLARIS_Analysis/armory/Process_Run

71 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-03-28 17:09:58 -04:00
#!/bin/bash
2023-04-04 14:47:44 -04:00
######## default time window = 100 tick
timeWin=100
2023-03-31 16:08:06 -04:00
if [ -z $SOLARISANADIR ]; then
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
exit
fi
2023-03-28 17:09:58 -04:00
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
2023-04-04 14:47:44 -04:00
echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [Monitor]"
2023-03-31 16:08:06 -04:00
echo " RunNum = run number / \"lastRun\" "
echo " EventBld = 2/1/0/-1/-2 || 2 = with Trace"
echo " GeneralSort = n/0/-n || n = number of worker"
2023-04-04 18:41:28 -04:00
echo " TraceMethod = -1/0/1/2 || -1 no trace, 0 save trace, 1 fit, 2 trapezoid(not implemented)"
2023-03-31 16:08:06 -04:00
echo " Monitors = 2/1/0 || 1 = single run, 2 = using the list in ChainMonitors.C"
2023-03-28 17:09:58 -04:00
echo " 10 = single run and post to websrv, 20 = list runs and post to websrv"
echo ""
2023-04-04 18:09:04 -04:00
echo " * negative option = force (except for TraceMethod)"
2023-03-28 17:09:58 -04:00
echo ""
exit 1
fi;
RUN=$1
2023-03-31 16:08:06 -04:00
runNum=$1
EventBld=0
nWorker=1
2023-04-04 14:47:44 -04:00
TraceMethod=0
2023-03-31 16:08:06 -04:00
isMonitor=0
if [ $# -ge 2 ]; then EventBld=$2; fi
if [ $# -ge 3 ]; then nWorker=$3; fi
2023-04-04 18:09:04 -04:00
if [ $# -ge 4 ]; then TraceMethod=$4; fi
2023-04-04 14:47:44 -04:00
if [ $# -ge 5 ]; then isMonitor=$5; fi
2023-03-31 16:08:06 -04:00
source ${SOLARISANADIR}/armory/Process_BasicConfig
source ${SOLARISANADIR}/working/expName.sh
if [ "$RUN" == "lastRun" ]; then
RUN=$runID
fi
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
RUN=${RUN%0} #remove zero
RUN=$(printf '%03d' $RUN) ##add back the zero
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
####################################
if [ ${PCID} -eq 1 ]; then
2023-04-04 14:47:44 -04:00
source Process_EventBuilder $RUN $EventBld $timeWin
2023-03-31 16:08:06 -04:00
else
2023-04-04 14:47:44 -04:00
source Process_Download $RUN
2023-04-04 17:19:20 -04:00
source Process_EventBuilder $RUN $EventBld $timeWin
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
fi
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
#################################### GeneralSort
2023-03-28 17:09:58 -04:00
2023-04-04 17:19:20 -04:00
source Process_Sort $RUN $nWorker $TraceMethod
2023-03-31 16:08:06 -04:00
#################################### Monitor