Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-14 02:38:45

0001 #
0002 # Test the most standard case where we read the same run
0003 #  from different files but each file has its own lumi blocks
0004 #
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 process = cms.Process("TEST")
0009 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0010 process.MessageLogger.cerr.threshold = 'ERROR'
0011 
0012 import FWCore.Framework.test.cmsExceptionsFatalOption_cff
0013 process.options = cms.untracked.PSet(
0014   fileMode  = cms.untracked.string('FULLMERGE'),
0015   Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
0016 )
0017 
0018 process.maxEvents.input = 10
0019 
0020 from IOPool.Input.modules import PoolSource
0021 process.source = PoolSource(fileNames = ['file:testRunMerge4.root', 'file:testRunMerge6.root'])
0022 
0023 from FWCore.Framework.modules import TestMergeResults, RunLumiEventAnalyzer
0024 process.test = TestMergeResults(
0025     #   Check to see that the value we read matches what we know
0026     #   was written. Expected values listed below come in sets of three
0027     #      value expected in Thing
0028     #      value expected in ThingWithMerge
0029     #      value expected in ThingWithIsEqual
0030     #   Each set of 3 is tested at endRun for the expected
0031     #   run values or at endLuminosityBlock for the expected
0032     #   lumi values. And then the next set of three values
0033     #   is tested at the next endRun or endLuminosityBlock.
0034     #   When the sequence of parameter values is exhausted it stops checking
0035     #   0's are just placeholders, if the value is a "0" the check is not made.
0036 
0037     expectedBeginRunProd = [
0038         10001,   20004,  10003  # end run 11
0039     ],
0040 
0041     expectedEndRunProd = [
0042         100001,   200004,  100003  #end run 11
0043     ],
0044 
0045     expectedBeginLumiProd = [
0046         101,       102,    103,  # end run 11 lumi 1
0047         101,       102,    103,  # end run 11 lumi 2
0048         101,       102,    103   # end run 11 lumi 3
0049     ],
0050 
0051     expectedEndLumiProd = [
0052          1001,       1002,    1003,  # end run 11 lumi 1
0053          1001,       1002,    1003,  # end run 11 lumi 2
0054          1001,       1002,    1003   # end run 11 lumi 3
0055     ],
0056 
0057     verbose = False
0058 )
0059 
0060 process.test2 = RunLumiEventAnalyzer(
0061     verbose = True,
0062     expectedRunLumiEvents = [
0063 11, 0, 0,
0064 11, 1, 0,
0065 11, 1, 1,
0066 11, 1, 0,
0067 11, 2, 0,
0068 11, 2, 2,
0069 11, 2, 3,
0070 11, 2, 4,
0071 11, 2, 0,
0072 11, 3, 0,
0073 11, 3, 5,
0074 11, 3, 6,
0075 11, 3, 7,
0076 11, 3, 0,
0077 11, 4, 0,
0078 11, 4, 8,
0079 11, 4, 9,
0080 11, 4, 10,
0081 11, 4, 0,
0082 11, 0, 0
0083 ]
0084 )
0085 
0086 process.path1 = cms.Path(process.test + process.test2)
0087