SOLARIS_Analysis/armory/Process_Run

84 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-03-28 17:09:58 -04:00
#!/bin/bash
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-03-31 16:08:06 -04:00
echo "$ Proess_Run [RunNum] [EventBuild] [GeneralSort] [Monitor]"
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 " 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 ""
echo " **** When feeding trace data to Monitors, the EventBld flag must be 2 or -2."
echo ""
exit 1
fi;
RUN=$1
2023-03-31 16:08:06 -04:00
runNum=$1
EventBld=0
nWorker=1
isMonitor=0
if [ $# -ge 2 ]; then EventBld=$2; fi
if [ $# -ge 3 ]; then nWorker=$3; fi
if [ $# -ge 4 ]; then isMonitor=$4; fi
timeWin=100000
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
#padding
if [ "${RUN:0:1}" == "0" ]; then
RUN=${RUN:1:2}
else
RUN=$(printf '%d' $RUN)
fi
RUN=$(printf '%03d' ${RUN})
2023-03-31 16:08:06 -04:00
####################################
if [ ${PCID} -eq 1 ]; then
source Process_EventBuilder $RUN ${EventBld}
fi
if [ ${PCID} -eq 2 ]; then
## Dwonlaod Data
echo "Downlaod data"
fi
#################################### GeneralSort
if [ ${nWorker} -eq 0 ]; then
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
echo -e "${LRED}>>>>>>>>>>>>>>>>>>>>> GeneralSort Skipped by user. ${NC}"
else
source $ROOTSYS/bin/thisroot.sh
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
mkdir ~/.proof/working
cp ${SOLARISANADIR}/working/Mapping.h ~/.proof/working/.
mkdir ~/.proof/armory
cp ${SOLARISANADIR}/armory/AnalysisLib.h ~/.proof/armory/.
2023-03-28 17:09:58 -04:00
root -l -q -b "${SOLARISANADIR}/armory/GeneralSortAgent.C($runNum, ${nWorker}, 0)"
2023-03-28 17:09:58 -04:00
fi
2023-03-31 16:08:06 -04:00
#################################### Monitor