From 3f8af83e0b3abd58afbb4fd55d28cde4f6e3a857 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Mon, 30 Nov 2020 17:54:31 -0800 Subject: [PATCH] check that input root files are available before running validate.C --- comparisons/validateJR.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/comparisons/validateJR.sh b/comparisons/validateJR.sh index 100e708e9c1e..29a9762e225a 100644 --- a/comparisons/validateJR.sh +++ b/comparisons/validateJR.sh @@ -24,9 +24,9 @@ done grep root ${inList} | grep -v "#" | while read -r dsN fNP procN comm; do #fNP can be a pattern: path-expand it first fN=`echo ${baseA}/${fNP} | cut -d" " -f1 | sed -e "s?^${baseA}/??g"` - [ ! -f "${baseA}/${fN}" ] && echo Missing ${baseA}/${fN} - #process regular files first - if [ -f "${baseA}/${fN}" ]; then + #[ ! -f "${baseA}/${fN}" ] && echo Missing ${baseA}/${fN} + #process regular files first; need files both in baseA and baseB + if [ -f "${baseA}/${fN}" -a -f "${baseB}/${fN}" ]; then extN=all_${diffN}_${dsN} mkdir -p ${extN} pushd ${extN} @@ -44,7 +44,8 @@ grep root ${inList} | grep -v "#" | while read -r dsN fNP procN comm; do if [ ! -f "${baseA}/${mFN}" ]; then mFN="${fNBase}_inMINIAODSIM.root" fi - if [ -f "${baseA}/${mFN}" ]; then + #need files both in baseA and baseB + if [ -f "${baseA}/${mFN}" -a -f "${baseB}/${mFN}" ]; then echo $mFN extmN=all_mini_${diffN}_${dsN} mkdir -p ${extmN}