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     expectedProcessHistoryInRuns = cms.untracked.vstring(
0082         'PROD',            # Run 100
0083         'MERGE',
0084         'MERGETWOFILES',
0085         'READMERGE',
0086         'PROD',            # Run 1 in files 1, 8, 9, 10
0087         'MERGE',
0088         'MERGETWOFILES',
0089         'READMERGE',
0090         'PROD',            # Run 1 in files 2, 3, 11
0091         'EXTRA',
0092         'MERGE',
0093         'MERGETWOFILES',
0094         'READMERGE',
0095         'PROD',            # Run 2 in file 2
0096         'EXTRA',
0097         'MERGE',
0098         'MERGETWOFILES',
0099         'READMERGE',
0100         'PROD',            # Run 11 in file 5
0101         'MERGE',
0102         'MERGETWOFILES',
0103         'READMERGE',
0104         'PROD',            # Run 12 in file 5
0105         'MERGE',
0106         'MERGETWOFILES',
0107         'READMERGE',
0108         'PROD',            # Run 13 in file 5
0109         'MERGE',
0110         'MERGETWOFILES',
0111         'READMERGE',
0112         'PROD',            # Run 1000 in file 6
0113         'EXTRA',
0114         'MERGE',
0115         'MERGETWOFILES',
0116         'READMERGE',
0117         'PROD',            # Run 1001 in file 6
0118         'EXTRA',
0119         'MERGE',
0120         'MERGETWOFILES',
0121         'READMERGE',
0122         'PROD',            # Run 1002 in file 6
0123         'EXTRA',
0124         'MERGE',
0125         'MERGETWOFILES',
0126         'READMERGE',
0127         'PROD',            # Run 2000 in file 7
0128         'EXTRA',
0129         'MERGE',
0130         'MERGETWOFILES',
0131         'READMERGE',
0132         'PROD',            # Run 2001 in file 7
0133         'EXTRA',
0134         'MERGE',
0135         'MERGETWOFILES',
0136         'READMERGE',
0137         'PROD',            # Run 2002 in file 7
0138         'EXTRA',
0139         'MERGE',
0140         'MERGETWOFILES',
0141         'READMERGE'
0142     ),
0143     verbose = cms.untracked.bool(True)
0144 )
0145 
0146 process.source = cms.Source("PoolSource",
0147     fileNames = cms.untracked.vstring("file:"+sys.argv[1]),
0148     duplicateCheckMode = cms.untracked.string("noDuplicateCheck")
0149 )
0150 
0151 process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
0152     verbose = cms.untracked.bool(True),
0153     expectedRunLumiEvents = cms.untracked.vuint32(
0154 100,   0,   0,
0155 100, 100,   0,
0156 100, 100, 100,
0157 100, 100, 100,
0158 100, 100,   0,
0159 100,   0,   0,
0160   1,   0,   0,  
0161   1,   1,   0,
0162   1,   1,  11,
0163   1,   1,  12,
0164   1,   1,  13,
0165   1,   1,  14,
0166   1,   1,  15,
0167   1,   1,  16,
0168   1,   1,  17,
0169   1,   1,  18,
0170   1,   1,  19,
0171   1,   1,  20,
0172   1,   1, 102,
0173   1,   1,  11,
0174   1,   1,  12,
0175   1,   1,  13,
0176   1,   1,  14,
0177   1,   1,  15,
0178   1,   1,  16,
0179   1,   1,  17,
0180   1,   1,  18,
0181   1,   1,  19,
0182   1,   1,  20,
0183   1,   1, 102,
0184   1,   1,   0,
0185   1,   0,   0,
0186   1,   0,   0,
0187   1,   1,   0,
0188   1,   1,  21,
0189   1,   1,  22,
0190   1,   1,  23,
0191   1,   1,  24,
0192   1,   1,  25,
0193   1,   1,   1,
0194   1,   1,   2,
0195   1,   1,   3,
0196   1,   1,   4,
0197   1,   1,   5,
0198   1,   1,   6,
0199   1,   1,   7,
0200   1,   1,   8,
0201   1,   1,   9,
0202   1,   1,  10,
0203   1,   1,  21,
0204   1,   1,  22,
0205   1,   1,  23,
0206   1,   1,  24,
0207   1,   1,  25,
0208   1,   1,   1,
0209   1,   1,   2,
0210   1,   1,   3,
0211   1,   1,   4,
0212   1,   1,   5,
0213   1,   1,   6,
0214   1,   1,   7,
0215   1,   1,   8,
0216   1,   1,   9,
0217   1,   1,  10,
0218   1,   1,   0,
0219   1,   2,   0,
0220   1,   2,   0,
0221   1,   0,   0,
0222   2,   0,   0,
0223   2,   1,   0,
0224   2,   1,   1,
0225   2,   1,   2,
0226   2,   1,   3,
0227   2,   1,   4,
0228   2,   1,   5,
0229   2,   1,   1,
0230   2,   1,   2,
0231   2,   1,   3,
0232   2,   1,   4,
0233   2,   1,   5,
0234   2,   1,   0,
0235   2,   0,   0
0236 )
0237 )
0238 
0239 process.test.expectedRunLumiEvents.extend([
0240  11,   0,   0,
0241  11,   1,   0,
0242  11,   1,   1,
0243  11,   1,   1,
0244  11,   1,   0,
0245  11,   2,   0,
0246  11,   2,   1,
0247  11,   2,   2,
0248  11,   2,   3,
0249  11,   2,   1,
0250  11,   2,   2,
0251  11,   2,   3,
0252  11,   2,   0,
0253  11,   3,   0,
0254  11,   3,   4,
0255  11,   3,   5,
0256  11,   3,   6,
0257  11,   3,   4,
0258  11,   3,   5,
0259  11,   3,   6,
0260  11,   3,   0,
0261  11,   4,   0,
0262  11,   4,   7,
0263  11,   4,   8,
0264  11,   4,   9,
0265  11,   4,   7,
0266  11,   4,   8,
0267  11,   4,   9,
0268  11,   4,   0,
0269  11,   0,   0,
0270  12,   0,   0,
0271  12,   2,   0,
0272  12,   2,   1,
0273  12,   2,   2,
0274  12,   2,   3,
0275  12,   2,   1,
0276  12,   2,   2,
0277  12,   2,   3,
0278  12,   2,   0,
0279  12,   3,   0,
0280  12,   3,   4,
0281  12,   3,   5,
0282  12,   3,   6,
0283  12,   3,   4,
0284  12,   3,   5,
0285  12,   3,   6,
0286  12,   3,   0,
0287  12,   4,   0,
0288  12,   4,   7,
0289  12,   4,   8,
0290  12,   4,   9,
0291  12,   4,   7,
0292  12,   4,   8,
0293  12,   4,   9,
0294  12,   4,   0,
0295  12,   0,   0,
0296  13,   0,   0,
0297  13,   2,   0,
0298  13,   2,   1,
0299  13,   2,   2,
0300  13,   2,   1,
0301  13,   2,   2,
0302  13,   2,   0,
0303  13,   0,   0,
0304 1000,  0,   0,
0305 1000,  1,   0,
0306 1000,  1,   0,
0307 1000,  0,   0,
0308 1001,  0,   0,
0309 1001,  1,   0,
0310 1001,  1,   0,
0311 1001,  0,   0,
0312 1002,  0,   0,
0313 1002,  1,   0,
0314 1002,  1,   0,
0315 1002,  0,   0,
0316 # Between ~3_1_0  and 3_7_X these following are not in the input file
0317 # because runs with no lumis in the input were always dropped.
0318 # The test passes, it just never gets past this point.
0319 2000,  0,   0,
0320 2000,  0,   0,
0321 2001,  0,   0,
0322 2001,  0,   0,
0323 2002,  0,   0,
0324 2002,  0,   0
0325 ])
0326 
0327 process.path1 = cms.Path(process.test*process.testmerge)
0328 
0329 process.ep = cms.EndPath(process.output)