Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-14 11:44:45

0001 # This configuration tests CondDBESSource and the EventSetup
0002 # system. It causes it to read BeamSpot data objects from
0003 # the database. The global tag and run number are selected
0004 # to access this data in a run which is known to have
0005 # multiple IOVs in the same run. This is a very simple job
0006 # with empty input and one event per luminosity block.
0007 # The analyzer gets this BeamSpot object and prints
0008 # values from it to standard out. This is compared to
0009 # a reference file of known expected files. If the
0010 # correct data is not read and written to output then
0011 # the unit test fails. The additional wrinkle here is that
0012 # the analyzer puts in a "busy wait" (intentional does
0013 # some calculation that uses CPU for a while). It does
0014 # this for each event that is the first event of a
0015 # new IOV.  That forces multiple IOVs to be running
0016 # concurrently. Further the delay decreases as we move
0017 # forward so the data gets are not occurring in the same
0018 # order as the lumis are being input. The purpose of
0019 # all this is to test that CondDBESSource and the
0020 # EventSetup system can process IOVs concurrently
0021 # and deliver the same data objects as when processing
0022 # one IOV at a time.
0023 
0024 import FWCore.ParameterSet.Config as cms
0025 
0026 process = cms.Process("TEST")
0027 
0028 #process.Tracer = cms.Service("Tracer")
0029 
0030 process.options = dict(
0031     numberOfThreads = 4,
0032     numberOfStreams = 4,
0033     numberOfConcurrentRuns = 1,
0034     numberOfConcurrentLuminosityBlocks = 4,
0035     eventSetup = dict(
0036         numberOfConcurrentIOVs = 4
0037     )
0038 )
0039 
0040 process.load("FWCore.MessageService.MessageLogger_cfi")
0041 process.MessageLogger = cms.Service("MessageLogger",
0042     destinations   = cms.untracked.vstring('TestConcurrentIOVsCondCoreCout','cout'),
0043     TestConcurrentIOVsCondCoreCout = cms.untracked.PSet(
0044         threshold = cms.untracked.string('WARNING')
0045     )
0046 )
0047 
0048 process.source = cms.Source("EmptySource",
0049     firstRun = cms.untracked.uint32(132598),
0050     firstLuminosityBlock = cms.untracked.uint32(1),
0051     firstEvent = cms.untracked.uint32(1),
0052     numberEventsInRun = cms.untracked.uint32(1000000),
0053     numberEventsInLuminosityBlock = cms.untracked.uint32(1)
0054 )
0055 
0056 process.maxEvents = cms.untracked.PSet(
0057   input = cms.untracked.int32(200)
0058 )
0059 
0060 process.GlobalTag = cms.ESSource("PoolDBESSource",
0061     DBParameters = cms.PSet(
0062         authenticationPath = cms.untracked.string(''),
0063         authenticationSystem = cms.untracked.int32(0),
0064         messageLevel = cms.untracked.int32(0),
0065         security = cms.untracked.string('')
0066     ),
0067     DumpStat = cms.untracked.bool(False),
0068     ReconnectEachRun = cms.untracked.bool(False),
0069     RefreshAlways = cms.untracked.bool(False),
0070     RefreshEachRun = cms.untracked.bool(False),
0071     RefreshOpenIOVs = cms.untracked.bool(False),
0072     connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'),
0073     globaltag = cms.string(''),
0074     pfnPostfix = cms.untracked.string(''),
0075     pfnPrefix = cms.untracked.string(''),
0076     snapshotTime = cms.string('2020-10-10 00:00:00.000'),
0077     toGet = cms.VPSet(cms.VPSet(cms.PSet(record = cms.string("BeamSpotObjectsRcd"),
0078                                          tag = cms.string("BeamSpotObjects_2017UL_LumiBased_v2")
0079                                          ))
0080     )
0081 )
0082 
0083 process.test = cms.EDAnalyzer("TestConcurrentIOVsCondCore")
0084 
0085 process.p = cms.Path(process.test)