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(1),
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 process.filler = cms.EDProducer("DummyFillDQMStore",
0020                                 elements=cms.untracked.VPSet(*elements),
0021                                 fillRuns = cms.untracked.bool(True),
0022                                 fillLumis = cms.untracked.bool(True))
0023 
0024 process.out = cms.OutputModule("DQMRootOutputModule",
0025                                fileName = cms.untracked.string("dqm_file1.root"))
0026 
0027 readRunElements = list()
0028 for i in range(0,10):
0029     readRunElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0030                                               runs  = cms.untracked.vint32(1),
0031                                               lumis = cms.untracked.vint32(0),
0032                                               means = cms.untracked.vdouble(i),
0033                                               entries=cms.untracked.vdouble(1)
0034     ))
0035 
0036 readLumiElements=list()
0037 for i in range(0,10):
0038     readLumiElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0039                                               runs  =  cms.untracked.vint32([1 for x in range(0,10)]),
0040                                               lumis =  cms.untracked.vint32([x+1 for x in range(0,10)]),
0041                                               means = cms.untracked.vdouble([i for x in range(0,10)]),
0042                                               entries=cms.untracked.vdouble([1 for x in range(0,10)])
0043     ))
0044 
0045 process.reader = cms.EDAnalyzer("DummyReadDQMStore",
0046                                 runElements = cms.untracked.VPSet(*readRunElements),
0047                                 lumiElements = cms.untracked.VPSet(*readLumiElements) )
0048 
0049 process.p = cms.Path(process.filler)
0050 
0051 process.o = cms.EndPath(process.out+process.reader)
0052 
0053 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
0054 
0055 process.add_(cms.Service("DQMStore"))
0056