Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:02:49

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0007 
0008 process.source = cms.Source("EmptySource")
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(7)
0011 )
0012 
0013 # The TestGetPathStatus analyzer tests that the PathStatus
0014 # and EndPathStatus can be read from the event and that
0015 # the PathStatus product contains the correct values.
0016 
0017 process.a1 = cms.EDAnalyzer("TestGetPathStatus",
0018     pathStatusTag = cms.InputTag("path1"),
0019     endPathStatusTag = cms.InputTag("endpath2"),
0020     # The index into these two vectors is the EventID.
0021     # The EventID starts at 1 so the first element is ignored.
0022     expectedStates = cms.vint32(0,2,2,2,2,2,1,2),
0023     expectedIndexes = cms.vuint32(0,1,2,1,2,1,2,1)
0024 )
0025 
0026 # Same test with an empty path and empty endpath
0027 
0028 process.a2 = cms.EDAnalyzer("TestGetPathStatus",
0029     pathStatusTag = cms.InputTag("path2"),
0030     endPathStatusTag = cms.InputTag("endpath3"),
0031     expectedStates = cms.vint32(0,1,1,1,1,1,1,1),
0032     expectedIndexes = cms.vuint32(0,0,0,0,0,0,0,0)
0033 )
0034 
0035 process.f1 = cms.EDFilter("ModuloEventIDFilter",
0036     modulo = cms.uint32(2),
0037     offset = cms.uint32(0)
0038 )
0039 
0040 process.f2 = cms.EDFilter("ModuloEventIDFilter",
0041     modulo = cms.uint32(3),
0042     offset = cms.uint32(0)
0043 )
0044 
0045 process.prod1 = cms.EDProducer("IntProducer", ivalue = cms.int32(1))
0046 
0047 process.out = cms.OutputModule("PoolOutputModule",
0048     fileName = cms.untracked.string('testPathStatus.root')
0049 )
0050 
0051 process.path1 = cms.Path(process.prod1 * process.f1 * process.f2)
0052 process.path2 = cms.Path()
0053 
0054 process.endpath1 = cms.EndPath(process.a1 * process.a2)
0055 process.endpath2 = cms.EndPath(process.out)
0056 process.endpath3 = cms.EndPath()