Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-08 02:27:20

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("MERGE")
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 process.maxEvents = cms.untracked.PSet(
0016     input = cms.untracked.int32(33)
0017 )
0018 
0019 process.source = cms.Source("PoolSource",
0020     fileNames = cms.untracked.vstring(
0021         'file:testRunMerge0.root', 
0022         'file:testRunMerge1.root', 
0023         'file:testRunMerge2extra.root', 
0024         'file:testRunMerge3extra.root',
0025         'file:testRunMerge4.root',
0026         'file:testRunMerge5.root'
0027     ),
0028     inputCommands = cms.untracked.vstring(
0029         'keep *', 
0030         'drop *_C_*_*',
0031         'drop *_*_*_EXTRA',
0032         'drop edmtestThingWithMerge_makeThingToBeDropped1_*_*'
0033     )
0034     , duplicateCheckMode = cms.untracked.string('checkEachRealDataFile')
0035 )
0036 
0037 process.thingWithMergeProducer = cms.EDProducer("ThingWithMergeProducer")
0038 
0039 process.test = cms.EDAnalyzer("TestMergeResults",
0040                             
0041     #   Check to see that the value we read matches what we know
0042     #   was written. Expected values listed below come in sets of three
0043     #      value expected in Thing
0044     #      value expected in ThingWithMerge
0045     #      value expected in ThingWithIsEqual
0046     #   Each set of 3 is tested at endRun for the expected
0047     #   run values or at endLuminosityBlock for the expected
0048     #   lumi values. And then the next set of three values
0049     #   is tested at the next endRun or endLuminosityBlock.
0050     #   When the sequence of parameter values is exhausted it stops checking
0051     #   0's are just placeholders, if the value is a "0" the check is not made.
0052 
0053     expectedBeginRunProd = cms.untracked.vint32(
0054         10001,   10002,  10003,   # end run 100
0055         10001,   10002,  10003,   # end run 1
0056         10001,   10002,  10003,   # end run 1, no merge of runs because ProcessHistoryID different
0057         10001,   10002,  10003,   # end run 2
0058         10001,   10002,  10004    # end run 1
0059     ),
0060                             
0061     expectedEndRunProd = cms.untracked.vint32(
0062         100001, 100002, 100003,   # end run 100
0063         100001, 100002, 100003,   # end run 1
0064         100001, 100002, 100003,   # end run 1, no merge of runs because ProcessHistoryID different
0065         100001, 100002, 100003,   # end run 2
0066         100001, 100002, 100004    # end run 1
0067     ),
0068 
0069     expectedBeginLumiProd = cms.untracked.vint32(
0070         101,       102,    103,   # end run 100 lumi 100
0071         101,       102,    103,   # end run 1 lumi 1
0072         101,       102,    103,   # end run 1 lumi 1, no merge of runs because ProcessHistoryID different
0073         101,       102,    103,   # end run 2 lumi 1
0074         101,       102,    104    # end run 1 lumi 1
0075     ),
0076 
0077     expectedEndLumiProd = cms.untracked.vint32(
0078         1001,     1002,   1003,   # end run 100 lumi 100
0079         1001,     1002,   1003,   # end run 1 lumi 1
0080         1001,     1002,   1003,   # end run 1 lumi 1, no merge of runs because ProcessHistoryID different
0081         1001,     1002,   1003,   # end run 2 lumi 1
0082         1001,     1002,   1004    # end run 1 lumi 1
0083     ),
0084 
0085     expectedBeginRunNew = cms.untracked.vint32(
0086         10001,   10002,  10003,   # end run 100
0087         10001,   10002,  10003,   # end run 1
0088         10001,   10002,  10003,   # end run 1
0089         10001,   10002,  10003,   # end run 2
0090         10001,   10002,  10003    # end run 1
0091     ),
0092 
0093     expectedEndRunNew = cms.untracked.vint32(
0094         100001, 100002, 100003,   # end run 100
0095         100001, 100002, 100003,   # end run 1
0096         100001, 100002, 100003,   # end run 1
0097         100001, 100002, 100003,   # end run 2
0098         100001, 100002, 100003    # end run 1
0099     ),
0100 
0101     expectedBeginLumiNew = cms.untracked.vint32(
0102         101,       102,    103,   # end run 100 lumi 100
0103         101,       102,    103,   # end run 1 lumi 1
0104         101,       102,    103,   # end run 1 lumi 1
0105         101,       102,    103,   # end run 2 lumi 1
0106         101,       102,    103    # end run 1 lumi 1
0107     ),
0108 
0109     expectedEndLumiNew = cms.untracked.vint32(
0110         1001,     1002,   1003,   # end run 100 lumi 100
0111         1001,     1002,   1003,   # end run 1 lumi 1
0112         1001,     1002,   1003,   # end run 1 lumi 1
0113         1001,     1002,   1003,   # end run 2 lumi 1
0114         1001,     1002,   1003    # end run 1 lumi 1
0115     ),
0116 
0117     expectedDroppedEvent1 = cms.untracked.vint32(13, 13, -1, -1, -1, 13),
0118     expectedDroppedEvent1NEvents = cms.untracked.vint32(1,10,10,10,1,99),
0119 
0120     verbose = cms.untracked.bool(False),
0121     testAlias = cms.untracked.bool(True)
0122 )
0123 
0124 process.out = cms.OutputModule("PoolOutputModule",
0125     fileName = cms.untracked.string('testRunMergeMERGE2.root'),
0126     outputCommands = cms.untracked.vstring(
0127         'keep *', 
0128         'drop *_makeThingToBeDropped_*_*',
0129         'drop *_aliasForThingToBeDropped2_*_*',
0130         'drop *_B_*_*',
0131         'drop *_G_*_*',
0132         'drop *_H_*_*',
0133         'drop *_I_*_*',
0134         'drop *_J_*_*'
0135     )
0136 )
0137 
0138 process.checker = cms.OutputModule("GetProductCheckerOutputModule")
0139 
0140 process.path1 = cms.Path(process.thingWithMergeProducer + process.test)
0141 process.e = cms.EndPath(process.out * process.checker)