Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 # This configuration is designed to be run as the third
0003 # in a series of cmsRun processes.  Several things get
0004 # tested.
0005 
0006 # For event selection tests
0007 #   path1 even pass
0008 #   path2 1:40 pass
0009 
0010 # Checks the path names returned by the TriggerNames
0011 # service.
0012 
0013 # We read both files previously written and test that
0014 # the secondary input file feature of the PoolSource
0015 # works even in the case when the products went through
0016 # a streamer file.
0017 
0018 # The SewerModule OutputModule's test the SelectEvents
0019 # feature.  If the expected number of events does not
0020 # pass the selection, they abort with an error message.
0021 
0022 # We also test that the lookup of processing history information
0023 # works.
0024 
0025 import FWCore.ParameterSet.Config as cms
0026 
0027 process = cms.Process("TEST")
0028 
0029 process.load("FWCore.MessageService.MessageLogger_cfi")
0030 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0031 
0032 import FWCore.Framework.test.cmsExceptionsFatalOption_cff
0033 process.options = cms.untracked.PSet(
0034 #  wantSummary = cms.untracked.bool(True),
0035   Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
0036 )
0037 
0038 process.source = cms.Source("PoolSource",
0039   fileNames = cms.untracked.vstring('file:testSeriesOfProcessesPROD2.root'),
0040   secondaryFileNames = cms.untracked.vstring('file:testSeriesOfProcessesPROD1.root')
0041 )
0042 
0043 process.f1 = cms.EDFilter("TestFilterModule",
0044   acceptValue = cms.untracked.int32(2),
0045   onlyOne = cms.untracked.bool(True)
0046 )
0047 
0048 process.f2 = cms.EDFilter("TestFilterModule",
0049   acceptValue = cms.untracked.int32(40),
0050   onlyOne = cms.untracked.bool(False)
0051 )
0052 
0053 process.a = cms.EDAnalyzer("TestTriggerNames",
0054   trigPathsPrevious = cms.untracked.vstring('p1', 'p2'),
0055   trigPaths = cms.untracked.vstring(
0056     'path1', 
0057     'path2', 
0058     'path3', 
0059     'path4', 
0060     'path5', 
0061     'path6', 
0062     'path7', 
0063     'path8'),
0064   dumpPSetRegistry = cms.untracked.bool(False),
0065   expectedTriggerResultsHLT = cms.untracked.vuint32(
0066     0, 0, 0, 0, 0,
0067     0, 0, 0, 0, 0,
0068     0, 0, 0, 0, 0,
0069     0, 0, 0, 0, 0,
0070     1, 1, 1, 1, 1,
0071     1, 1, 1, 1, 1,
0072     0, 0, 0, 0, 0,
0073     0, 0, 0, 0, 0
0074   ),
0075   expectedTriggerResultsPROD = cms.untracked.vuint32(
0076     1, 1, 1, 1, 1,
0077     1, 1, 1, 1, 1,
0078     1, 1, 1, 1, 1,
0079     1, 1, 1, 1, 1,
0080     1, 1, 1, 1, 1,
0081     0, 0, 0, 0, 0,
0082     0, 0, 0, 0, 0,
0083     0, 0, 0, 0, 0
0084   )
0085 )
0086 
0087 process.out1 = cms.OutputModule("SewerModule",
0088   shouldPass = cms.int32(60),
0089   name = cms.string('out1'),
0090   SelectEvents = cms.untracked.PSet(
0091     SelectEvents = cms.vstring('p02:HLT', 
0092       ' p03    :       HLT', 
0093       'p2:PROD', 
0094       'path1:TEST')
0095   )
0096 )
0097 
0098 process.out2 = cms.OutputModule("SewerModule",
0099   shouldPass = cms.int32(98),
0100   name = cms.string('out2'),
0101   SelectEvents = cms.untracked.PSet(
0102     SelectEvents = cms.vstring('*:HLT')
0103   )
0104 )
0105 
0106 process.out3 = cms.OutputModule("SewerModule",
0107   shouldPass = cms.int32(64),
0108   name = cms.string('out3'),
0109   SelectEvents = cms.untracked.PSet(
0110     SelectEvents = cms.vstring('!*:PROD')
0111   )
0112 )
0113 
0114 process.out4 = cms.OutputModule("PoolOutputModule",
0115   fileName = cms.untracked.string('testSeriesOfProcessesTEST.root'),
0116 )
0117 
0118 process.path1 = cms.Path(process.f1)
0119 process.path2 = cms.Path(process.f2)
0120 process.path3 = cms.Path(process.f1)
0121 process.path4 = cms.Path(process.f2)
0122 process.path5 = cms.Path(process.f1)
0123 process.path6 = cms.Path(process.f2)
0124 process.path7 = cms.Path(process.f1)
0125 process.path8 = cms.Path(process.f2)
0126 
0127 process.e = cms.EndPath(process.a+process.out1+process.out2+process.out3+process.out4)