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