Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:49

0001 # Configuration file for EmptySource
0002 
0003 from builtins import range
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process("TEST")
0007 
0008 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0009 
0010 process.maxEvents = cms.untracked.PSet(
0011     input = cms.untracked.int32(20)
0012 )
0013 
0014 process.source = cms.Source("EmptySource",
0015     firstRun = cms.untracked.uint32(100),
0016     numberEventsInRun = cms.untracked.uint32(5),
0017     firstTime = cms.untracked.uint64(1000),
0018     timeBetweenEvents = cms.untracked.uint64(10)
0019 )
0020 
0021 ids = cms.VEventID()
0022 numberOfEventsInRun = 0
0023 numberOfEventsPerRun = process.source.numberEventsInRun.value()
0024 run = process.source.firstRun.value()
0025 event=0
0026 for i in range(process.maxEvents.input.value()):
0027    numberOfEventsInRun +=1
0028    event += 1
0029    if numberOfEventsInRun > numberOfEventsPerRun:
0030       numberOfEventsInRun=1
0031       run += 1
0032       event = 1
0033    ids.append(cms.EventID(run,event))
0034 process.check = cms.EDAnalyzer("EventIDChecker", eventSequence = cms.untracked(ids))
0035 process.print1 = cms.OutputModule("AsciiOutputModule")
0036 
0037 process.p = cms.EndPath(process.check+process.print1)