Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-26 05:06:39

0001 #!/bin/bash
0002 
0003 function die { echo $1: status $2 ;  exit $2; }
0004 
0005 LOCAL_TEST_DIR=${SCRAM_TEST_PATH}
0006 
0007 cmsRun ${LOCAL_TEST_DIR}/create_Run3Scouting_test_file_cfg.py || die 'Failure using create_Run3Scouting_test_file_cfg.py' $?
0008 
0009 cmsRun ${LOCAL_TEST_DIR}/test_readRun3Scouting_cfg.py || die "Failure using test_readRun3Scouting_cfg.py" $?
0010 
0011 # The old files read below were generated as follows.
0012 #
0013 #     testRun3Scouting_v3_v5_v3_v4_v5_v3_v5_v3_v3_CMSSW_12_4_0_split_99.root:
0014 #     Check out the 12_4_0 release and cherry pick the commit that
0015 #     adds the original version of the file
0016 #     DataFormats/Scouting/test/TestWriteRun3Scouting.cc
0017 #     (6 files added by that commit). There likely will be
0018 #     minor conflicts or issues in test/BuildFile.xml that need to
0019 #     be resolved.
0020 #
0021 #     testRun3Scouting_v3_v6_v3_v4_v5_v3_v5_v3_v3_CMSSW_13_0_3_split_99.root:
0022 #     Check out the 13_0_3 release and cherry pick the commit that
0023 #     adds the original version of the file
0024 #     DataFormats/Scouting/test/TestWriteRun3Scouting.cc
0025 #     Also check out the second commit that modifies that file.
0026 #     (6 files added by those commits). There likely will be
0027 #     minor conflicts or issues in test/BuildFile.xml that need to
0028 #     be resolved.
0029 #
0030 #     testRun3Scouting_v3_v7_v3_v4_v5_v3_v6_v3_v4_CMSSW_14_0_0_pre3_split_99.root:
0031 #     Check out the 14_0_0_pre3 pre-release, no additional commits
0032 #     will be neeeded.
0033 #
0034 # Run the create_Run3Scouting_test_file_cfg.py configuration and
0035 # rename the file it creates.
0036 #
0037 # The versions of the classes are encoded in the filenames in
0038 # alphabetical order. This order is also the order the Run 3
0039 # Scouting classes appear in classes_def.xml (in the master branch
0040 # of CMSSW).
0041 #
0042 # By default, split level 99 is used (maximum possible splitting).
0043 # If the suffix "_split_0" is near the end of the filename, the
0044 # following was added to the configuration of the output module:
0045 #     "splitLevel = cms.untracked.int32(0)"
0046 #
0047 # The only version that changed from 12_4_0
0048 # to 13_0_3 was the Run3ScoutingElectron class.
0049 #
0050 # 12_4_0 was chosen because the 12_4_X release cycle was used
0051 # for 2022 data, and the scouting data formats were not updated
0052 # after 12_4_0.
0053 #
0054 # 13_0_3 was chosen because the 13_0_X release cycle was used
0055 # for 2023 data, and the scouting data formats and ROOT were
0056 # not updated after 13_0_3.
0057 #
0058 # Note that the 12_4_0 split 0 file was affected by the ROOT bug
0059 # that caused StreamerInfo objects to be dropped from the file.
0060 # (in later releases the bug was fixed and for a reason not completely
0061 # understood the bug didn't affect split 99 files, not sure
0062 # if ROOT handles the schema evolution without the StreamerInfo
0063 # with a high split level or for some reason with split 99
0064 # the StreamerInfos were written, doesn't matter really and no
0065 # one took the time to investigate that). When reading that file
0066 # the Service named "FixMissingStreamerInfos" needs to be used.
0067 
0068 file=testRun3Scouting_v3_v5_v3_v4_v5_v3_v5_v3_v3_CMSSW_12_4_0_split_99.root
0069 inputfile=$(edmFileInPath DataFormats/Scouting/data/$file) || die "Failure edmFileInPath DataFormats/Scouting/data/$file" $?
0070 argsPassedToPython="--inputFile $inputfile --outputFileName testRun3Scouting2_CMSSW_12_4_0.root --electronVersion 5 --photonVersion 5 --vertexVersion 3"
0071 cmsRun ${LOCAL_TEST_DIR}/test_readRun3Scouting_cfg.py $argsPassedToPython || die "Failed to read old file $file" $?
0072 
0073 file=testRun3Scouting_v3_v5_v3_v4_v5_v3_v5_v3_v3_CMSSW_12_4_0_split_0.root
0074 inputfile=$(edmFileInPath DataFormats/Scouting/data/$file) || die "Failure edmFileInPath DataFormats/Scouting/data/$file" $?
0075 argsPassedToPython="--inputFile $inputfile --outputFileName testRun3Scouting2_CMSSW_12_4_0.root --electronVersion 5 --photonVersion 5 --vertexVersion 3 --fixStreamerInfo"
0076 cmsRun ${LOCAL_TEST_DIR}/test_readRun3Scouting_cfg.py $argsPassedToPython || die "Failed to read old file $file" $?
0077 
0078 oldFiles="testRun3Scouting_v3_v6_v3_v4_v5_v3_v5_v3_v3_CMSSW_13_0_3_split_99.root testRun3Scouting_v3_v6_v3_v4_v5_v3_v5_v3_v3_CMSSW_13_0_3_split_0.root"
0079 for file in $oldFiles; do
0080   inputfile=$(edmFileInPath DataFormats/Scouting/data/$file) || die "Failure edmFileInPath DataFormats/Scouting/data/$file" $?
0081   argsPassedToPython="--inputFile $inputfile --outputFileName testRun3Scouting2_CMSSW_13_0_3.root --electronVersion 6 --photonVersion 5 --vertexVersion 3"
0082   cmsRun ${LOCAL_TEST_DIR}/test_readRun3Scouting_cfg.py $argsPassedToPython || die "Failed to read old file $file" $?
0083 done
0084 
0085 oldFiles="testRun3Scouting_v3_v7_v3_v4_v5_v3_v6_v3_v4_CMSSW_14_0_0_pre3_split_99.root testRun3Scouting_v3_v7_v3_v4_v5_v3_v6_v3_v4_CMSSW_14_0_0_pre3_split_0.root"
0086 for file in $oldFiles; do
0087   inputfile=$(edmFileInPath DataFormats/Scouting/data/$file) || die "Failure edmFileInPath DataFormats/Scouting/data/$file" $?
0088   argsPassedToPython="--inputFile $inputfile --outputFileName testRun3Scouting2_CMSSW_14_0_0_pre3.root --electronVersion 7 --photonVersion 6 --vertexVersion 4"
0089   cmsRun ${LOCAL_TEST_DIR}/test_readRun3Scouting_cfg.py $argsPassedToPython || die "Failed to read old file $file" $?
0090 done
0091 
0092 exit 0