File indexing completed on 2025-02-26 04:25:18
0001 import FWCore.ParameterSet.Config as cms
0002
0003 process = cms.Process("TEST")
0004
0005 process.MessageLogger.cerr.INFO.limit = 10000000
0006
0007 process.options.numberOfThreads = 4
0008 process.options.numberOfStreams = 4
0009
0010 process.source = cms.Source("EmptySource")
0011 process.maxEvents.input = 10
0012
0013
0014 intValue = 42
0015
0016 process.produceInt = cms.EDProducer("edmtest::GlobalIntProducer",
0017 value = cms.int32(intValue)
0018 )
0019
0020 process.validateInt = cms.EDAnalyzer("edmtest::GlobalIntAnalyzer",
0021 source = cms.InputTag("produceInt"),
0022 expected = cms.int32(intValue)
0023 )
0024
0025 process.taskInt = cms.Task(process.produceInt)
0026
0027 process.pathInt = cms.Path(process.validateInt, process.taskInt)
0028
0029
0030 floatValue = 3.14159
0031
0032 process.produceFloat = cms.EDProducer("edmtest::GlobalFloatProducer",
0033 value = cms.double(floatValue)
0034 )
0035
0036 process.validateFloat = cms.EDAnalyzer("edmtest::GlobalFloatAnalyzer",
0037 source = cms.InputTag("produceFloat"),
0038 expected = cms.double(floatValue)
0039 )
0040
0041 process.taskFloat = cms.Task(process.produceFloat)
0042
0043 process.pathFloat = cms.Path(process.validateFloat, process.taskFloat)
0044
0045
0046 stringValue = "Hello world"
0047
0048 process.produceString = cms.EDProducer("edmtest::GlobalStringProducer",
0049 value = cms.string(stringValue)
0050 )
0051
0052 process.validateString = cms.EDAnalyzer("edmtest::GlobalStringAnalyzer",
0053 source = cms.InputTag("produceString"),
0054 expected = cms.string(stringValue)
0055 )
0056
0057 process.taskString = cms.Task(process.produceString)
0058
0059 process.pathString = cms.Path(process.validateString, process.taskString)
0060
0061
0062 import random
0063 random.seed()
0064 doubleValues = [ random.uniform(-10., 10.) for i in range(10) ]
0065
0066 process.produceVector = cms.EDProducer("edmtest::GlobalVectorProducer",
0067 values = cms.vdouble(doubleValues)
0068 )
0069
0070 process.validateVector = cms.EDAnalyzer("edmtest::GlobalVectorAnalyzer",
0071 source = cms.InputTag("produceVector"),
0072 expected = cms.vdouble(doubleValues)
0073 )
0074
0075 process.taskVector = cms.Task(process.produceVector)
0076
0077 process.pathVector = cms.Path(process.validateVector, process.taskVector)