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 
0004 process = cms.Process("READ")
0005 
0006 process.source = cms.Source("DQMRootSource",
0007                             reScope = cms.untracked.string(""),
0008                             fileNames = cms.untracked.vstring("file:dqm_file1.root","file:dqm_file3.root"))
0009 
0010 seq = cms.untracked.VEventID()
0011 for r in [1,2]:
0012     #begin run
0013     seq.append(cms.EventID(r,0,0))
0014     for l in range(1,11):
0015         #begin lumi
0016         seq.append(cms.EventID(r,l,0))
0017         #end lumi
0018         seq.append(cms.EventID(r,l,0))
0019     #end run
0020     seq.append(cms.EventID(r,0,0))
0021 
0022 process.check = cms.EDAnalyzer("RunLumiEventChecker",
0023                                eventSequence = seq)
0024 
0025 readRunElements = list()
0026 for i in range(0,10):
0027  readRunElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0028                                            runs  = cms.untracked.vint32([1, 2]),
0029                                            lumis = cms.untracked.vint32([0, 0]),
0030                                            means = cms.untracked.vdouble([i, i+1]),
0031                                            entries=cms.untracked.vdouble([1, 1])
0032  ))
0033 
0034 readLumiElements=list()
0035 for i in range(0,10):
0036  readLumiElements.append(cms.untracked.PSet(name=cms.untracked.string("Foo"+str(i)),
0037                                            runs  = cms.untracked.vint32([1 for x in range(0,10)] + [2 for x in range(0,10)]),
0038                                            lumis = cms.untracked.vint32([x+1 for x in range(0,10)] + [x+1 for x in range(0,10)]),
0039                                            #file3 has means shifted by 1
0040                                            means = cms.untracked.vdouble([i for x in range(0,10)] + [i+1 for x in range(0,10)]),
0041                                            entries=cms.untracked.vdouble([1 for x in range(0,20)])
0042  ))
0043 
0044 process.reader = cms.EDAnalyzer("DummyReadDQMStore",
0045                                 runElements = cms.untracked.VPSet(*readRunElements),
0046                                 lumiElements = cms.untracked.VPSet(*readLumiElements) )
0047 
0048 process.e = cms.EndPath(process.check+process.reader)
0049 
0050 process.add_(cms.Service("DQMStore"))
0051 #process.add_(cms.Service("Tracer"))
0052