File indexing completed on 2025-01-14 02:38:52
0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003
0004 process = cms.Process("READMERGE")
0005
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0008 process.MessageLogger.cerr.threshold = cms.untracked.string('ERROR')
0009
0010 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0011
0012 from IOPool.TFileAdaptor.modules import AdaptorConfig
0013 process.add_(AdaptorConfig(stats = False))
0014
0015 process.maxEvents.input = -1
0016
0017 from IOPool.Output.modules import PoolOutputModule
0018 process.output = PoolOutputModule(fileName = 'reduced_test.root')
0019
0020 from FWCore.Framework.modules import TestMergeResults, RunLumiEventAnalyzer
0021 process.testmerge = TestMergeResults(
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 expectedBeginRunNew = [
0035 10001, 20004, 10003,
0036 10001, 20004, 10003,
0037 10001, 20004, 10003,
0038 10001, 20004, 10003,
0039 10001, 20004, 10003,
0040 10001, 20004, 10003,
0041 10001, 20004, 10003,
0042 10001, 20004, 10003,
0043 10001, 20004, 10003,
0044 10001, 20004, 10003,
0045 10001, 20004, 10003,
0046 10001, 20004, 10003,
0047 10001, 20004, 10003
0048 ],
0049
0050 expectedEndRunNew = [
0051 100001, 200004, 100003,
0052 100001, 200004, 100003,
0053 100001, 200004, 100003,
0054 100001, 200004, 100003,
0055 100001, 200004, 100003,
0056 100001, 200004, 100003,
0057 100001, 200004, 100003,
0058 100001, 200004, 100003,
0059 100001, 200004, 100003,
0060 100001, 200004, 100003,
0061 100001, 200004, 100003,
0062 100001, 200004, 100003,
0063 100001, 200004, 100003
0064 ],
0065
0066 expectedBeginLumiNew = [
0067 101, 204, 103
0068
0069 ],
0070
0071 expectedEndLumiNew = [
0072 1001, 2004, 1003,
0073 ],
0074
0075 verbose = True
0076 )
0077
0078 from IOPool.Input.modules import PoolSource
0079 process.source = PoolSource(fileNames = f"file:{sys.argv[1]}")
0080
0081 process.test = RunLumiEventAnalyzer(
0082 verbose = True,
0083 expectedRunLumiEvents = [
0084 100, 0, 0,
0085 100, 100, 0,
0086 100, 100, 100,
0087 100, 100, 0,
0088 100, 0, 0,
0089 1, 0, 0,
0090 1, 1, 0,
0091 1, 1, 11,
0092 1, 1, 12,
0093 1, 1, 13,
0094 1, 1, 14,
0095 1, 1, 15,
0096 1, 1, 16,
0097 1, 1, 17,
0098 1, 1, 18,
0099 1, 1, 19,
0100 1, 1, 20,
0101 1, 1, 102,
0102 1, 1, 0,
0103 1, 0, 0,
0104 1, 0, 0,
0105 1, 1, 0,
0106 1, 1, 21,
0107 1, 1, 22,
0108 1, 1, 23,
0109 1, 1, 24,
0110 1, 1, 25,
0111 1, 1, 1,
0112 1, 1, 2,
0113 1, 1, 3,
0114 1, 1, 4,
0115 1, 1, 5,
0116 1, 1, 6,
0117 1, 1, 7,
0118 1, 1, 8,
0119 1, 1, 9,
0120 1, 1, 10,
0121 1, 1, 0,
0122 1, 2, 0,
0123 1, 2, 0,
0124 1, 0, 0,
0125 2, 0, 0,
0126 2, 1, 0,
0127 2, 1, 1,
0128 2, 1, 2,
0129 2, 1, 3,
0130 2, 1, 4,
0131 2, 1, 5,
0132 2, 1, 0,
0133 2, 0, 0
0134 ]
0135 )
0136
0137 process.test.expectedRunLumiEvents.extend([
0138 11, 0, 0,
0139 11, 1, 0,
0140 11, 1, 1,
0141 11, 1, 0,
0142 11, 2, 0,
0143 11, 2, 1,
0144 11, 2, 2,
0145 11, 2, 3,
0146 11, 2, 0,
0147 11, 3, 0,
0148 11, 3, 4,
0149 11, 3, 5,
0150 11, 3, 6,
0151 11, 3, 0,
0152 11, 4, 0,
0153 11, 4, 7,
0154 11, 4, 8,
0155 11, 4, 9,
0156 11, 4, 0,
0157 11, 0, 0,
0158 12, 0, 0,
0159 12, 2, 0,
0160 12, 2, 1,
0161 12, 2, 2,
0162 12, 2, 3,
0163 12, 2, 0,
0164 12, 3, 0,
0165 12, 3, 4,
0166 12, 3, 5,
0167 12, 3, 6,
0168 12, 3, 0,
0169 12, 4, 0,
0170 12, 4, 7,
0171 12, 4, 8,
0172 12, 4, 9,
0173 12, 4, 0,
0174 12, 0, 0,
0175 13, 0, 0,
0176 13, 2, 0,
0177 13, 2, 1,
0178 13, 2, 2,
0179 13, 2, 0,
0180 13, 0, 0,
0181 1000, 0, 0,
0182 1000, 1, 0,
0183 1000, 1, 0,
0184 1000, 0, 0,
0185 1001, 0, 0,
0186 1001, 1, 0,
0187 1001, 1, 0,
0188 1001, 0, 0,
0189 1002, 0, 0,
0190 1002, 1, 0,
0191 1002, 1, 0,
0192 1002, 0, 0,
0193
0194
0195
0196 2000, 0, 0,
0197 2000, 0, 0,
0198 2001, 0, 0,
0199 2001, 0, 0,
0200 2002, 0, 0,
0201 2002, 0, 0
0202 ])
0203
0204 process.path1 = cms.Path(process.test*process.testmerge)
0205
0206 process.ep = cms.EndPath(process.output)