Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:43

0001 #!/bin/sh
0002 
0003 function die { echo $1: status $2 ; exit $2; }
0004 
0005 echo "TESTING BeamSpot + BeamSpotOnline + SimBeamSpot 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 if test -f "test_simBS_tag.db"; then
0017     rm -fr test_simBS_tag.db
0018 fi
0019 
0020 ## copy the input file
0021 cp -pr $CMSSW_BASE/src/CondTools/BeamSpot/data/BeamFitResults_Run306171.txt .
0022 
0023 # test write
0024 printf "TESTING Writing BeamSpotOnlineLegacyObjectsRcd DB object ...\n\n"
0025 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineRecordsWriter_cfg.py unitTest=True inputRecord=BeamSpotOnlineLegacyObjectsRcd || die "Failure writing payload for BeamSpotOnlineLegacyObjectsRcd" $?
0026 
0027 printf "TESTING Writing BeamSpotOnlineHLTObjectsRcd DB object ...\n\n"
0028 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineRecordsWriter_cfg.py unitTest=True inputRecord=BeamSpotOnlineHLTObjectsRcd || die "Failure writing payload for BeamSpotOnlineHLTObjectsRcd" $?
0029 
0030 printf "TESTING Writing SimBeamSpotObjectsRcd DB object ...\n\n"
0031 cmsRun ${SCRAM_TEST_PATH}/BeamProfile2DBWriter_cfg.py unitTest=True || die "Failure writing payload for SimBeamSpotObjectsRcd" $?
0032 
0033 # test read
0034 printf "TESTING Reading BeamSpotOnlineLegacyObjectsRcd DB object ...\n\n"
0035 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineRecordsReader_cfg.py unitTest=True inputRecord=BeamSpotOnlineLegacyObjectsRcd || die "Failure reading payload for BeamSpotOnlineLegacyObjectsRcd" $?
0036 
0037 printf "TESTING Reading BeamSpotOnlineHLTObjectsRcd DB object ...\n\n"
0038 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineRecordsReader_cfg.py unitTest=True inputRecord=BeamSpotOnlineHLTObjectsRcd || die "Failure reading payload for BeamSpotOnlineHLTObjectsRcd" $?
0039 
0040 printf "TESTING reading BeamSpotObjectRcd DB object ...\n\n"
0041 cmsRun ${SCRAM_TEST_PATH}/BeamSpotRcdPrinter_cfg.py startIOV=1406713458589700 endIOV=1614147494085159 verbose=False || die "Failure running BeamSpotRcdPrinter" $?
0042 cmsRun ${SCRAM_TEST_PATH}/BeamSpotRcdRead_cfg.py || die "Failure running BeamSpotRcdRead" $?
0043 
0044 printf "TESTING converting BeamSpotOnlineObjects from BeamSpotObjects ...\n\n"
0045 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineFromOfflineConverter_cfg.py unitTest=True startRun=325172 startLumi=458 || die "Failure running single-IOV BeamSpotOnlineFromOfflineConverter" $?
0046 cmsRun ${SCRAM_TEST_PATH}/BeamSpotOnlineFromOfflineConverter_cfg.py unitTest=True startRun=325172 startLumi=398 || die "Failure running multi-IOV BeamSpotOnlineFromOfflineConverter" $?
0047 
0048 printf "TESTING Reading SimBeamSpotObjectsRcd DB object ...\n\n"
0049 cmsRun ${SCRAM_TEST_PATH}/BeamProfile2DBReader_cfg.py unitTest=True || die "Failure reading payload for SimBeamSpotObjectsRcd" $?