Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:40

0001 # Tests concurrent runs along with concurrent IOVs
0002 # Note that 3 concurrent runs implies at least 7
0003 # concurrent IOVs are needed and we configure
0004 # 8 concurrent IOVs so that concurrent runs are
0005 # really the limiting factor for the test.
0006 # Note 7 includes 1 for the first run and then 3
0007 # for each subsequent concurrent run which includes
0008 # an IOV for end run, begin run, and begin lumi necessary
0009 # to get to the next event. In this test every lumi is
0010 # only valid for one transition (see internals of
0011 # RunLumiESSource). This test checks that correct
0012 # EventSetup info is retrieved in all the transitions
0013 # plus the same test is run in a SubProcess to
0014 # check that transitions there are also running properly.
0015 # Manual examination of the times in the log output should
0016 # show 3 events in 3 different runs being processed
0017 # concurrently.
0018 
0019 import FWCore.ParameterSet.Config as cms
0020 
0021 process = cms.Process("READ")
0022 
0023 process.source = cms.Source("PoolSource",
0024     fileNames = cms.untracked.vstring(
0025         'file:testConcurrentIOVsAndRuns.root')
0026 )
0027 
0028 process.options = cms.untracked.PSet(
0029     numberOfThreads = cms.untracked.uint32(8),
0030     numberOfStreams = cms.untracked.uint32(8),
0031     numberOfConcurrentRuns = cms.untracked.uint32(3),
0032     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(8),
0033     eventSetup = cms.untracked.PSet(
0034         numberOfConcurrentIOVs = cms.untracked.uint32(8)
0035     )
0036 )
0037 
0038 process.runLumiESSource = cms.ESSource("RunLumiESSource")
0039 
0040 process.test = cms.EDAnalyzer("RunLumiESAnalyzer")
0041 
0042 process.busy1 = cms.EDProducer("BusyWaitIntProducer",ivalue = cms.int32(1), iterations = cms.uint32(40*1000*1000))
0043 
0044 process.p1 = cms.Path(process.busy1 * process.test)
0045 
0046 process.out = cms.OutputModule("PoolOutputModule",
0047     fileName = cms.untracked.string('testConcurrentIOVsAndRunsRead.root')
0048 )
0049 
0050 process.e = cms.EndPath(process.out)
0051 
0052 # ---------------------------------------------------------------
0053 
0054 aSubProcess = cms.Process("TESTSUBPROCESS")
0055 process.addSubProcess(cms.SubProcess(aSubProcess))
0056 
0057 aSubProcess.runLumiESSource = cms.ESSource("RunLumiESSource")
0058 
0059 aSubProcess.test = cms.EDAnalyzer("RunLumiESAnalyzer")
0060 
0061 aSubProcess.p1 = cms.Path(aSubProcess.test)
0062 
0063 aSubProcess.out = cms.OutputModule("PoolOutputModule",
0064     fileName = cms.untracked.string('testConcurrentIOVsAndRunsSubProcessRead.root')
0065 )
0066 
0067 aSubProcess.e = cms.EndPath(aSubProcess.out)