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_file2.root"))
0009 
0010 seq = cms.untracked.VEventID()
0011 for r in range(1,2):
0012     #begin run
0013     seq.append(cms.EventID(r,0,0))
0014     for l in range(1,21):
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),
0029                                             lumis = cms.untracked.vint32(0),
0030                                             means = cms.untracked.vdouble(i),
0031                                             entries=cms.untracked.vdouble(2)
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,20)]),
0038                                             lumis = cms.untracked.vint32([x+1 for x in range(0,20)]),
0039                                             means = cms.untracked.vdouble([i for x in range(0,20)]),
0040                                             entries=cms.untracked.vdouble([1 for x in range(0,20)])
0041   ))
0042 
0043 process.reader = cms.EDAnalyzer("DummyReadDQMStore",
0044                                  runElements = cms.untracked.VPSet(*readRunElements),
0045                                  lumiElements = cms.untracked.VPSet(*readLumiElements) )
0046 
0047 process.e = cms.EndPath(process.check+process.reader)
0048 
0049 process.add_(cms.Service("DQMStore"))
0050 #process.add_(cms.Service("Tracer"))
0051