Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0007 process.MessageLogger.cerr.threshold = 'ERROR'
0008 
0009 import FWCore.Framework.test.cmsExceptionsFatalOption_cff
0010 process.options = cms.untracked.PSet(
0011   fileMode  = cms.untracked.string('FULLMERGE'),
0012   Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
0013 )
0014 
0015 
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring(
0018         # CAUTION if you recreate the PROD files then you must recreate BOTH
0019         # of these files otherwise you will get exceptions because the GUIDs
0020         # used to check the match of the event in the secondary files will
0021         # not be the same.
0022         'file:testRunMergeMERGE2.root',
0023         'file:testRunMerge.root'
0024     ),
0025     secondaryFileNames = cms.untracked.vstring(
0026         'file:testRunMerge0.root', 
0027         'file:testRunMerge1.root', 
0028         'file:testRunMerge2.root', 
0029         'file:testRunMerge3.root',
0030         'file:testRunMerge4.root',
0031         'file:testRunMerge5.root'
0032     )
0033     , duplicateCheckMode = cms.untracked.string('checkEachRealDataFile')
0034     , noEventSort = cms.untracked.bool(True)
0035 )
0036 
0037 process.out = cms.OutputModule("PoolOutputModule",
0038     fileName = cms.untracked.string('file:testRunMergeRecombined2.root')
0039 )
0040 
0041 process.test = cms.EDAnalyzer("TestMergeResults",
0042 
0043     #   Check to see that the value we read matches what we know
0044     #   was written. Expected values listed below come in sets of three
0045     #      value expected in Thing
0046     #      value expected in ThingWithMerge
0047     #      value expected in ThingWithIsEqual
0048     #   Each set of 3 is tested at endRun for the expected
0049     #   run values or at endLuminosityBlock for the expected
0050     #   lumi values. And then the next set of three values
0051     #   is tested at the next endRun or endLuminosityBlock.
0052     #   When the sequence of parameter values is exhausted it stops checking
0053     #   0's are just placeholders, if the value is a "0" the check is not made.
0054 
0055     expectedBeginRunProd = cms.untracked.vint32(
0056     10001,   10002,  10003,  # end run 100
0057     10001,   10002,  10003,  # end run 1
0058     10001,   10002,  10003,  # end run 1
0059     10001,   10002,  10003,  # end run 2
0060     10001,   10002,  10004,  # end run 1
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,  100002, 100003,  # end run 100
0069         100001,  100002, 100003,  # end run 1
0070         100001,  100002, 100003,  # end run 1
0071         100001,  100002, 100003,  # end run 2
0072         100001,  100002, 100004,  # end run 1
0073         100001,  200004, 100003,  # end run 11
0074         100001,  300006, 100003,  # end run 1
0075         100001,  100002, 100003,  # end run 2
0076         100001,  200004, 100003   # end run 11
0077     ),
0078 
0079     expectedBeginLumiProd = cms.untracked.vint32(
0080         101,  102, 103,  # end run 100 lumi 100
0081         101,  102, 103,  # end run 1 lumi 1
0082         101,  102, 103,  # end run 1 lumi 1
0083         101,  102, 103,  # end run 2 lumi 1
0084         101,  102, 104,  # end run 1 lumi 1
0085         101,  102, 103,  # end run 11 lumi 1
0086         101,  102, 103,  # end run 11 lumi 2
0087         101,  306, 103,  # end run 1 lumi 1
0088         101,  102, 103,  # end run 2 lumi 1
0089         101,  102, 103,  # end run 11 lumi 1
0090         101,  102, 103   # end run 11 lumi 2
0091         
0092     ),
0093 
0094     expectedEndLumiProd = cms.untracked.vint32(
0095         1001,  1002, 1003,  # end run 100 lumi 100
0096         1001,  1002, 1003,  # end run 1 lumi 1
0097         1001,  1002, 1003,  # end run 1 lumi 1
0098         1001,  1002, 1003,  # end run 2 lumi 1
0099         1001,  1002, 1004,  # end run 1 lumi 1
0100         1001,  1002, 1003,  # end run 11 lumi 1
0101         1001,  1002, 1003,  # end run 11 lumi 2
0102         1001,  3006, 1003,  # end run 1 lumi 1
0103         1001,  1002, 1003,  # end run 2 lumi 1
0104         1001,  1002, 1003,  # end run 11 lumi 1
0105         1001,  1002, 1003   # end run 11 lumi 2
0106     ),
0107 
0108     expectedBeginRunNew = cms.untracked.vint32(
0109         10001,   10002,  10003,  # end run 100
0110         10001,   10002,  10003,  # end run 1
0111         10001,   10002,  10003,  # end run 1
0112         10001,   10002,  10003,  # end run 2
0113         10001,   10002,  10003,  # end run 1
0114         10001,   10002,  10003,  # end run 11
0115         10001,   20004,  10003,  # end run 1
0116         10001,   10002,  10003,  # end run 2
0117         10001,   10002,  10003   # end run 11
0118     ),
0119 
0120     expectedEndRunNew = cms.untracked.vint32(
0121         100001,  100002, 100003,  # end run 100
0122         100001,  100002, 100003,  # end run 1
0123         100001,  100002, 100003,  # end run 1
0124         100001,  100002, 100003,  # end run 2
0125         100001,  100002, 100003,  # end run 1
0126         100001,  100002, 100003,  # end run 11
0127         100001,  200004, 100003,  # end run 1
0128         100001,  100002, 100003,  # end run 2
0129         100001,  100002, 100003   # end run 11
0130     ),
0131 
0132     expectedBeginLumiNew = cms.untracked.vint32(
0133         101,  102, 103,  # end run 100 lumi 100
0134         101,  102, 103,  # end run 1 lumi 1
0135         101,  102, 103,  # end run 1 lumi 1
0136         101,  102, 103,  # end run 2 lumi 1
0137         101,  102, 103,  # end run 1 lumi 1
0138         101,  102, 103,  # end run 11 lumi 1
0139         101,  102, 103,  # end run 11 lumi 2
0140         101,  204, 103,  # end run 1 lumi 1
0141         101,  102, 103,  # end run 2 lumi 1
0142         101,  102, 103,  # end run 11 lumi 1
0143         101,  102, 103   # end run 11 lumi 2
0144     ),
0145 
0146     expectedEndLumiNew = cms.untracked.vint32(
0147         1001,  1002, 1003,  # end run 100 lumi 100
0148         1001,  1002, 1003,  # end run 1 lumi 1
0149         1001,  1002, 1003,  # end run 1 lumi 1
0150         1001,  1002, 1003,  # end run 2 lumi 1
0151         1001,  1002, 1003,  # end run 1 lumi 1
0152         1001,  1002, 1003,  # end run 11 lumi 1
0153         1001,  1002, 1003,  # end run 11 lumi 2
0154         1001,  2004, 1003,  # end run 1 lumi 1
0155         1001,  1002, 1003,  # end run 2 lumi 1
0156         1001,  1002, 1003,  # end run 11 lumi 1
0157         1001,  1002, 1003   # end run 11 lumi 2
0158     ),
0159 
0160     expectedDroppedEvent = cms.untracked.vint32(13, 10003, 100003, 103, 1003),
0161     verbose = cms.untracked.bool(True),
0162 
0163     expectedParents = cms.untracked.vstring(
0164     'm1', #(100,100,100)
0165     'm1', 'm1', 'm1', 'm1', 'm1',
0166     'm1', 'm1', 'm1', 'm1', 'm1',
0167     'm2', 'm2', 'm2', 'm2', 'm2',
0168     'm2', 'm2', 'm2', 'm2', 'm2',
0169     'm3', 'm3', 'm3', 'm3', 'm3',
0170     'm3', 'm3', 'm3', 'm3', 'm3',
0171     'm1', 'm1', #(11,...)
0172 
0173     'm1', 'm1', 'm1', 'm1', 'm1',
0174     'm1', 'm1', 'm1', 'm1', 'm1',
0175     'm2', 'm2', 'm2', 'm2', 'm2',
0176     'm3', 'm3', 'm3', 'm3', 'm3',
0177     'm3', 'm3', 'm3', 'm3', 'm3',
0178     'm2', 'm2', 'm2', 'm2', 'm2',
0179     'm1', 'm1'
0180 
0181    )
0182 )
0183 
0184 process.test2 = cms.EDAnalyzer('RunLumiEventAnalyzer',
0185     verbose = cms.untracked.bool(True),
0186     expectedRunLumiEvents = cms.untracked.vuint32(
0187     100, 0, 0,
0188     100, 100, 0,
0189     100, 100, 100,
0190     100, 100, 0,
0191     100, 0, 0,
0192     1, 0, 0,
0193     1, 1, 0,
0194     1, 1, 11,
0195     1, 1, 12,
0196     1, 1, 13,
0197     1, 1, 14,
0198     1, 1, 15,
0199     1, 1, 16,
0200     1, 1, 17,
0201     1, 1, 18,
0202     1, 1, 19,
0203     1, 1, 20,
0204     1, 1, 0,
0205     1, 0, 0,
0206     1, 0, 0, #new process history ID
0207     1, 1, 0,
0208     1, 1, 21,
0209     1, 1, 22,
0210     1, 1, 23,
0211     1, 1, 24,
0212     1, 1, 25,
0213     1, 1, 0,
0214     1, 0, 0,
0215     2, 0, 0,
0216     2, 1, 0,
0217     2, 1, 1,
0218     2, 1, 2,
0219     2, 1, 3,
0220     2, 1, 4,
0221     2, 1, 5,
0222     2, 1, 0,
0223     2, 0, 0,
0224     1, 0, 0,
0225     1, 1, 0,
0226     1, 1, 1,
0227     1, 1, 2,
0228     1, 1, 3,
0229     1, 1, 4,
0230     1, 1, 5,
0231     1, 1, 6,
0232     1, 1, 7,
0233     1, 1, 8,
0234     1, 1, 9,
0235     1, 1, 10,
0236     1, 1, 0,
0237     1, 0, 0,
0238     11, 0, 0,
0239     11, 1, 0,
0240     11, 1, 1,
0241     11, 1, 0,
0242     11, 2, 0,
0243     11, 2, 1,
0244     11, 2, 0,
0245     11, 0, 0
0246 )
0247 )
0248 process.test2.expectedRunLumiEvents.extend([
0249 1, 0, 0,
0250 1, 1, 0,
0251 1, 1, 11,
0252 1, 1, 12,
0253 1, 1, 13,
0254 1, 1, 14,
0255 1, 1, 15,
0256 1, 1, 16,
0257 1, 1, 17,
0258 1, 1, 18,
0259 1, 1, 19,
0260 1, 1, 20,
0261 1, 1, 21,
0262 1, 1, 22,
0263 1, 1, 23,
0264 1, 1, 24,
0265 1, 1, 25,
0266 1, 1, 1,
0267 1, 1, 2,
0268 1, 1, 3,
0269 1, 1, 4,
0270 1, 1, 5,
0271 1, 1, 6,
0272 1, 1, 7,
0273 1, 1, 8,
0274 1, 1, 9,
0275 1, 1, 10,
0276 1, 1, 0,
0277 1, 0, 0,
0278 2, 0, 0,
0279 2, 1, 0,
0280 2, 1, 1,
0281 2, 1, 2,
0282 2, 1, 3,
0283 2, 1, 4,
0284 2, 1, 5,
0285 2, 1, 0,
0286 2, 0, 0,
0287 11, 0, 0,
0288 11, 1, 0,
0289 11, 1, 1,
0290 11, 1, 0,
0291 11, 2, 0,
0292 11, 2, 1,
0293 11, 2, 0,
0294 11, 0, 0,
0295 ])
0296 
0297 process.path1 = cms.Path(process.test + process.test2)
0298 process.endpath1 = cms.EndPath(process.out)