Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:09

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 process = cms.Process("READMERGE")
0005 
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0008 process.MessageLogger.cerr.threshold = cms.untracked.string('ERROR')
0009 
0010 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0011 
0012 process.AdaptorConfig = cms.Service("AdaptorConfig",
0013     stats = cms.untracked.bool(False)
0014 )
0015 
0016 process.maxEvents = cms.untracked.PSet(
0017     input = cms.untracked.int32(-1)
0018 )
0019 
0020 process.output = cms.OutputModule("PoolOutputModule",
0021     fileName = cms.untracked.string(
0022       'file:reduced_test.root'
0023     )
0024 )
0025 
0026 process.testmerge = cms.EDAnalyzer("TestMergeResults",
0027                             
0028     #   Check to see that the value we read matches what we know
0029     #   was written. Expected values listed below come in sets of three
0030     #      value expected in Thing
0031     #      value expected in ThingWithMerge
0032     #      value expected in ThingWithIsEqual
0033     #   Each set of 3 is tested at endRun for the expected
0034     #   run values or at endLuminosityBlock for the expected
0035     #   lumi values. And then the next set of three values
0036     #   is tested at the next endRun or endLuminosityBlock.
0037     #   When the sequence of parameter values is exhausted it stops checking
0038     #   0's are just placeholders, if the value is a "0" the check is not made.
0039 
0040     expectedBeginRunNew = cms.untracked.vint32(
0041         10001,   20004,  10003,   # end run 100
0042         10001,   20004,  10003,   # end run 1
0043         10001,   20004,  10003,   # end run 1
0044         10001,   20004,  10003,   # end run 2
0045         10001,   20004,  10003,   # end run 11
0046         10001,   20004,  10003,   # end run 12
0047         10001,   20004,  10003,   # end run 13
0048         10001,   20004,  10003,   # end run 1000
0049         10001,   20004,  10003,   # end run 1001
0050         10001,   20004,  10003,   # end run 1002
0051         10001,   20004,  10003,   # end run 2000
0052         10001,   20004,  10003,   # end run 2001
0053         10001,   20004,  10003    # end run 2002
0054     ),
0055 
0056     expectedEndRunNew = cms.untracked.vint32(
0057         100001,   200004,  100003,   # end run 100
0058         100001,   200004,  100003,   # end run 1
0059         100001,   200004,  100003,   # end run 1
0060         100001,   200004,  100003,   # end run 2
0061         100001,   200004,  100003,   # end run 11
0062         100001,   200004,  100003,   # end run 12
0063         100001,   200004,  100003,   # end run 13
0064         100001,   200004,  100003,   # end run 1000
0065         100001,   200004,  100003,   # end run 1001
0066         100001,   200004,  100003,   # end run 1002
0067         100001,   200004,  100003,   # end run 2000
0068         100001,   200004,  100003,   # end run 2001
0069         100001,   200004,  100003    # end run 2002
0070     ),
0071 
0072     expectedBeginLumiNew = cms.untracked.vint32(
0073         101,       204,    103    # end run 100 lumi 100
0074 # There are more, but all with the same pattern as the first        
0075     ),
0076 
0077     expectedEndLumiNew = cms.untracked.vint32(
0078         1001,     2004,   1003,   # end run 100 lumi 100
0079     ),
0080 
0081     verbose = cms.untracked.bool(True)
0082 )
0083 
0084 process.source = cms.Source("PoolSource",
0085     fileNames = cms.untracked.vstring("file:"+sys.argv[1])
0086 )
0087 
0088 process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
0089     verbose = cms.untracked.bool(True),
0090     expectedRunLumiEvents = cms.untracked.vuint32(
0091 100,   0,   0,
0092 100, 100,   0,
0093 100, 100, 100,
0094 100, 100,   0,
0095 100,   0,   0,
0096   1,   0,   0,  
0097   1,   1,   0,
0098   1,   1,  11,
0099   1,   1,  12,
0100   1,   1,  13,
0101   1,   1,  14,
0102   1,   1,  15,
0103   1,   1,  16,
0104   1,   1,  17,
0105   1,   1,  18,
0106   1,   1,  19,
0107   1,   1,  20,
0108   1,   1, 102,
0109   1,   1,   0,
0110   1,   0,   0,
0111   1,   0,   0,
0112   1,   1,   0,
0113   1,   1,  21,
0114   1,   1,  22,
0115   1,   1,  23,
0116   1,   1,  24,
0117   1,   1,  25,
0118   1,   1,   1,
0119   1,   1,   2,
0120   1,   1,   3,
0121   1,   1,   4,
0122   1,   1,   5,
0123   1,   1,   6,
0124   1,   1,   7,
0125   1,   1,   8,
0126   1,   1,   9,
0127   1,   1,  10,
0128   1,   1,   0,
0129   1,   2,   0,
0130   1,   2,   0,
0131   1,   0,   0,
0132   2,   0,   0,
0133   2,   1,   0,
0134   2,   1,   1,
0135   2,   1,   2,
0136   2,   1,   3,
0137   2,   1,   4,
0138   2,   1,   5,
0139   2,   1,   0,
0140   2,   0,   0
0141 )
0142 )
0143 
0144 process.test.expectedRunLumiEvents.extend([
0145  11,   0,   0,
0146  11,   1,   0,
0147  11,   1,   1,
0148  11,   1,   0,
0149  11,   2,   0,
0150  11,   2,   1,
0151  11,   2,   2,
0152  11,   2,   3,
0153  11,   2,   0,
0154  11,   3,   0,
0155  11,   3,   4,
0156  11,   3,   5,
0157  11,   3,   6,
0158  11,   3,   0,
0159  11,   4,   0,
0160  11,   4,   7,
0161  11,   4,   8,
0162  11,   4,   9,
0163  11,   4,   0,
0164  11,   0,   0,
0165  12,   0,   0,
0166  12,   2,   0,
0167  12,   2,   1,
0168  12,   2,   2,
0169  12,   2,   3,
0170  12,   2,   0,
0171  12,   3,   0,
0172  12,   3,   4,
0173  12,   3,   5,
0174  12,   3,   6,
0175  12,   3,   0,
0176  12,   4,   0,
0177  12,   4,   7,
0178  12,   4,   8,
0179  12,   4,   9,
0180  12,   4,   0,
0181  12,   0,   0,
0182  13,   0,   0,
0183  13,   2,   0,
0184  13,   2,   1,
0185  13,   2,   2,
0186  13,   2,   0,
0187  13,   0,   0,
0188 1000,  0,   0,
0189 1000,  1,   0,
0190 1000,  1,   0,
0191 1000,  0,   0,
0192 1001,  0,   0,
0193 1001,  1,   0,
0194 1001,  1,   0,
0195 1001,  0,   0,
0196 1002,  0,   0,
0197 1002,  1,   0,
0198 1002,  1,   0,
0199 1002,  0,   0,
0200 # Between ~3_1_0  and 3_7_X these following are not in the input file
0201 # because runs with no lumis in the input were always dropped.
0202 # The test passes, it just never gets past this point.
0203 2000,  0,   0,
0204 2000,  0,   0,
0205 2001,  0,   0,
0206 2001,  0,   0,
0207 2002,  0,   0,
0208 2002,  0,   0
0209 ])
0210 
0211 process.path1 = cms.Path(process.test*process.testmerge)
0212 
0213 process.ep = cms.EndPath(process.output)