modified the Process_XXX up to EventBuilder. Process_Sort and downstream analysis may need to be changed. as TProof does not avalible for root 6.32
This commit is contained in:
parent
3d9b135020
commit
245a9b408a
|
@ -2,7 +2,7 @@
|
|||
|
||||
##############################################
|
||||
#
|
||||
# This script define color, PCID, and dataPath
|
||||
# This script define color and dataPath
|
||||
#
|
||||
##############################################
|
||||
|
||||
|
@ -20,54 +20,71 @@ CYAN='\033[0;36m'
|
|||
NC='\033[0m' #no color
|
||||
LRED='\033[1;91m'
|
||||
|
||||
echo -e "${RED}##################### Loading Process_BasicConfig.sh ${NC}"
|
||||
|
||||
############## need to distingish mac and daq
|
||||
Arch="$(uname -s)"
|
||||
PCName="$(hostname)"
|
||||
PCID=-1 #if PCID == 1 (DAQ), 2 (MAC), -1(OTHER)
|
||||
PCID=-1 #if PCID == 1 (DAQ), 2 (MAC), 3 (test station), -1(OTHER)
|
||||
|
||||
#------ Set up data folder, check disk space
|
||||
echo -e "${YELLOW} ##################### Check computer name and arch. ${NC}"
|
||||
echo -e "${YELLOW}##################### Check computer name and arch. ${NC}"
|
||||
echo "PC name : ${PCName}"
|
||||
echo "Archetech: ${Arch}"
|
||||
|
||||
|
||||
rawDataPath=${SOLARISANADIR}/data_raw/
|
||||
rootDataPath=${SOLARISANADIR}/root_data/
|
||||
|
||||
echo "Raw Data Path : "${rawDataPath}
|
||||
echo "Root Data Path : "${rootDataPath}
|
||||
|
||||
|
||||
if [ ${Arch} == "Linux" ] && [ ${PCName} == "solaris-daq" ]; then
|
||||
|
||||
PCID=1
|
||||
|
||||
pathsSetting=${HOME}/SOLARIS_QT6_DAQ/programSettings.txt
|
||||
if [ -e ${pathsSetting} ]; then
|
||||
#echo "Found DAQ programSettings.txt for paths settings"
|
||||
# pathsSetting=${HOME}/SOLARIS_DAQ/programSettings.txt
|
||||
# if [ -e ${pathsSetting} ]; then
|
||||
# #echo "Found DAQ programSettings.txt for paths settings"
|
||||
|
||||
analysisPath=$(cat ${pathsSetting} | head -n 2 | tail -n 1)
|
||||
# analysisPath=$(cat ${pathsSetting} | head -n 2 | tail -n 1)
|
||||
|
||||
if [ ! "${analysisPath}" = "$SOLARISANADIR" ]; then
|
||||
echo "The analysisPath from ${analysisPath} is different from present folder $SOLARISANADIR. Abort."
|
||||
exit
|
||||
fi
|
||||
# if [ ! "${analysisPath}" = "$SOLARISANADIR" ]; then
|
||||
# echo "The analysisPath from ${analysisPath} is different from present folder $SOLARISANADIR. Abort."
|
||||
# exit
|
||||
# fi
|
||||
|
||||
rawDataPathParent=$(cat ${pathsSetting} | head -n 3 | tail -n 1)
|
||||
rootDataPathParent=$(cat ${pathsSetting} | head -n 4 | tail -n 1)
|
||||
# rawDataPathParent=$(cat ${pathsSetting} | head -n 3 | tail -n 1)
|
||||
# rootDataPathParent=$(cat ${pathsSetting} | head -n 4 | tail -n 1)
|
||||
|
||||
databaseIP=$(cat ${pathsSetting} | head -n 6 | tail -n 1)
|
||||
databaseName=$(cat ${pathsSetting} | head -n 7 | tail -n 1)
|
||||
# databaseIP=$(cat ${pathsSetting} | head -n 6 | tail -n 1)
|
||||
# databaseName=$(cat ${pathsSetting} | head -n 7 | tail -n 1)
|
||||
|
||||
#echo ${rawDataPathParent}
|
||||
#echo ${rootDataPathParent}
|
||||
#echo ${databaseIP}
|
||||
#echo ${databaseName}
|
||||
# #echo ${rawDataPathParent}
|
||||
# #echo ${rootDataPathParent}
|
||||
# #echo ${databaseIP}
|
||||
# #echo ${databaseName}
|
||||
|
||||
else
|
||||
# else
|
||||
|
||||
echo "${RED} Cannot found DAQ programSettings.txt for path settings ${NC}"
|
||||
echo "Seek Ryan for help"
|
||||
exit
|
||||
# echo "${RED} Cannot found DAQ programSettings.txt for path settings ${NC}"
|
||||
# echo "Seek Ryan for help"
|
||||
# exit
|
||||
|
||||
fi
|
||||
# fi
|
||||
|
||||
fi
|
||||
|
||||
if [ ${Arch} == "Darwin" ] && [ ${PCName} == "SOLARISs-Mac-Studio.local" ]; then
|
||||
PCID=2
|
||||
rawDataPathParent=${HOME}/experimentalData/
|
||||
rootDataPathParent=${HOME}/experimentalData/
|
||||
fi
|
||||
# rawDataPathParent=${HOME}/experimentalData/
|
||||
# rootDataPathParent=${HOME}/experimentalData/
|
||||
fi
|
||||
|
||||
if [ ${Arch} == "Linux" ] && [ ${PCName} == "solarisdaq" ]; then
|
||||
PCID=3
|
||||
# rawDataPathParent=${SOLARISANADIR}/data_raw/
|
||||
# rootDataPathParent=${SOLARISANADIR}/root_data/
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo -e "${RED}##################### Loading Process_Download.sh ${NC}"
|
||||
|
||||
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
||||
echo "$./process_Download [RunNum]"
|
||||
echo " RunNum = run number"
|
||||
|
@ -11,10 +13,12 @@ RUN=$1
|
|||
runNum=${RUN#0} #remove zero
|
||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||
|
||||
source $SOLARISANADIR/armory/Process_BasicConfig
|
||||
source $SOLARISANADIR/working/expName.sh
|
||||
source $SOLARISANADIR/Armory/Process_BasicConfig
|
||||
|
||||
if [ -z $expName ]; then
|
||||
source $SOLARISANADIR/working/expName.sh
|
||||
fi
|
||||
|
||||
MacRawDataPath=$rawDataPathParent/$expName/
|
||||
IP=solarisdaq # defined at ~/.ssh/config
|
||||
USR=solaris
|
||||
|
||||
|
@ -42,7 +46,7 @@ if [ ${RUN} == "all" ]; then
|
|||
fi
|
||||
|
||||
echo -e "$YELLOW=============================================$NC"
|
||||
tail -10 $MacRawDataPath/data/RunTimeStamp.dat
|
||||
tail -10 $MacRawDataPath/raw_data/RunTimeStamp.dat
|
||||
echo -e "$YELLOW=============================================$NC"
|
||||
|
||||
exit 1
|
||||
|
@ -60,7 +64,7 @@ RUN=$(printf '%03d' ${RUN})
|
|||
|
||||
#######################################
|
||||
#################### Download raw data
|
||||
echo -e "${RED}######################### Download raw data: run ${RUN}${NC}"
|
||||
echo -e "${CYAN}>>>>>>>>>>>>>>> Download raw data: run ${RUN}${NC}"
|
||||
if [ ${PCID} -eq 2 ]; then
|
||||
|
||||
#=========== Ping to check the connectivity
|
||||
|
@ -81,25 +85,23 @@ if [ ${PCID} -eq 2 ]; then
|
|||
rsync -avuht --progress $USR@$IP:Analysis/working/expName.sh $SOLARISANADIR/working/.
|
||||
fi
|
||||
else
|
||||
echo -e "$RED############### Only in SOLARIS MAC can donwload data. skip.$NC"
|
||||
echo -e "$CYAN############### Only in SOLARIS MAC can donwload data. skip.$NC"
|
||||
fi
|
||||
|
||||
echo -e "$YELLOW=============================================$NC"
|
||||
tail -10 $MacRawDataPath/data/RunTimeStamp.dat
|
||||
tail -10 ${rawDataPath}/RunTimeStamp.dat
|
||||
echo -e "$YELLOW=============================================$NC"
|
||||
|
||||
count=`ls -1 $SOLARISANADIR/data_raw/${expName}_${RUN}_*.sol 2>/dev/null | wc -l`
|
||||
echo -e "========== Number of Files : ${count}${NC}"
|
||||
count=`ls -1 ${rawDataPath}/${expName}_${RUN}_*.sol 2>/dev/null | wc -l`
|
||||
echo -e "========================= Number of Files : ${count}${YELLOW}"
|
||||
if [ ${count} -eq 0 ]; then
|
||||
echo "============================================"
|
||||
echo "${NC}============================================"
|
||||
echo "==== RAW Files of RUN-${RUN} not found! "
|
||||
echo "============================================"
|
||||
|
||||
isRunDataExist=false
|
||||
exit 1
|
||||
else
|
||||
echo -e "${YELLOW}"
|
||||
du -hc $SOLARISANADIR/data_raw/${expName}_${RUN}_*.sol
|
||||
du -hc ${rawDataPath}//${expName}_${RUN}_*.sol
|
||||
echo -e "$NC============================================="
|
||||
isRunDataExist=true
|
||||
fi
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo -e "${RED}##################### Loading Process_EventBuilder.sh ${NC}"
|
||||
|
||||
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
|
||||
|
||||
if command -v EventBuilder > /dev/null 2>&1; then
|
||||
echo "EventBuilder exists"
|
||||
else
|
||||
echo -e "${RED}EventBuilder does not exist${NC}"
|
||||
echo -e "${RED}Create a symbolic link of the EventBuilder from the SOLARIS_DAQ/Aux/${NC}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $# -ne 3 ] || [ $1 == "-help" ]; then
|
||||
echo "$ Process_EventBuilder [RunNum] [EventBuild] [timeWin]"
|
||||
echo " RunNum = run number"
|
||||
|
@ -19,23 +29,17 @@ RUN=$1
|
|||
EventBld=$2
|
||||
timeWin=$3
|
||||
|
||||
source ${SOLARISANADIR}/armory/Process_BasicConfig
|
||||
source ${SOLARISANADIR}/working/expName.sh
|
||||
source ${SOLARISANADIR}/Armory/Process_BasicConfig
|
||||
if [ -z $expName ]; then
|
||||
source $SOLARISANADIR/working/expName.sh
|
||||
fi
|
||||
|
||||
runNum=${RUN#0} #remove zero
|
||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||
|
||||
rawDataPath=$SOLARISANADIR/data_raw
|
||||
rootDataPath=$SOLARISANADIR/root_data
|
||||
|
||||
rawDataPattern="$rawDataPath/${expName}_${RUN}_*.sol"
|
||||
rootDataName="$rootDataPath/run$RUN.root"
|
||||
|
||||
dir=$(pwd)
|
||||
cd ${SOLARISANADIR}/armory
|
||||
make
|
||||
cd ${dir}
|
||||
|
||||
#==== check raw data exist
|
||||
isRawDataExist=`ls -1 ${rawDataPattern}* 2>/dev/null | wc -l`
|
||||
|
||||
|
@ -44,11 +48,10 @@ if [ ! $isRawDataExist -gt 0 ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
echo -e "${CYAN} ============== list of files ${NC}"
|
||||
echo -e "${YELLOW} ============== list of files ${NC}"
|
||||
\du -h ${rawDataPattern}*
|
||||
|
||||
totSize=$(\du -hc ${rawDataPattern}* | tail -n 1 | awk '{print $1}')
|
||||
echo -e "${CYAN} ============== total file size : ${totSize}${NC}"
|
||||
echo -e "${YELLOW} ============== total file size : ${totSize}${NC}"
|
||||
|
||||
|
||||
#==== check raw data timeStamp
|
||||
|
|
|
@ -9,6 +9,10 @@ if [ -z $SOLARISANADIR ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
if [ "$PWD" != "${SOLARISANADIR}/working" ]; then
|
||||
echo "============= go to the Working directory"
|
||||
cd "${SOLARISANADIR}/working"
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
||||
echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [Monitor]"
|
||||
|
@ -54,17 +58,11 @@ echo "### Trace Method : $TraceMethod"
|
|||
echo "### Monitor : $isMonitor"
|
||||
echo "#################################################"
|
||||
|
||||
source ${SOLARISANADIR}/armory/Process_BasicConfig
|
||||
source ${SOLARISANADIR}/working/expName.sh
|
||||
|
||||
if [ "$PWD" != "${SOLARISANADIR}/working" ]; then
|
||||
echo "============= go to the Working directory"
|
||||
cd "${SOLARISANADIR}/working"
|
||||
fi
|
||||
|
||||
source ${SOLARISANADIR}/Armory/Process_BasicConfig
|
||||
source ${rawDataPath}/expName.sh
|
||||
|
||||
#################################### CHECK IS RUN DATA EXIST
|
||||
isRunDataExist=true
|
||||
isRunDataExist=false
|
||||
|
||||
#################################### EVENT BUILDER
|
||||
source Process_Download $RUN
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash -l
|
||||
|
||||
echo -e "${RED}##################### Loading Process_Sort.sh ${NC}"
|
||||
|
||||
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"
|
||||
|
@ -19,8 +21,10 @@ RUN=$1
|
|||
nWorker=$2
|
||||
TraceMethod=$3
|
||||
|
||||
source $SOLARISANADIR/armory/Process_BasicConfig
|
||||
source $SOLARISANADIR/working/expName.sh
|
||||
source $SOLARISANADIR/Armory/Process_BasicConfig
|
||||
if [ -z $expName ]; then
|
||||
source $SOLARISANADIR/working/expName.sh
|
||||
fi
|
||||
|
||||
runNum=${RUN#0} #remove zero
|
||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||
|
@ -68,7 +72,7 @@ else
|
|||
|
||||
if [ $nWorker -le -1 ]; then
|
||||
echo -e "${LRED}>>>>>>>>>>>>>>> Force GeneralSort $(date) ${NC}"
|
||||
root -l -q -b "$SOLARISANADIR/armory/GeneralSortAgent.C($runNum, $nWorker, $TraceMethod)"
|
||||
root -l -q -b "$SOLARISANADIR/Armory/GeneralSortAgent.C($runNum, $nWorker, $TraceMethod)"
|
||||
echo -e "${LRED}<<<<<<<<<<<<<<<< Done GeneralSort $(date) ${NC}"
|
||||
fi
|
||||
|
||||
|
@ -77,7 +81,7 @@ else
|
|||
if [ $rootDataTime -ge $genRootDataTime ]; then
|
||||
|
||||
echo -e "${LRED}>>>>>>>>>>>>>>>>>>>>> GeneralSort $(date) ${NC}"
|
||||
root -l -q -b "$SOLARISANADIR/armory/GeneralSortAgent.C($runNum, $nWorker, $TraceMethod)"
|
||||
root -l -q -b "$SOLARISANADIR/Armory/GeneralSortAgent.C($runNum, $nWorker, $TraceMethod)"
|
||||
echo -e "${LRED}<<<<<<<<<<<<<<<< Done GeneralSort $(date) ${NC}"
|
||||
|
||||
else
|
||||
|
|
|
@ -16,9 +16,9 @@ export SOLARISANADIR
|
|||
|
||||
echo "####### set global variable SOLARISANADIR = ${SOLARISANADIR}"
|
||||
|
||||
export PATH=$PATH:$SOLARISANADIR/armory
|
||||
export PATH=$PATH:$SOLARISANADIR/Armory
|
||||
|
||||
echo "####### add ${SOLARISANADIR}/armory into PATH"
|
||||
echo "####### add ${SOLARISANADIR}/Armory into PATH"
|
||||
|
||||
|
||||
###########################
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +0,0 @@
|
|||
expName=Master
|
||||
rawDataPath=/mnt/data0/Master
|
||||
rootDataPath=/mnt/data1/Master
|
||||
runID=5
|
||||
elogID=9
|
||||
#------------end of file.
|
Loading…
Reference in New Issue
Block a user