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
|
NC='\033[0m' #no color
|
||||||
LRED='\033[1;91m'
|
LRED='\033[1;91m'
|
||||||
|
|
||||||
|
echo -e "${RED}##################### Loading Process_BasicConfig.sh ${NC}"
|
||||||
|
|
||||||
############## need to distingish mac and daq
|
############## need to distingish mac and daq
|
||||||
Arch="$(uname -s)"
|
Arch="$(uname -s)"
|
||||||
PCName="$(hostname)"
|
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
|
#------ 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 "PC name : ${PCName}"
|
||||||
echo "Archetech: ${Arch}"
|
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
|
if [ ${Arch} == "Linux" ] && [ ${PCName} == "solaris-daq" ]; then
|
||||||
|
|
||||||
PCID=1
|
PCID=1
|
||||||
|
|
||||||
pathsSetting=${HOME}/SOLARIS_QT6_DAQ/programSettings.txt
|
# pathsSetting=${HOME}/SOLARIS_DAQ/programSettings.txt
|
||||||
if [ -e ${pathsSetting} ]; then
|
# if [ -e ${pathsSetting} ]; then
|
||||||
#echo "Found DAQ programSettings.txt for paths settings"
|
# #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
|
# if [ ! "${analysisPath}" = "$SOLARISANADIR" ]; then
|
||||||
echo "The analysisPath from ${analysisPath} is different from present folder $SOLARISANADIR. Abort."
|
# echo "The analysisPath from ${analysisPath} is different from present folder $SOLARISANADIR. Abort."
|
||||||
exit
|
# exit
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
rawDataPathParent=$(cat ${pathsSetting} | head -n 3 | tail -n 1)
|
# rawDataPathParent=$(cat ${pathsSetting} | head -n 3 | tail -n 1)
|
||||||
rootDataPathParent=$(cat ${pathsSetting} | head -n 4 | tail -n 1)
|
# rootDataPathParent=$(cat ${pathsSetting} | head -n 4 | tail -n 1)
|
||||||
|
|
||||||
databaseIP=$(cat ${pathsSetting} | head -n 6 | tail -n 1)
|
# databaseIP=$(cat ${pathsSetting} | head -n 6 | tail -n 1)
|
||||||
databaseName=$(cat ${pathsSetting} | head -n 7 | tail -n 1)
|
# databaseName=$(cat ${pathsSetting} | head -n 7 | tail -n 1)
|
||||||
|
|
||||||
#echo ${rawDataPathParent}
|
# #echo ${rawDataPathParent}
|
||||||
#echo ${rootDataPathParent}
|
# #echo ${rootDataPathParent}
|
||||||
#echo ${databaseIP}
|
# #echo ${databaseIP}
|
||||||
#echo ${databaseName}
|
# #echo ${databaseName}
|
||||||
|
|
||||||
else
|
# else
|
||||||
|
|
||||||
echo "${RED} Cannot found DAQ programSettings.txt for path settings ${NC}"
|
# echo "${RED} Cannot found DAQ programSettings.txt for path settings ${NC}"
|
||||||
echo "Seek Ryan for help"
|
# echo "Seek Ryan for help"
|
||||||
exit
|
# exit
|
||||||
|
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${Arch} == "Darwin" ] && [ ${PCName} == "SOLARISs-Mac-Studio.local" ]; then
|
if [ ${Arch} == "Darwin" ] && [ ${PCName} == "SOLARISs-Mac-Studio.local" ]; then
|
||||||
PCID=2
|
PCID=2
|
||||||
rawDataPathParent=${HOME}/experimentalData/
|
# rawDataPathParent=${HOME}/experimentalData/
|
||||||
rootDataPathParent=${HOME}/experimentalData/
|
# rootDataPathParent=${HOME}/experimentalData/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${Arch} == "Linux" ] && [ ${PCName} == "solarisdaq" ]; then
|
||||||
|
PCID=3
|
||||||
|
# rawDataPathParent=${SOLARISANADIR}/data_raw/
|
||||||
|
# rootDataPathParent=${SOLARISANADIR}/root_data/
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "${RED}##################### Loading Process_Download.sh ${NC}"
|
||||||
|
|
||||||
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
||||||
echo "$./process_Download [RunNum]"
|
echo "$./process_Download [RunNum]"
|
||||||
echo " RunNum = run number"
|
echo " RunNum = run number"
|
||||||
|
@ -11,10 +13,12 @@ RUN=$1
|
||||||
runNum=${RUN#0} #remove zero
|
runNum=${RUN#0} #remove zero
|
||||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||||
|
|
||||||
source $SOLARISANADIR/armory/Process_BasicConfig
|
source $SOLARISANADIR/Armory/Process_BasicConfig
|
||||||
source $SOLARISANADIR/working/expName.sh
|
|
||||||
|
if [ -z $expName ]; then
|
||||||
|
source $SOLARISANADIR/working/expName.sh
|
||||||
|
fi
|
||||||
|
|
||||||
MacRawDataPath=$rawDataPathParent/$expName/
|
|
||||||
IP=solarisdaq # defined at ~/.ssh/config
|
IP=solarisdaq # defined at ~/.ssh/config
|
||||||
USR=solaris
|
USR=solaris
|
||||||
|
|
||||||
|
@ -42,7 +46,7 @@ if [ ${RUN} == "all" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "$YELLOW=============================================$NC"
|
echo -e "$YELLOW=============================================$NC"
|
||||||
tail -10 $MacRawDataPath/data/RunTimeStamp.dat
|
tail -10 $MacRawDataPath/raw_data/RunTimeStamp.dat
|
||||||
echo -e "$YELLOW=============================================$NC"
|
echo -e "$YELLOW=============================================$NC"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -60,7 +64,7 @@ RUN=$(printf '%03d' ${RUN})
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
#################### Download raw data
|
#################### 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
|
if [ ${PCID} -eq 2 ]; then
|
||||||
|
|
||||||
#=========== Ping to check the connectivity
|
#=========== 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/.
|
rsync -avuht --progress $USR@$IP:Analysis/working/expName.sh $SOLARISANADIR/working/.
|
||||||
fi
|
fi
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
echo -e "$YELLOW=============================================$NC"
|
echo -e "$YELLOW=============================================$NC"
|
||||||
tail -10 $MacRawDataPath/data/RunTimeStamp.dat
|
tail -10 ${rawDataPath}/RunTimeStamp.dat
|
||||||
echo -e "$YELLOW=============================================$NC"
|
echo -e "$YELLOW=============================================$NC"
|
||||||
|
|
||||||
count=`ls -1 $SOLARISANADIR/data_raw/${expName}_${RUN}_*.sol 2>/dev/null | wc -l`
|
count=`ls -1 ${rawDataPath}/${expName}_${RUN}_*.sol 2>/dev/null | wc -l`
|
||||||
echo -e "========== Number of Files : ${count}${NC}"
|
echo -e "========================= Number of Files : ${count}${YELLOW}"
|
||||||
if [ ${count} -eq 0 ]; then
|
if [ ${count} -eq 0 ]; then
|
||||||
echo "============================================"
|
echo "${NC}============================================"
|
||||||
echo "==== RAW Files of RUN-${RUN} not found! "
|
echo "==== RAW Files of RUN-${RUN} not found! "
|
||||||
echo "============================================"
|
echo "============================================"
|
||||||
|
|
||||||
isRunDataExist=false
|
isRunDataExist=false
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo -e "${YELLOW}"
|
du -hc ${rawDataPath}//${expName}_${RUN}_*.sol
|
||||||
du -hc $SOLARISANADIR/data_raw/${expName}_${RUN}_*.sol
|
|
||||||
echo -e "$NC============================================="
|
echo -e "$NC============================================="
|
||||||
isRunDataExist=true
|
isRunDataExist=true
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "${RED}##################### Loading Process_EventBuilder.sh ${NC}"
|
||||||
|
|
||||||
if [ -z $SOLARISANADIR ]; then
|
if [ -z $SOLARISANADIR ]; then
|
||||||
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
|
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
|
||||||
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
|
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
|
||||||
exit
|
exit
|
||||||
fi
|
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
|
if [ $# -ne 3 ] || [ $1 == "-help" ]; then
|
||||||
echo "$ Process_EventBuilder [RunNum] [EventBuild] [timeWin]"
|
echo "$ Process_EventBuilder [RunNum] [EventBuild] [timeWin]"
|
||||||
echo " RunNum = run number"
|
echo " RunNum = run number"
|
||||||
|
@ -19,23 +29,17 @@ RUN=$1
|
||||||
EventBld=$2
|
EventBld=$2
|
||||||
timeWin=$3
|
timeWin=$3
|
||||||
|
|
||||||
source ${SOLARISANADIR}/armory/Process_BasicConfig
|
source ${SOLARISANADIR}/Armory/Process_BasicConfig
|
||||||
source ${SOLARISANADIR}/working/expName.sh
|
if [ -z $expName ]; then
|
||||||
|
source $SOLARISANADIR/working/expName.sh
|
||||||
|
fi
|
||||||
|
|
||||||
runNum=${RUN#0} #remove zero
|
runNum=${RUN#0} #remove zero
|
||||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||||
|
|
||||||
rawDataPath=$SOLARISANADIR/data_raw
|
|
||||||
rootDataPath=$SOLARISANADIR/root_data
|
|
||||||
|
|
||||||
rawDataPattern="$rawDataPath/${expName}_${RUN}_*.sol"
|
rawDataPattern="$rawDataPath/${expName}_${RUN}_*.sol"
|
||||||
rootDataName="$rootDataPath/run$RUN.root"
|
rootDataName="$rootDataPath/run$RUN.root"
|
||||||
|
|
||||||
dir=$(pwd)
|
|
||||||
cd ${SOLARISANADIR}/armory
|
|
||||||
make
|
|
||||||
cd ${dir}
|
|
||||||
|
|
||||||
#==== check raw data exist
|
#==== check raw data exist
|
||||||
isRawDataExist=`ls -1 ${rawDataPattern}* 2>/dev/null | wc -l`
|
isRawDataExist=`ls -1 ${rawDataPattern}* 2>/dev/null | wc -l`
|
||||||
|
|
||||||
|
@ -44,11 +48,10 @@ if [ ! $isRawDataExist -gt 0 ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${CYAN} ============== list of files ${NC}"
|
echo -e "${YELLOW} ============== list of files ${NC}"
|
||||||
\du -h ${rawDataPattern}*
|
\du -h ${rawDataPattern}*
|
||||||
|
|
||||||
totSize=$(\du -hc ${rawDataPattern}* | tail -n 1 | awk '{print $1}')
|
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
|
#==== check raw data timeStamp
|
||||||
|
|
|
@ -9,6 +9,10 @@ if [ -z $SOLARISANADIR ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$PWD" != "${SOLARISANADIR}/working" ]; then
|
||||||
|
echo "============= go to the Working directory"
|
||||||
|
cd "${SOLARISANADIR}/working"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
|
||||||
echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [Monitor]"
|
echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [Monitor]"
|
||||||
|
@ -54,17 +58,11 @@ echo "### Trace Method : $TraceMethod"
|
||||||
echo "### Monitor : $isMonitor"
|
echo "### Monitor : $isMonitor"
|
||||||
echo "#################################################"
|
echo "#################################################"
|
||||||
|
|
||||||
source ${SOLARISANADIR}/armory/Process_BasicConfig
|
source ${SOLARISANADIR}/Armory/Process_BasicConfig
|
||||||
source ${SOLARISANADIR}/working/expName.sh
|
source ${rawDataPath}/expName.sh
|
||||||
|
|
||||||
if [ "$PWD" != "${SOLARISANADIR}/working" ]; then
|
|
||||||
echo "============= go to the Working directory"
|
|
||||||
cd "${SOLARISANADIR}/working"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#################################### CHECK IS RUN DATA EXIST
|
#################################### CHECK IS RUN DATA EXIST
|
||||||
isRunDataExist=true
|
isRunDataExist=false
|
||||||
|
|
||||||
#################################### EVENT BUILDER
|
#################################### EVENT BUILDER
|
||||||
source Process_Download $RUN
|
source Process_Download $RUN
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash -l
|
#!/bin/bash -l
|
||||||
|
|
||||||
|
echo -e "${RED}##################### Loading Process_Sort.sh ${NC}"
|
||||||
|
|
||||||
if [ -z $SOLARISANADIR ]; then
|
if [ -z $SOLARISANADIR ]; then
|
||||||
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
|
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
|
||||||
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
|
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
|
||||||
|
@ -19,8 +21,10 @@ RUN=$1
|
||||||
nWorker=$2
|
nWorker=$2
|
||||||
TraceMethod=$3
|
TraceMethod=$3
|
||||||
|
|
||||||
source $SOLARISANADIR/armory/Process_BasicConfig
|
source $SOLARISANADIR/Armory/Process_BasicConfig
|
||||||
|
if [ -z $expName ]; then
|
||||||
source $SOLARISANADIR/working/expName.sh
|
source $SOLARISANADIR/working/expName.sh
|
||||||
|
fi
|
||||||
|
|
||||||
runNum=${RUN#0} #remove zero
|
runNum=${RUN#0} #remove zero
|
||||||
RUN=$(printf '%03d' $runNum) ##add back the zero
|
RUN=$(printf '%03d' $runNum) ##add back the zero
|
||||||
|
@ -68,7 +72,7 @@ else
|
||||||
|
|
||||||
if [ $nWorker -le -1 ]; then
|
if [ $nWorker -le -1 ]; then
|
||||||
echo -e "${LRED}>>>>>>>>>>>>>>> Force GeneralSort $(date) ${NC}"
|
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}"
|
echo -e "${LRED}<<<<<<<<<<<<<<<< Done GeneralSort $(date) ${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -77,7 +81,7 @@ else
|
||||||
if [ $rootDataTime -ge $genRootDataTime ]; then
|
if [ $rootDataTime -ge $genRootDataTime ]; then
|
||||||
|
|
||||||
echo -e "${LRED}>>>>>>>>>>>>>>>>>>>>> GeneralSort $(date) ${NC}"
|
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}"
|
echo -e "${LRED}<<<<<<<<<<<<<<<< Done GeneralSort $(date) ${NC}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,9 +16,9 @@ export SOLARISANADIR
|
||||||
|
|
||||||
echo "####### set global variable SOLARISANADIR = ${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