File indexing completed on 2023-03-25 03:10:03
0001
0002
0003 function die { echo $1: status $2 ; exit $2; }
0004
0005 function countEvents() {
0006 local FILE="$1"
0007 NUMBER=$(echo `edmFileUtil $FILE | grep events` | awk '{print $6}')
0008 echo $NUMBER
0009 }
0010
0011 echo "TESTING detectorStateFilter ..."
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 INPUTFILE="/store/express/Commissioning2020/ExpressCosmics/FEVT/Express-v1/000/338/714/00000/515CD930-9BBA-1945-87C3-AD555E25F301.root"
0028
0029
0030 printf "TESTING Pixels ...\n\n"
0031 cmsRun ${SCRAM_TEST_PATH}/test_DetectorStateFilter_cfg.py maxEvents=10 isStrip=False inputFiles=$INPUTFILE outputFile=outPixels.root || die "Failure filtering on pixels" $?
0032
0033
0034 printf "TESTING Strips ...\n\n"
0035 cmsRun ${SCRAM_TEST_PATH}/test_DetectorStateFilter_cfg.py maxEvents=10 isStrip=True inputFiles=$INPUTFILE outputFile=outStrips.root || die "Failure filtering on strips" $?
0036
0037
0038 pixelCounts=`countEvents outPixels_numEvent10.root`
0039 stripCounts=`countEvents outStrips_numEvent10.root`
0040
0041 if [[ $pixelCounts -eq 0 ]]
0042 then
0043 echo "The number of events in the pixel filter file matches expectations ($pixelCounts)."
0044 else
0045 echo "WARNING!!! The number of events in the pixel filter file ($pixelCounts) does NOT match expectations (0)."
0046 exit 1
0047 fi
0048
0049 if [[ $stripCounts -eq 10 ]]
0050 then
0051 echo "The number of events in the strip filter file matches expectations ($stripCounts)."
0052 else
0053 echo "WARNING!!! The number of events in the strip filter file ($stripCounts) does NOT match expectations (10)."
0054 exit 1
0055 fi