Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:28

0001 # Test the ESProductHost class
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 process = cms.Process("TEST")
0006 
0007 process.maxEvents = cms.untracked.PSet(
0008     input = cms.untracked.int32(10)
0009 )
0010 
0011 # start a new run every event
0012 process.source = cms.Source("EmptySource",
0013     numberEventsInRun = cms.untracked.uint32(1)
0014 )
0015 
0016 # control when the event setup records get updated
0017 process.emptyESSourceB = cms.ESSource("EmptyESSource",
0018     recordName = cms.string("ESTestRecordB"),
0019     firstValid = cms.vuint32(1,2,3,4,5,6,7,8),
0020     iovIsRunNotTime = cms.bool(True)
0021 )
0022 
0023 process.emptyESSourceC = cms.ESSource("EmptyESSource",
0024     recordName = cms.string("ESTestRecordC"),
0025     firstValid = cms.vuint32(1,3,5),
0026     iovIsRunNotTime = cms.bool(True)
0027 )
0028 
0029 # This ESProducer uses the ESProductHost and
0030 # also tests it.
0031 process.esTestProducerBUsingHost = cms.ESProducer("ESTestProducerBUsingHost")
0032 
0033 # Read the values produced by the ESProducer and test
0034 # that they match expectations
0035 process.esTestAnalyzerB = cms.EDAnalyzer("ESTestAnalyzerB",
0036     runsToGetDataFor = cms.vint32(1,2,3,4,5,6,7,8,9,10),
0037     expectedValues = cms.untracked.vint32(1102,1103,1105,1106,1108,1109,1110,1111,1111,1111)
0038 )
0039 
0040 process.p = cms.Path(process.esTestAnalyzerB)