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("TEST")
0022 
0023 process.source = cms.Source("EmptySource",
0024     firstRun = cms.untracked.uint32(1),
0025     firstLuminosityBlock = cms.untracked.uint32(1),
0026     firstEvent = cms.untracked.uint32(1),
0027     numberEventsInLuminosityBlock = cms.untracked.uint32(1),
0028     numberEventsInRun = cms.untracked.uint32(1)
0029 )
0030 
0031 process.maxEvents.input = 30
0032 
0033 process.options = dict(
0034     numberOfThreads = 8,
0035     numberOfStreams = 8,
0036     numberOfConcurrentRuns = 3,
0037     numberOfConcurrentLuminosityBlocks = 8,
0038     eventSetup = dict(
0039         numberOfConcurrentIOVs = 8
0040     )
0041 )
0042 
0043 process.runLumiESSource = cms.ESSource("RunLumiESSource")
0044 
0045 process.test = cms.EDAnalyzer("RunLumiESAnalyzer")
0046 
0047 process.busy1 = cms.EDProducer("BusyWaitIntProducer",ivalue = cms.int32(1), iterations = cms.uint32(40*1000*1000))
0048 
0049 process.p1 = cms.Path(process.busy1 * process.test)
0050 
0051 process.out = cms.OutputModule("PoolOutputModule",
0052     fileName = cms.untracked.string('testConcurrentIOVsAndRuns.root')
0053 )
0054 
0055 process.e = cms.EndPath(process.out)
0056 
0057 # ---------------------------------------------------------------
0058 
0059 aSubProcess = cms.Process("TESTSUBPROCESS")
0060 process.addSubProcess(cms.SubProcess(aSubProcess))
0061 
0062 aSubProcess.runLumiESSource = cms.ESSource("RunLumiESSource")
0063 
0064 aSubProcess.test = cms.EDAnalyzer("RunLumiESAnalyzer")
0065 
0066 aSubProcess.p1 = cms.Path(aSubProcess.test)
0067 
0068 aSubProcess.out = cms.OutputModule("PoolOutputModule",
0069     fileName = cms.untracked.string('testConcurrentIOVsAndRunsSubProcess.root')
0070 )
0071 
0072 aSubProcess.e = cms.EndPath(aSubProcess.out)