Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-15 01:25:04

0001 #!/bin/sh
0002 
0003 function die { echo $1: status $2 ; exit $2; }
0004 
0005 echo "TESTING BeamSpotOnline From DB Read / Write codes ..."
0006 
0007 ## clean the input db files
0008 if test -f "test_BSHLT_tag.db"; then
0009     rm -fr test_BSHLT_tag.db
0010 fi
0011 
0012 if test -f "test_BSLegacy_tag.db"; then
0013     rm -fr test_BSLegacy_tag.db
0014 fi
0015 
0016 ## copy the input file
0017 cp -pr $CMSSW_BASE/src/CondTools/BeamSpot/data/BeamFitResults_Run306171.txt .
0018 
0019 # test write
0020 printf "TESTING Writing BeamSpotOnlineLegacyObjectsRcd DB object ...\n\n"
0021 cmsRun ${LOCAL_TEST_DIR}/BeamSpotOnlineRecordsWriter_cfg.py unitTest=True inputRecord=BeamSpotOnlineLegacyObjectsRcd || die "Failure writing payload for BeamSpotOnlineLegacyObjectsRcd" $? 
0022 
0023 printf "TESTING Writing BeamSpotOnlineHLTObjectsRcd DB object ...\n\n"
0024 cmsRun ${LOCAL_TEST_DIR}/BeamSpotOnlineRecordsWriter_cfg.py unitTest=True inputRecord=BeamSpotOnlineHLTObjectsRcd || die "Failure writing payload for BeamSpotOnlineHLTObjectsRcd" $? 
0025 # test read
0026 
0027 printf "TESTING Reading BeamSpotOnlineLegacyObjectsRcd DB object ...\n\n"
0028 cmsRun ${LOCAL_TEST_DIR}/BeamSpotOnlineRecordsReader_cfg.py unitTest=True inputRecord=BeamSpotOnlineLegacyObjectsRcd || die "Failure reading payload for BeamSpotOnlineLegacyObjectsRcd" $? 
0029 
0030 printf "TESTING Reading BeamSpotOnlineHLTObjectsRcd DB object ...\n\n"
0031 cmsRun ${LOCAL_TEST_DIR}/BeamSpotOnlineRecordsReader_cfg.py unitTest=True inputRecord=BeamSpotOnlineHLTObjectsRcd || die "Failure reading payload for BeamSpotOnlineHLTObjectsRcd" $? 
0032 
0033 echo "TESTING reading BeamSpotObjectRcd DB object ...\n\n"
0034 cmsRun ${LOCAL_TEST_DIR}/BeamSpotRcdPrinter_cfg.py || die "Failure running BeamSpotRcdPrinter" $?