-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for PPSAlCaRecoProducer.
- Loading branch information
1 parent
6016617
commit ead8252
Showing
6 changed files
with
74 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<bin name="testExpressPPSAlCaRecoProducer" file="TestDriver.cpp"> | ||
<flags TEST_RUNNER_ARGS="/bin/bash Calibration/PPSAlCaRecoProducer/test test_express_AlCaRecoProducer.sh"/> | ||
<use name="FWCore/Utilities"/> | ||
</bin> | ||
<bin name="testExpressPPSAlCaRecoOutput" file="TestDriver.cpp"> | ||
<flags TEST_RUNNER_ARGS="/bin/bash Calibration/PPSAlCaRecoProducer/test test_express_PPSAlCaReco_output.sh"/> | ||
<flags PRE_TEST="testExpressPPSAlCaRecoProducer"/> | ||
<use name="FWCore/Utilities"/> | ||
</bin> | ||
<bin name="testPromptPPSAlCaRecoProducer" file="TestDriver.cpp"> | ||
<flags TEST_RUNNER_ARGS="/bin/bash Calibration/PPSAlCaRecoProducer/test test_prompt_AlCaRecoProducer.sh"/> | ||
<use name="FWCore/Utilities"/> | ||
</bin> | ||
<bin name="testPromptPPSAlCaRecoOutput" file="TestDriver.cpp"> | ||
<flags TEST_RUNNER_ARGS="/bin/bash Calibration/PPSAlCaRecoProducer/test test_prompt_PPSAlCaReco_output.sh"/> | ||
<flags PRE_TEST="testPromptPPSAlCaRecoProducer"/> | ||
<use name="FWCore/Utilities"/> | ||
</bin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "FWCore/Utilities/interface/TestHelper.h" | ||
RUNTEST() |
34 changes: 22 additions & 12 deletions
34
Calibration/PPSAlCaRecoProducer/test/test_express_AlCaRecoProducer.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
#!/bin/bash | ||
function die { echo $1: status $2; exit $2; } | ||
|
||
customise_commands="process.GlobalTag.toGet = cms.VPSet()\ | ||
\nprocess.GlobalTag.toGet.append(cms.PSet(record = cms.string(\"AlCaRecoTriggerBitsRcd\"),tag = cms.string(\"AlCaRecoHLTpaths_PPS2022_express_v1\"), connect = cms.string(\"frontier://FrontierProd/CMS_CONDITIONS\")))\ | ||
\nprocess.GlobalTag.toGet.append(cms.PSet(record = cms.string(\"PPSTimingCalibrationLUTRcd\"),tag = cms.string(\"PPSDiamondTimingCalibrationLUT_test\"), connect = cms.string(\"frontier://FrontierProd/CMS_CONDITIONS\")))\ | ||
\nprocess.ALCARECOPPSCalMaxTracksFilter.TriggerResultsTag = cms.InputTag(\"TriggerResults\",\"\",\"HLTX\")" | ||
|
||
cmsDriver.py testExpressPPSAlCaRecoProducer -s ALCAPRODUCER:PPSCalMaxTracks,ENDJOB \ | ||
--process ALCARECO \ | ||
--scenario pp \ | ||
--era ctpps_2018 \ | ||
--conditions auto:run3_data_express \ | ||
--data \ | ||
--datatier ALCARECO \ | ||
--eventcontent ALCARECO \ | ||
--nThreads 8 \ | ||
--number 100 --filein file:/build/lgrzanka/outputALCAPPS_single.root \ | ||
--fileout file:outputALCAPPS_RECO_express.root \ | ||
--customise_commands="$customise_commands" | ||
INPUTFILE="/store/group/alca_global/pps_alcareco_producer_tests/outputALCAPPS_single.root" | ||
COMMMAND=`xrdfs cms-xrd-global.cern.ch locate $INPUTFILE` | ||
STATUS=$? | ||
echo "xrdfs command status = "$STATUS | ||
if [ $STATUS -eq 0 ]; then | ||
echo "Using file ${INPUTFILE}. Running in ${LOCAL_TEST_DIR}." | ||
(cmsDriver.py testExpressPPSAlCaRecoProducer -s ALCAPRODUCER:PPSCalMaxTracks,ENDJOB \ | ||
--process ALCARECO \ | ||
--scenario pp \ | ||
--era ctpps_2018 \ | ||
--conditions auto:run3_data_express \ | ||
--data \ | ||
--datatier ALCARECO \ | ||
--eventcontent ALCARECO \ | ||
--nThreads 8 \ | ||
--number 100 --filein ${INPUTFILE} \ | ||
--fileout file:outputALCAPPS_RECO_express.root \ | ||
--customise_commands="$customise_commands") || die 'failed running test_express_AlCaRecoProducer' $? | ||
else | ||
die "SKIPPING test, file ${INPUTFILE} not found" 0 | ||
fi |
4 changes: 4 additions & 0 deletions
4
Calibration/PPSAlCaRecoProducer/test/test_express_PPSAlCaReco_output.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
function die { echo $1: status $2; exit $2; } | ||
|
||
(cmsRun ${LOCAL_TEST_DIR}/test_express_PPSAlCaReco_output.py) || die 'failed running test_express_PPSAlCaReco_output.py' $? |
37 changes: 24 additions & 13 deletions
37
Calibration/PPSAlCaRecoProducer/test/test_prompt_AlCaRecoProducer.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
#!/bin/bash | ||
function die { echo $1: status $2; exit $2; } | ||
|
||
customise_commands="process.GlobalTag.toGet = cms.VPSet()\ | ||
\nprocess.GlobalTag.toGet.append(cms.PSet(record = cms.string(\"AlCaRecoTriggerBitsRcd\"),tag = cms.string(\"AlCaRecoHLTpaths_PPS2022_prompt_v1\"), connect = cms.string(\"frontier://FrontierProd/CMS_CONDITIONS\")))\ | ||
\nprocess.GlobalTag.toGet.append(cms.PSet(record = cms.string(\"PPSTimingCalibrationLUTRcd\"),tag = cms.string(\"PPSDiamondTimingCalibrationLUT_test\"), connect = cms.string(\"frontier://FrontierProd/CMS_CONDITIONS\")))\ | ||
\nprocess.ALCARECOPPSCalMaxTracksFilter.TriggerResultsTag = cms.InputTag(\"TriggerResults\",\"\",\"HLTX\")" | ||
|
||
# note we currently use `auto:run3_data_express` GT | ||
# the correct GT (auto:run3_data_prompt) doesn't have LHCInfo record for run 322022 which corresponds to our face ALCARAW file | ||
cmsDriver.py testPromptPPSAlCaRecoProducer -s ALCAPRODUCER:PPSCalMaxTracks,ENDJOB \ | ||
--process ALCARECO \ | ||
--scenario pp \ | ||
--era ctpps_2018 \ | ||
--conditions auto:run3_data_express \ | ||
--data \ | ||
--datatier ALCARECO \ | ||
--eventcontent ALCARECO \ | ||
-n 100 --filein file:/build/lgrzanka/outputALCAPPS_single.root \ | ||
--fileout file:outputALCAPPS_RECO_prompt.root \ | ||
--customise_commands="$customise_commands" | ||
INPUTFILE="/store/group/alca_global/pps_alcareco_producer_tests/outputALCAPPS_single.root" | ||
COMMMAND=`xrdfs cms-xrd-global.cern.ch locate $INPUTFILE` | ||
STATUS=$? | ||
echo "xrdfs command status = "$STATUS | ||
if [ $STATUS -eq 0 ]; then | ||
echo "Using file ${INPUTFILE}. Running in ${LOCAL_TEST_DIR}." | ||
# note we currently use `auto:run3_data_express` GT | ||
# the correct GT (auto:run3_data_prompt) doesn't have LHCInfo record for run 322022 which corresponds to our face ALCARAW file | ||
(cmsDriver.py testPromptPPSAlCaRecoProducer -s ALCAPRODUCER:PPSCalMaxTracks,ENDJOB \ | ||
--process ALCARECO \ | ||
--scenario pp \ | ||
--era ctpps_2018 \ | ||
--conditions auto:run3_data_express \ | ||
--data \ | ||
--datatier ALCARECO \ | ||
--eventcontent ALCARECO \ | ||
--nThreads 8 \ | ||
--number 100 --filein ${INPUTFILE} \ | ||
--fileout file:outputALCAPPS_RECO_prompt.root \ | ||
--customise_commands="$customise_commands") || die 'failed running test_prompt_AlCaRecoProducer' $? | ||
else | ||
die "SKIPPING test, file ${INPUTFILE} not found" 0 | ||
fi |
4 changes: 4 additions & 0 deletions
4
Calibration/PPSAlCaRecoProducer/test/test_prompt_PPSAlCaReco_output.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
function die { echo $1: status $2; exit $2; } | ||
|
||
(cmsRun ${LOCAL_TEST_DIR}/test_prompt_PPSAlCaReco_output.py) || die 'failed running test_prompt_PPSAlCaReco_output.py' $? |