Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # A test of the noRunLumiSort configuration parameter
0002 # where the input has non-contiguous event sequences
0003 # from the same run. This configuration reads a file
0004 # created using that parameter and checks that the
0005 # run product and lumi product merging that occurred
0006 # was done properly.
0007 
0008 # It is expected there are 8 warnings that
0009 # print out while this runs related to merging.
0010 # The test should pass with these warnings.
0011 
0012 import FWCore.ParameterSet.Config as cms
0013 
0014 process = cms.Process("TEST")
0015 
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring(
0018         'file:testRunMergeNoRunLumiSort.root'
0019     ),
0020     duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
0021 )
0022 
0023 process.test = cms.EDAnalyzer("TestMergeResults",
0024                             
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 = cms.untracked.vint32(
0038         0,   60012,  10003,
0039         0,   20004,  10003
0040     ),
0041                             
0042     expectedEndRunProd = cms.untracked.vint32(
0043         0, 600012, 100003,
0044         0, 200004, 100003
0045     ),
0046 
0047     expectedBeginLumiProd = cms.untracked.vint32(
0048         0,       612,    103,
0049         0,       204,    103
0050     ),
0051 
0052     expectedEndLumiProd = cms.untracked.vint32(
0053         0,     6012,   1003,
0054         0,     2004,   1003
0055     ),
0056 
0057     expectedBeginRunNew = cms.untracked.vint32(
0058         10001,   40008,  10003,
0059         10001,   20004,  10003
0060     ),
0061 
0062     expectedEndRunNew = cms.untracked.vint32(
0063         100001, 400008, 100003,
0064         100001, 200004, 100003
0065     ),
0066 
0067     expectedBeginLumiNew = cms.untracked.vint32(
0068         101,       408,    103,
0069         101,       204,    103
0070     ),
0071 
0072     expectedEndLumiNew = cms.untracked.vint32(
0073         1001,     4008,   1003,
0074         1001,     2004,   1003
0075     )
0076 )
0077 
0078 process.test2 = cms.EDAnalyzer('RunLumiEventAnalyzer',
0079     verbose = cms.untracked.bool(True),
0080     expectedRunLumiEvents = cms.untracked.vuint32(
0081 1, 0, 0,
0082 1, 1, 0,
0083 1, 1, 11,
0084 1, 1, 12,
0085 1, 1, 13,
0086 1, 1, 14,
0087 1, 1, 15,
0088 1, 1, 16,
0089 1, 1, 17,
0090 1, 1, 18,
0091 1, 1, 19,
0092 1, 1, 20,
0093 1, 1, 21,
0094 1, 1, 22,
0095 1, 1, 23,
0096 1, 1, 24,
0097 1, 1, 25,
0098 1, 1, 1,
0099 1, 1, 2,
0100 1, 1, 3,
0101 1, 1, 4,
0102 1, 1, 5,
0103 1, 1, 6,
0104 1, 1, 7,
0105 1, 1, 8,
0106 1, 1, 9,
0107 1, 1, 10,
0108 1, 1, 11,
0109 1, 1, 12,
0110 1, 1, 13,
0111 1, 1, 14,
0112 1, 1, 15,
0113 1, 1, 16,
0114 1, 1, 17,
0115 1, 1, 18,
0116 1, 1, 19,
0117 1, 1, 20,
0118 1, 1, 21,
0119 1, 1, 22,
0120 1, 1, 23,
0121 1, 1, 24,
0122 1, 1, 25,
0123 1, 1, 1,
0124 1, 1, 2,
0125 1, 1, 3,
0126 1, 1, 4,
0127 1, 1, 5,
0128 1, 1, 6,
0129 1, 1, 7,
0130 1, 1, 8,
0131 1, 1, 9,
0132 1, 1, 10,
0133 1, 1, 0,
0134 1, 0, 0
0135 )
0136 )
0137 process.test2.expectedRunLumiEvents.extend([
0138 2, 0, 0,
0139 2, 1, 0,
0140 2, 1, 1,
0141 2, 1, 2,
0142 2, 1, 3,
0143 2, 1, 4,
0144 2, 1, 5,
0145 2, 1, 1,
0146 2, 1, 2,
0147 2, 1, 3,
0148 2, 1, 4,
0149 2, 1, 5,
0150 2, 1, 0,
0151 2, 0, 0
0152 ])
0153 
0154 process.out = cms.OutputModule("PoolOutputModule",
0155     fileName = cms.untracked.string('testRunMergeTEST6.root')
0156 )
0157 
0158 process.path1 = cms.Path(process.test * process.test2)
0159 process.e = cms.EndPath(process.out)