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