Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:17

0001 # same as test_reduced_ProcessHistory_cfg.py,
0002 # except that the analyzers are on the end path
0003 # which should cause the current process not
0004 # to be added to the ProcessHistory
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 import sys
0008 
0009 process = cms.Process("READMERGE")
0010 
0011 process.load("FWCore.MessageService.MessageLogger_cfi")
0012 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0013 process.MessageLogger.cerr.threshold = cms.untracked.string('ERROR')
0014 
0015 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0016 
0017 process.AdaptorConfig = cms.Service("AdaptorConfig",
0018     stats = cms.untracked.bool(False)
0019 )
0020 
0021 process.maxEvents = cms.untracked.PSet(
0022     input = cms.untracked.int32(-1)
0023 )
0024 
0025 process.output = cms.OutputModule("PoolOutputModule",
0026     fileName = cms.untracked.string(
0027       'file:reduced_test.root'
0028     )
0029 )
0030 
0031 process.testmerge = cms.EDAnalyzer("TestMergeResults",
0032                             
0033     #   Check to see that the value we read matches what we know
0034     #   was written. Expected values listed below come in sets of three
0035     #      value expected in Thing
0036     #      value expected in ThingWithMerge
0037     #      value expected in ThingWithIsEqual
0038     #   Each set of 3 is tested at endRun for the expected
0039     #   run values or at endLuminosityBlock for the expected
0040     #   lumi values. And then the next set of three values
0041     #   is tested at the next endRun or endLuminosityBlock.
0042     #   When the sequence of parameter values is exhausted it stops checking
0043     #   0's are just placeholders, if the value is a "0" the check is not made.
0044 
0045     expectedBeginRunNew = cms.untracked.vint32(
0046         10001,   20004,  10003,   # end run 100
0047         10001,   20004,  10003,   # end run 1
0048         10001,   20004,  10003,   # end run 1
0049         10001,   20004,  10003,   # end run 2
0050         10001,   20004,  10003,   # end run 11
0051         10001,   20004,  10003,   # end run 12
0052         10001,   20004,  10003,   # end run 13
0053         10001,   20004,  10003,   # end run 1000
0054         10001,   20004,  10003,   # end run 1001
0055         10001,   20004,  10003,   # end run 1002
0056         10001,   20004,  10003,   # end run 2000
0057         10001,   20004,  10003,   # end run 2001
0058         10001,   20004,  10003    # end run 2002
0059     ),
0060 
0061     expectedEndRunNew = cms.untracked.vint32(
0062         100001,   200004,  100003,   # end run 100
0063         100001,   200004,  100003,   # end run 1
0064         100001,   200004,  100003,   # end run 1
0065         100001,   200004,  100003,   # end run 2
0066         100001,   200004,  100003,   # end run 11
0067         100001,   200004,  100003,   # end run 12
0068         100001,   200004,  100003,   # end run 13
0069         100001,   200004,  100003,   # end run 1000
0070         100001,   200004,  100003,   # end run 1001
0071         100001,   200004,  100003,   # end run 1002
0072         100001,   200004,  100003,   # end run 2000
0073         100001,   200004,  100003,   # end run 2001
0074         100001,   200004,  100003    # end run 2002
0075     ),
0076 
0077     expectedBeginLumiNew = cms.untracked.vint32(
0078         101,       204,    103    # end run 100 lumi 100
0079 # There are more, but all with the same pattern as the first        
0080     ),
0081 
0082     expectedEndLumiNew = cms.untracked.vint32(
0083         1001,     2004,   1003,   # end run 100 lumi 100
0084     ),
0085 
0086     expectedProcessHistoryInRuns = cms.untracked.vstring(
0087         'PROD',            # Run 100
0088         'MERGE',
0089         'MERGETWOFILES',
0090         'PROD',            # Run 1 in files 1, 8, 9, 10
0091         'MERGE',
0092         'MERGETWOFILES',
0093         'PROD',            # Run 1 in files 2, 3, 11
0094         'EXTRA',
0095         'MERGE',
0096         'MERGETWOFILES',
0097         'PROD',            # Run 2 in file 2
0098         'EXTRA',
0099         'MERGE',
0100         'MERGETWOFILES',
0101         'PROD',            # Run 11 in file 5
0102         'MERGE',
0103         'MERGETWOFILES',
0104         'PROD',            # Run 12 in file 5
0105         'MERGE',
0106         'MERGETWOFILES',
0107         'PROD',            # Run 13 in file 5
0108         'MERGE',
0109         'MERGETWOFILES',
0110         'PROD',            # Run 1000 in file 6
0111         'EXTRA',
0112         'MERGE',
0113         'MERGETWOFILES',
0114         'PROD',            # Run 1001 in file 6
0115         'EXTRA',
0116         'MERGE',
0117         'MERGETWOFILES',
0118         'PROD',            # Run 1002 in file 6
0119         'EXTRA',
0120         'MERGE',
0121         'MERGETWOFILES',
0122         'PROD',            # Run 2000 in file 7
0123         'EXTRA',
0124         'MERGE',
0125         'MERGETWOFILES',
0126         'PROD',            # Run 2001 in file 7
0127         'EXTRA',
0128         'MERGE',
0129         'MERGETWOFILES',
0130         'PROD',            # Run 2002 in file 7
0131         'EXTRA',
0132         'MERGE',
0133         'MERGETWOFILES'
0134     ),
0135     verbose = cms.untracked.bool(True)
0136 )
0137 
0138 process.source = cms.Source("PoolSource",
0139     fileNames = cms.untracked.vstring("file:"+sys.argv[2]),
0140     duplicateCheckMode = cms.untracked.string("noDuplicateCheck")
0141 )
0142 
0143 process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
0144     verbose = cms.untracked.bool(True),
0145     expectedRunLumiEvents = cms.untracked.vuint32(
0146 100,   0,   0,
0147 100, 100,   0,
0148 100, 100, 100,
0149 100, 100, 100,
0150 100, 100,   0,
0151 100,   0,   0,
0152   1,   0,   0,  
0153   1,   1,   0,
0154   1,   1,  11,
0155   1,   1,  12,
0156   1,   1,  13,
0157   1,   1,  14,
0158   1,   1,  15,
0159   1,   1,  16,
0160   1,   1,  17,
0161   1,   1,  18,
0162   1,   1,  19,
0163   1,   1,  20,
0164   1,   1, 102,
0165   1,   1,  11,
0166   1,   1,  12,
0167   1,   1,  13,
0168   1,   1,  14,
0169   1,   1,  15,
0170   1,   1,  16,
0171   1,   1,  17,
0172   1,   1,  18,
0173   1,   1,  19,
0174   1,   1,  20,
0175   1,   1, 102,
0176   1,   1,   0,
0177   1,   0,   0,
0178   1,   0,   0,
0179   1,   1,   0,
0180   1,   1,  21,
0181   1,   1,  22,
0182   1,   1,  23,
0183   1,   1,  24,
0184   1,   1,  25,
0185   1,   1,   1,
0186   1,   1,   2,
0187   1,   1,   3,
0188   1,   1,   4,
0189   1,   1,   5,
0190   1,   1,   6,
0191   1,   1,   7,
0192   1,   1,   8,
0193   1,   1,   9,
0194   1,   1,  10,
0195   1,   1,  21,
0196   1,   1,  22,
0197   1,   1,  23,
0198   1,   1,  24,
0199   1,   1,  25,
0200   1,   1,   1,
0201   1,   1,   2,
0202   1,   1,   3,
0203   1,   1,   4,
0204   1,   1,   5,
0205   1,   1,   6,
0206   1,   1,   7,
0207   1,   1,   8,
0208   1,   1,   9,
0209   1,   1,  10,
0210   1,   1,   0,
0211   1,   2,   0,
0212   1,   2,   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,   1,
0222   2,   1,   2,
0223   2,   1,   3,
0224   2,   1,   4,
0225   2,   1,   5,
0226   2,   1,   0,
0227   2,   0,   0
0228 )
0229 )
0230 
0231 process.test.expectedRunLumiEvents.extend([
0232  11,   0,   0,
0233  11,   1,   0,
0234  11,   1,   1,
0235  11,   1,   1,
0236  11,   1,   0,
0237  11,   2,   0,
0238  11,   2,   1,
0239  11,   2,   2,
0240  11,   2,   3,
0241  11,   2,   1,
0242  11,   2,   2,
0243  11,   2,   3,
0244  11,   2,   0,
0245  11,   3,   0,
0246  11,   3,   4,
0247  11,   3,   5,
0248  11,   3,   6,
0249  11,   3,   4,
0250  11,   3,   5,
0251  11,   3,   6,
0252  11,   3,   0,
0253  11,   4,   0,
0254  11,   4,   7,
0255  11,   4,   8,
0256  11,   4,   9,
0257  11,   4,   7,
0258  11,   4,   8,
0259  11,   4,   9,
0260  11,   4,   0,
0261  11,   0,   0,
0262  12,   0,   0,
0263  12,   2,   0,
0264  12,   2,   1,
0265  12,   2,   2,
0266  12,   2,   3,
0267  12,   2,   1,
0268  12,   2,   2,
0269  12,   2,   3,
0270  12,   2,   0,
0271  12,   3,   0,
0272  12,   3,   4,
0273  12,   3,   5,
0274  12,   3,   6,
0275  12,   3,   4,
0276  12,   3,   5,
0277  12,   3,   6,
0278  12,   3,   0,
0279  12,   4,   0,
0280  12,   4,   7,
0281  12,   4,   8,
0282  12,   4,   9,
0283  12,   4,   7,
0284  12,   4,   8,
0285  12,   4,   9,
0286  12,   4,   0,
0287  12,   0,   0,
0288  13,   0,   0,
0289  13,   2,   0,
0290  13,   2,   1,
0291  13,   2,   2,
0292  13,   2,   1,
0293  13,   2,   2,
0294  13,   2,   0,
0295  13,   0,   0,
0296 1000,  0,   0,
0297 1000,  1,   0,
0298 1000,  1,   0,
0299 1000,  0,   0,
0300 1001,  0,   0,
0301 1001,  1,   0,
0302 1001,  1,   0,
0303 1001,  0,   0,
0304 1002,  0,   0,
0305 1002,  1,   0,
0306 1002,  1,   0,
0307 1002,  0,   0,
0308 # Between ~3_1_0  and 3_7_X these following are not in the input file
0309 # because runs with no lumis in the input were always dropped.
0310 # The test passes, it just never gets past this point.
0311 2000,  0,   0,
0312 2000,  0,   0,
0313 2001,  0,   0,
0314 2001,  0,   0,
0315 2002,  0,   0,
0316 2002,  0,   0
0317 ])
0318 
0319 process.path1 = cms.EndPath(process.test*process.testmerge)
0320 
0321 process.ep = cms.EndPath(process.output)