Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:14

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