Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 # This is the same as testRunMergeTEST except the noEventSort
0003 # option is set in the PoolSource, which changes the order
0004 # events are processed.  Within a LuminosityBlock, they are
0005 # in entry order instead of event number order.  The RunLumiEventAnalyzer
0006 # module checks this.
0007 
0008 import FWCore.ParameterSet.Config as cms
0009 
0010 process = cms.Process("TEST")
0011 
0012 process.load("FWCore.MessageService.MessageLogger_cfi")
0013 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0014 process.MessageLogger.cerr.threshold = 'ERROR'
0015 
0016 import FWCore.Framework.test.cmsExceptionsFatalOption_cff
0017 process.options = cms.untracked.PSet(
0018   fileMode  = cms.untracked.string('FULLMERGE'),
0019   Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
0020 )
0021 
0022 
0023 process.source = cms.Source("PoolSource",
0024     fileNames = cms.untracked.vstring(
0025         'file:testRunMerge.root',
0026         'file:testRunMerge.root'
0027     ),
0028     secondaryFileNames = cms.untracked.vstring(
0029         'file:testRunMerge1.root', 
0030         'file:testRunMerge2.root', 
0031         'file:testRunMerge3.root',
0032         'file:testRunMerge4.root',
0033         'file:testRunMerge5.root'
0034 
0035     ),
0036     noEventSort = cms.untracked.bool(True)
0037     , duplicateCheckMode = cms.untracked.string('checkEachRealDataFile')
0038 )
0039 
0040 process.out = cms.OutputModule("PoolOutputModule",
0041     fileName = cms.untracked.string('file:testRunMergeRecombined1.root')
0042 )
0043 
0044 process.test = cms.EDAnalyzer("TestMergeResults",
0045 
0046     #   Check to see that the value we read matches what we know
0047     #   was written. Expected values listed below come in sets of three
0048     #      value expected in Thing
0049     #      value expected in ThingWithMerge
0050     #      value expected in ThingWithIsEqual
0051     #   Each set of 3 is tested at endRun for the expected
0052     #   run values or at endLuminosityBlock for the expected
0053     #   lumi values. And then the next set of three values
0054     #   is tested at the next endRun or endLuminosityBlock.
0055     #   When the sequence of parameter values is exhausted it stops checking
0056     #   0's are just placeholders, if the value is a "0" the check is not made.
0057 
0058     expectedBeginRunProd = cms.untracked.vint32(
0059         10001,   30006,  10003,  # end run 1
0060         10001,   10002,  10003,  # end run 2
0061         10001,   20004,  10003,  # end run 11
0062         10001,   30006,  10003,  # end run 1
0063         10001,   10002,  10003,  # end run 2
0064         10001,   20004,  10003   # end run 11
0065     ),
0066 
0067     expectedEndRunProd = cms.untracked.vint32(
0068         100001, 300006, 100003,  # end run 1
0069         100001, 100002, 100003,  # end run 2
0070         100001, 200004, 100003,  # end run 11
0071         100001, 300006, 100003,  # end run 1
0072         100001, 100002, 100003,  # end run 2
0073         100001, 200004, 100003   # end run 11
0074     ),
0075 
0076     expectedBeginLumiProd = cms.untracked.vint32(
0077         101,       306,    103,  # end run 1 lumi 1
0078         101,       102,    103,  # end run 2 lumi 1
0079         101,       102,    103,  # end run 11 lumi 1
0080         101,       102,    103,  # end run 11 lumi 2
0081         101,       306,    103,  # end run 1 lumi 1
0082         101,       102,    103,  # end run 2 lumi 1
0083         101,       102,    103,  # end run 11 lumi 1
0084         101,       102,    103   # end run 11 lumi 2
0085     ),
0086 
0087     expectedEndLumiProd = cms.untracked.vint32(
0088         1001,     3006,   1003,  # end run 1 lumi 1
0089         1001,     1002,   1003,  # end run 2 lumi 1
0090         1001,     1002,   1003,  # end run 11 lumi 1
0091         1001,     1002,   1003,  # end run 11 lumi 2
0092         1001,     3006,   1003,  # end run 1 lumi 1
0093         1001,     1002,   1003,  # end run 2 lumi 1
0094         1001,     1002,   1003,  # end run 11 lumi 1
0095         1001,     1002,   1003   # end run 11 lumi 2
0096     ),
0097 
0098     expectedBeginRunNew = cms.untracked.vint32(
0099         10001,   20004,  10003,  # end run 1
0100         10001,   10002,  10003,  # end run 2
0101         10001,   10002,  10003,  # end run 11
0102         10001,   20004,  10003,  # end run 1
0103         10001,   10002,  10003,  # end run 2
0104         10001,   10002,  10003   # end run 11
0105     ),
0106 
0107     expectedEndRunNew = cms.untracked.vint32(
0108         100001, 200004, 100003,  # end run 1
0109         100001, 100002, 100003,  # end run 2
0110         100001, 100002, 100003,  # end run 11
0111         100001, 200004, 100003,  # end run 1
0112         100001, 100002, 100003,  # end run 2
0113         100001, 100002, 100003   # end run 11
0114     ),
0115 
0116     expectedBeginLumiNew = cms.untracked.vint32(
0117         101,       204,    103,  # end run 1 lumi 1
0118         101,       102,    103,  # end run 2 lumi 1
0119         101,       102,    103,  # end run 11 lumi 1
0120         101,       102,    103,  # end run 11 lumi 2
0121         101,       204,    103,  # end run 1 lumi 1
0122         101,       102,    103,  # end run 2 lumi 1
0123         101,       102,    103,  # end run 11 lumi 1
0124         101,       102,    103   # end run 11 lumi 2
0125     ),
0126 
0127     expectedEndLumiNew = cms.untracked.vint32(
0128         1001,     2004,   1003,  # end run 1 lumi 1
0129         1001,     1002,   1003,  # end run 2 lumi 1
0130         1001,     1002,   1003,  # end run 11 lumi 1
0131         1001,     1002,   1003,  # end run 11 lumi 2
0132         1001,     2004,   1003,  # end run 1 lumi 1
0133         1001,     1002,   1003,  # end run 2 lumi 1
0134         1001,     1002,   1003,  # end run 11 lumi 1
0135         1001,     1002,   1003   # end run 11 lumi 2
0136     ),
0137 
0138     expectedDroppedEvent = cms.untracked.vint32(13, 10003, 100003, 103, 1003),
0139     verbose = cms.untracked.bool(False),
0140 
0141     expectedParents = cms.untracked.vstring(
0142         'm1', 'm1', 'm1', 'm1', 'm1',
0143         'm1', 'm1', 'm1', 'm1', 'm1',
0144         'm2', 'm2', 'm2', 'm2', 'm2',
0145         'm3', 'm3', 'm3', 'm3', 'm3',
0146         'm3', 'm3', 'm3', 'm3', 'm3',
0147         'm2', 'm2', 'm2', 'm2', 'm2',
0148         'm1', 'm1',
0149         'm1', 'm1', 'm1', 'm1', 'm1',
0150         'm1', 'm1', 'm1', 'm1', 'm1',
0151         'm2', 'm2', 'm2', 'm2', 'm2',
0152         'm3', 'm3', 'm3', 'm3', 'm3',
0153         'm3', 'm3', 'm3', 'm3', 'm3',
0154         'm2', 'm2', 'm2', 'm2', 'm2',
0155         'm1', 'm1'
0156    )
0157 )
0158 
0159 process.test2 = cms.EDAnalyzer('RunLumiEventAnalyzer',
0160     verbose = cms.untracked.bool(True),
0161     expectedRunLumiEvents = cms.untracked.vuint32(
0162 1, 0, 0,
0163 1, 1, 0,
0164 1, 1, 11,
0165 1, 1, 12,
0166 1, 1, 13,
0167 1, 1, 14,
0168 1, 1, 15,
0169 1, 1, 16,
0170 1, 1, 17,
0171 1, 1, 18,
0172 1, 1, 19,
0173 1, 1, 20,
0174 1, 1, 21,
0175 1, 1, 22,
0176 1, 1, 23,
0177 1, 1, 24,
0178 1, 1, 25,
0179 1, 1, 1,
0180 1, 1, 2,
0181 1, 1, 3,
0182 1, 1, 4,
0183 1, 1, 5,
0184 1, 1, 6,
0185 1, 1, 7,
0186 1, 1, 8,
0187 1, 1, 9,
0188 1, 1, 10,
0189 1, 1, 0,
0190 1, 0, 0,
0191 2, 0, 0,
0192 2, 1, 0,
0193 2, 1, 1,
0194 2, 1, 2,
0195 2, 1, 3,
0196 2, 1, 4,
0197 2, 1, 5,
0198 2, 1, 0,
0199 2, 0, 0,
0200 11, 0, 0,
0201 11, 1, 0,
0202 11, 1, 1,
0203 11, 1, 0,
0204 11, 2, 0,
0205 11, 2, 1,
0206 11, 2, 0,
0207 11, 0, 0,
0208 1, 0, 0,
0209 1, 1, 0,
0210 1, 1, 11,
0211 1, 1, 12,
0212 1, 1, 13,
0213 1, 1, 14,
0214 1, 1, 15,
0215 1, 1, 16,
0216 1, 1, 17,
0217 1, 1, 18,
0218 1, 1, 19,
0219 1, 1, 20,
0220 1, 1, 21,
0221 1, 1, 22,
0222 1, 1, 23,
0223 1, 1, 24,
0224 1, 1, 25,
0225 1, 1, 1,
0226 1, 1, 2,
0227 1, 1, 3,
0228 1, 1, 4,
0229 1, 1, 5,
0230 1, 1, 6,
0231 1, 1, 7,
0232 1, 1, 8,
0233 1, 1, 9,
0234 1, 1, 10,
0235 1, 1, 0,
0236 1, 0, 0,
0237 2, 0, 0,
0238 2, 1, 0,
0239 2, 1, 1,
0240 2, 1, 2,
0241 2, 1, 3,
0242 2, 1, 4,
0243 2, 1, 5,
0244 2, 1, 0,
0245 2, 0, 0
0246 )
0247 )
0248 
0249 process.path1 = cms.Path(process.test + process.test2)
0250 process.endpath1 = cms.EndPath(process.out)