Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:42

0001 
0002 # This configuration is designed to be run as the last
0003 # in a series of cmsRun processes.
0004 
0005 # Tests the maxLuminosityBlocks parameter
0006 
0007 # checks to see that the process level fakeRaw overrides the file based one
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 
0011 process = cms.Process("PROD2TEST")
0012 
0013 process.maxLuminosityBlocks = cms.untracked.PSet(
0014   input = cms.untracked.int32(3)
0015 )
0016 
0017 process.load("FWCore.MessageService.MessageLogger_cfi")
0018 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0019 
0020 import FWCore.Framework.test.cmsExceptionsFatalOption_cff
0021 process.options = cms.untracked.PSet(
0022     Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
0023 )
0024 
0025 
0026 process.source = cms.Source("PoolSource",
0027   fileNames = cms.untracked.vstring('file:testSeriesOfProcessesTEST.root'),
0028 )
0029 
0030 # Override the fakeRaw found in the test file
0031 process.fakeRaw = cms.EDProducer(
0032   "IntProducer",
0033   ivalue = cms.int32(20)
0034 )
0035 
0036 
0037 # This module tests to see if the products put in at the first step
0038 # (the fake HLT step) survived through to the last file.  At the PROD
0039 # stage the products were split into two files so this test secondary
0040 # file input.
0041 process.a = cms.EDAnalyzer("TestFindProduct",
0042   inputTags = cms.untracked.VInputTag( cms.InputTag("fakeRaw"),
0043                                        cms.InputTag("fakeHLTDebug") ),
0044 
0045   # Test the maxLuminosityBlock parameter
0046   # 3 luminosity blocks contain 15 events
0047   # Each event contains one product with a value of 20 and
0048   # one product with a value of 1000
0049   # If the maxLuminosityBlock parameter is working correctly the
0050   # following should be the sum of all the values.
0051   # The product values are hard coded into the fake
0052   # HLT configuration (the first one in this series).
0053   expectedSum = cms.untracked.int32(15300)
0054 )
0055 
0056 process.t = cms.Task(process.fakeRaw)
0057 
0058 process.test1 = cms.Path(process.a, process.t)
0059 
0060 process.out = cms.OutputModule("PoolOutputModule",
0061   fileName = cms.untracked.string('testSeriesOfProcessesPROD2TEST_u.root'),
0062   outputCommands = cms.untracked.vstring(
0063     "keep *_fakeRaw_*_*"
0064   )
0065 )
0066 process.o = cms.EndPath(process.out)