File indexing completed on 2023-03-24 02:58:57
0001
0002
0003 function die { echo $1: status $2 ; exit $2; }
0004
0005 if [ "${SCRAM_TEST_NAME}" != "" ] ; then
0006 mkdir ${SCRAM_TEST_NAME}
0007 cd ${SCRAM_TEST_NAME}
0008 fi
0009 if test -f "SiStripConditionsDBFile.db"; then
0010 echo "cleaning the local test area"
0011 rm -fr SiStripConditionsDBFile.db
0012 rm -fr modifiedSiStrip*.db
0013 rm -fr gainManipulations.db
0014 fi
0015 pwd
0016 echo " testing CondTools/SiStrip"
0017
0018
0019 for entry in "${SCRAM_TEST_PATH}/"SiStrip*Builder_cfg.py
0020 do
0021 echo "===== Test \"cmsRun $entry \" ===="
0022 (cmsRun $entry) || die "Failure using cmsRun $entry" $?
0023 done
0024
0025 echo -e " Done with the writers \n\n"
0026
0027
0028 for entry in "${SCRAM_TEST_PATH}/"SiStrip*Reader_cfg.py
0029 do
0030 echo "===== Test \"cmsRun $entry \" ===="
0031 (cmsRun $entry) || die "Failure using cmsRun $entry" $?
0032 done
0033
0034 echo -e " Done with the readers \n\n"
0035
0036 sleep 5
0037
0038
0039 for entry in "${SCRAM_TEST_PATH}/"SiStrip*FromASCIIFile_cfg.py
0040 do
0041 echo "===== Test \"cmsRun $entry \" ===="
0042 (cmsRun $entry) || die "Failure using cmsRun $entry" $?
0043 done
0044
0045 echo -e " Done with the builders from file \n\n"
0046
0047
0048 for entry in "${SCRAM_TEST_PATH}/"SiStrip*Miscalibrator_cfg.py
0049 do
0050 echo "===== Test \"cmsRun $entry \" ===="
0051 (cmsRun $entry) || die "Failure using cmsRun $entry" $?
0052 done
0053
0054 echo -e " Done with the miscalibrators \n\n"
0055
0056
0057
0058
0059 G1TAG=SiStripApvGain_GR10_v1_hlt
0060 G2TAG=SiStripApvGain_FromParticles_GR10_v1_express
0061 OLDG1since=325642
0062 NEWG1since=343828
0063 OLDG2since=336067
0064
0065 echo -e "\n\n Copying IOVs $OLDG1since and $NEWG1since from $G1TAG and IOV $OLDG2since from $G2TAG"
0066
0067 conddb --yes --db pro copy ${G1TAG} G1_old --from ${OLDG1since} --to $((++OLDG1since)) --destdb gainManipulations.db
0068 conddb --yes --db pro copy ${G1TAG} G1_new --from ${NEWG1since} --to $((++NEWG1since)) --destdb gainManipulations.db
0069 conddb --yes --db pro copy ${G2TAG} G2_old --from ${OLDG2since} --to $((++OLDG2since)) --destdb gainManipulations.db
0070
0071 sqlite3 gainManipulations.db "update IOV SET SINCE=1 where SINCE=$((--OLDG1since))"
0072 sqlite3 gainManipulations.db "update IOV SET SINCE=1 where SINCE=$((--NEWG1since))"
0073 sqlite3 gainManipulations.db "update IOV SET SINCE=1 where SINCE=$((--OLDG2since))"
0074
0075 echo -e "\n\n Checking the content of the local conditions file \n\n"
0076 sqlite3 gainManipulations.db "select * from IOV"
0077
0078 (cmsRun ${SCRAM_TEST_PATH}/SiStripApvGainRescaler_cfg.py additionalConds=sqlite_file:${PWD}/gainManipulations.db) || die "Failure using cmsRun SiStripApvGainRescaler_cfg.py)" $?
0079 echo -e " Done with the gain rescaler \n\n"
0080
0081
0082
0083 (cmsRun "${SCRAM_TEST_PATH}/"SiStripCondVisualizer_cfg.py) || die "Failure using cmsRun SiStripCondVisualizer_cfg.py" $?
0084 (python3 "${SCRAM_TEST_PATH}/"db_tree_dump_wrapper.py) || die "Failure running python3 db_tree_dump_wrapper.py" $?
0085 echo -e " Done with the visualization \n\n"
0086
0087 echo -e "\n\n Testing the conditions patching code: \n\n"
0088
0089 myFEDs=""
0090 for i in {51..490..2}; do
0091 myFEDs+="${i},"
0092 done
0093 myFEDs+=491
0094 echo " masking the following FEDs: "${myFEDs}
0095
0096 (cmsRun "${SCRAM_TEST_PATH}/"SiStripBadChannelPatcher_cfg.py isUnitTest=True FEDsToAdd=${myFEDs} outputTag=OddFEDs) || die "Failure using cmsRun SiStripBadChannelPatcher_cfg.py when adding FEDs" $?
0097 (cmsRun "${SCRAM_TEST_PATH}/"SiStripBadChannelPatcher_cfg.py isUnitTest=True inputConnection=sqlite_file:outputDB.db inputTag=OddFEDs FEDsToRemove=${myFEDs} outputTag=OddFEDsRemoved) || die "Failure using cmsRun SiStripBadChannelPatcher_cfg.py when removing FEDs" $?
0098
0099 echo -e " Done with the bad components patching \n\n"