Skip to content

Commit

Permalink
add unit tests for PromptCalibProdSiStripLA workflow (worker+harvester)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Dec 1, 2023
1 parent 27bec5f commit 519df2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions CalibTracker/SiStripLorentzAngle/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<test name="testPromptCalibProdSiStripLA" command="testPromptCalibProdSiStripLA.sh"/>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.MessageLogger.cerr.FwkReport.reportEvery = 100 # limit the output for the unit test
process.load('Configuration.EventContent.EventContentCosmics_cff')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
Expand All @@ -21,13 +22,13 @@
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(100000),
input = cms.untracked.int32(1000), # 1000000
output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)

# Input source
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('/store/data/Commissioning2023/Cosmics/ALCARECO/SiStripCalCosmics-PromptReco-v1/000/364/141/00000/062e670e-40e3-4950-b0bb-dd354844d16f.root'),
fileNames = cms.untracked.vstring('/store/data/Commissioning2023/Cosmics/ALCARECO/SiStripCalCosmics-PromptReco-v1/000/364/174/00000/59a465b4-6e25-4ea0-8fe3-2319bdea7fcb.root'),
secondaryFileNames = cms.untracked.vstring()
)

Expand Down Expand Up @@ -104,11 +105,12 @@
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)

#Setup FWK for multithreaded
# Setup FWK for multithreaded
process.options.numberOfThreads = 4
process.options.numberOfStreams = 0


# Save the per-histogram modules in order to test the SiStripHashedDetId
process.ALCARECOSiStripLACalib.saveHistoMods = cms.bool(True)

# Customisation from command line

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
function die { echo $1: status $2 ; exit $2; }

# test worker
printf "TESTING SiStrip Lorentz Angle Worker ...\n\n"
cmsRun ${SCRAM_TEST_PATH}/step_PromptCalibProdSiStripLA_cfg.py || die "Failure running step_PromptCalibProdSiStripLA_cfg.py" $?

# test harvester
printf "TESTING SiStrip Lorentz Angle Harvester ...\n\n"
cmsRun ${SCRAM_TEST_PATH}/step_PromptCalibProdSiStripLA_ALCAHARVEST_cfg.py || die "Failure running step_PromptCalibProdSiStripLA_ALCAHARVEST_cfg.py" $?

0 comments on commit 519df2c

Please sign in to comment.