Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 from builtins import range
0002 import FWCore.ParameterSet.Config as cms
0003 process =cms.Process("TEST")
0004 
0005 process.source = cms.Source("EmptySource", numberEventsInRun = cms.untracked.uint32(100),
0006                             firstLuminosityBlock = cms.untracked.uint32(100),
0007                             firstEvent = cms.untracked.uint32(1),
0008                             numberEventsInLuminosityBlock = cms.untracked.uint32(1))
0009 
0010 elements = list()
0011 for i in range(0,10):
0012     elements.append(cms.untracked.PSet(lowX=cms.untracked.double(0),
0013                                        highX=cms.untracked.double(11),
0014                                        nchX=cms.untracked.int32(11),
0015                                        name=cms.untracked.string("Foo"+str(i)),
0016                                        title=cms.untracked.string("Foo"+str(i)),
0017                                        value=cms.untracked.double(i)))
0018 
0019 # A dummy tracked parameter is added to force the ProcessHistoryID to be different
0020 # It serves no other purpose.
0021 process.filler = cms.EDProducer("DummyFillDQMStore",
0022                                 elements=cms.untracked.VPSet(*elements),
0023                                 fillRuns = cms.untracked.bool(True),
0024                                 fillLumis = cms.untracked.bool(True),
0025                                 dummy = cms.bool(True))
0026 
0027 process.out = cms.OutputModule("DQMRootOutputModule",
0028                                fileName = cms.untracked.string("dqm_file4.root"))
0029 
0030 readRunElements = list()
0031 for i in range(0,10):
0032     readRunElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0033                                               runs  = cms.untracked.vint32(1),
0034                                               lumis = cms.untracked.vint32(0),
0035                                               means = cms.untracked.vdouble(i),
0036                                               entries=cms.untracked.vdouble(1)
0037     ))
0038 
0039 readLumiElements=list()
0040 for i in range(0,10):
0041     readLumiElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0042                                               runs  = cms.untracked.vint32([1 for x in range(0,10)]),
0043                                               lumis = cms.untracked.vint32([x+100 for x in range(0,10)]),
0044                                               means = cms.untracked.vdouble([i for x in range(0,10)]),
0045                                               entries=cms.untracked.vdouble([1 for x in range(0,10)])
0046     ))
0047 
0048 process.reader = cms.EDAnalyzer("DummyReadDQMStore",
0049                                 runElements = cms.untracked.VPSet(*readRunElements),
0050                                 lumiElements = cms.untracked.VPSet(*readLumiElements) )
0051 
0052 process.p = cms.Path(process.filler)
0053 
0054 process.o = cms.EndPath(process.out+process.reader)
0055 
0056 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
0057 
0058 process.add_(cms.Service("DQMStore"))
0059