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:testRunMerge.root',
0023         'file:testRunMergeMERGE2.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(False)
0035 )
0036 
0037 process.out = cms.OutputModule("PoolOutputModule",
0038     fileName = cms.untracked.string('file:testRunMergeRecombined.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,   30006,  10003,  # end run 1, merged run entries within a file
0057         10001,   10002,  10003,  # end run 2
0058         10001,   20004,  10003,  # end run 11
0059         10001,   10002,  10003,  # end run 1, second input file starts here
0060         10001,   20004,  10003,  # end run 11
0061         10001,   10002,  10003,  # end run 100
0062         10001,   10002,  10003,  # end run 1, not merged different ProcessHistoryID
0063         10001,   10002,  10003,  # end run 2
0064         10001,   10002,  10004   # end run 1
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,  100002, 100003,  # end run 1
0072         100001,  200004, 100003,  # end run 11
0073         100001,  100002, 100003,  # end run 100
0074         100001,  100002, 100003,  # end run 1
0075         100001,  100002, 100003,  # end run 2
0076         100001,  100002, 100004   # end run 1
0077     ),
0078 
0079     expectedBeginLumiProd = cms.untracked.vint32(
0080         101,  306, 103,  # end run 1 lumi 1
0081         101,  102, 103,  # end run 2 lumi 1
0082         101,  102, 103,  # end run 11 lumi 1
0083         101,  102, 103,  # end run 11 lumi 2
0084         101,  102, 103,  # 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,  102, 103,  # end run 100 lumi 100
0088         101,  102, 103,  # end run 1 lumi 1
0089         101,  102, 103,  # end run 2 lumi 1
0090         101,  102, 104   # end run 1 lumi 1
0091     ),
0092 
0093     expectedEndLumiProd = cms.untracked.vint32(
0094         1001,  3006, 1003,  # end run 1 lumi 1
0095         1001,  1002, 1003,  # end run 2 lumi 1
0096         1001,  1002, 1003,  # end run 11 lumi 1
0097         1001,  1002, 1003,  # end run 11 lumi 2
0098         1001,  1002, 1003,  # end run 1 lumi 1
0099         1001,  1002, 1003,  # end run 11 lumi 1
0100         1001,  1002, 1003,  # end run 11 lumi 2
0101         1001,  1002, 1003,  # end run 100 lumi 100
0102         1001,  1002, 1003,  # end run 1 lumi 1
0103         1001,  1002, 1003,  # end run 2 lumi 1
0104         1001,  1002, 1004   # end run 1 lumi 1
0105     ),
0106 
0107     expectedBeginRunNew = cms.untracked.vint32(
0108         10001,   20004,  10003,  # end run 1
0109         10001,   10002,  10003,  # end run 2
0110         10001,   10002,  10003,  # end run 11
0111         10001,   10002,  10003,  # end run 1
0112         10001,   10002,  10003,  # end run 11
0113         10001,   10002,  10003,  # end run 100
0114         10001,   10002,  10003,  # end run 1
0115         10001,   10002,  10003,  # end run 2
0116         10001,   10002,  10003   # end run 1
0117     ),
0118 
0119     expectedEndRunNew = cms.untracked.vint32(
0120         100001,  200004, 100003,  # end run 1
0121         100001,  100002, 100003,  # end run 2
0122         100001,  100002, 100003,  # end run 11
0123         100001,  100002, 100003,  # end run 1
0124         100001,  100002, 100003,  # end run 11
0125         100001,  100002, 100003,  # end run 100
0126         100001,  100002, 100003,  # end run 1
0127         100001,  100002, 100003,  # end run 2
0128         100001,  100002, 100003   # end run 1
0129     ),
0130 
0131     expectedBeginLumiNew = cms.untracked.vint32(
0132         101,  204, 103,  # end run 1 lumi 1
0133         101,  102, 103,  # end run 2 lumi 1
0134         101,  102, 103,  # end run 11 lumi 1
0135         101,  102, 103,  # end run 11 lumi 2
0136         101,  102, 103,  # end run 1 lumi 1
0137         101,  102, 103,  # end run 11 lumi 1
0138         101,  102, 103,  # end run 11 lumi 2
0139         101,  102, 103,  # end run 100 lumi 100
0140         101,  102, 103,  # end run 1 lumi 1
0141         101,  102, 103,  # end run 2 lumi 1
0142         101,  102, 103   # end run 1 lumi 1
0143     ),
0144 
0145     expectedEndLumiNew = cms.untracked.vint32(
0146         1001,  2004, 1003,  # end run 1 lumi 1
0147         1001,  1002, 1003,  # end run 2 lumi 1
0148         1001,  1002, 1003,  # end run 11 lumi 1
0149         1001,  1002, 1003,  # end run 11 lumi 2
0150         1001,  1002, 1003,  # end run 1 lumi 1
0151         1001,  1002, 1003,  # end run 11 lumi 1
0152         1001,  1002, 1003,  # end run 11 lumi 2
0153         1001,  1002, 1003,  # end run 100 lumi 100
0154         1001,  1002, 1003,  # end run 1 lumi 1
0155         1001,  1002, 1003,  # end run 2 lumi 1
0156         1001,  1002, 1003   # end run 1 lumi 1
0157     ),
0158 
0159     expectedDroppedEvent = cms.untracked.vint32(13, 10003, 100003, 103, 1003),
0160     verbose = cms.untracked.bool(True),
0161 
0162     expectedParents = cms.untracked.vstring(
0163         'm3', 'm3', 'm3', 'm3', 'm3',
0164         'm3', 'm3', 'm3', 'm3', 'm3',
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         'm1', 'm1',
0170         'm1', 'm1', 'm1', 'm1', 'm1',
0171         'm1', 'm1', 'm1', 'm1', 'm1',
0172         'm1', 'm1',
0173         'm1',
0174         'm2', 'm2', 'm2', 'm2', 'm2',
0175         'm2', 'm2', 'm2', 'm2', 'm2',
0176         'm3', 'm3', 'm3', 'm3', 'm3',
0177         'm3', 'm3', 'm3', 'm3', 'm3'
0178    ),
0179    testAlias = cms.untracked.bool(True)
0180 )
0181 
0182 process.test2 = cms.EDAnalyzer('RunLumiEventAnalyzer',
0183     verbose = cms.untracked.bool(True),
0184     expectedRunLumiEvents = cms.untracked.vuint32(
0185 1, 0, 0,
0186 1, 1, 0,
0187 1, 1, 1,
0188 1, 1, 2,
0189 1, 1, 3,
0190 1, 1, 4,
0191 1, 1, 5,
0192 1, 1, 6,
0193 1, 1, 7,
0194 1, 1, 8,
0195 1, 1, 9,
0196 1, 1, 10,
0197 1, 1, 11,
0198 1, 1, 12,
0199 1, 1, 13,
0200 1, 1, 14,
0201 1, 1, 15,
0202 1, 1, 16,
0203 1, 1, 17,
0204 1, 1, 18,
0205 1, 1, 19,
0206 1, 1, 20,
0207 1, 1, 21,
0208 1, 1, 22,
0209 1, 1, 23,
0210 1, 1, 24,
0211 1, 1, 25,
0212 1, 1, 0,
0213 1, 0, 0,
0214 2, 0, 0,
0215 2, 1, 0,
0216 2, 1, 1,
0217 2, 1, 2,
0218 2, 1, 3,
0219 2, 1, 4,
0220 2, 1, 5,
0221 2, 1, 0,
0222 2, 0, 0,
0223 11, 0, 0,
0224 11, 1, 0,
0225 11, 1, 1,
0226 11, 1, 0,
0227 11, 2, 0,
0228 11, 2, 1,
0229 11, 2, 0,
0230 11, 0, 0,
0231 1, 0, 0,
0232 1, 1, 0,
0233 1, 1, 11,
0234 1, 1, 12,
0235 1, 1, 13,
0236 1, 1, 14,
0237 1, 1, 15,
0238 1, 1, 16,
0239 1, 1, 17,
0240 1, 1, 18,
0241 1, 1, 19,
0242 1, 1, 20,
0243 1, 1, 0,
0244 1, 0, 0,
0245 11, 0, 0,
0246 11, 1, 0,
0247 11, 1, 1,
0248 11, 1, 0,
0249 11, 2, 0,
0250 11, 2, 1,
0251 11, 2, 0,
0252 11, 0, 0,
0253 100, 0, 0,
0254 100, 100, 0,
0255 100, 100, 100,
0256 100, 100, 0,
0257 100, 0, 0
0258 )
0259 )
0260 process.test2.expectedRunLumiEvents.extend([
0261 1, 0, 0,
0262 1, 1, 0,
0263 1, 1, 21,
0264 1, 1, 22,
0265 1, 1, 23,
0266 1, 1, 24,
0267 1, 1, 25,
0268 1, 1, 0,
0269 1, 0, 0,
0270 2, 0, 0,
0271 2, 1, 0,
0272 2, 1, 1,
0273 2, 1, 2,
0274 2, 1, 3,
0275 2, 1, 4,
0276 2, 1, 5,
0277 2, 1, 0,
0278 2, 0, 0,
0279 1, 0, 0,
0280 1, 1, 0,
0281 1, 1, 1,
0282 1, 1, 2,
0283 1, 1, 3,
0284 1, 1, 4,
0285 1, 1, 5,
0286 1, 1, 6,
0287 1, 1, 7,
0288 1, 1, 8,
0289 1, 1, 9,
0290 1, 1, 10,
0291 1, 1, 0,
0292 1, 0, 0
0293 ])
0294 
0295 process.path1 = cms.Path(process.test + process.test2)
0296 process.endpath1 = cms.EndPath(process.out)