Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-31 04:19:07

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import argparse
0004 import sys
0005 
0006 parser = argparse.ArgumentParser(prog=sys.argv[0], description='Test streamer input')
0007 
0008 parser.add_argument("--alt", help="Have filter succeed", action="store_true")
0009 parser.add_argument("--ext", help="Switch the order of dependencies", action="store_true")
0010 
0011 args = parser.parse_args()
0012 
0013 
0014 process = cms.Process("TRANSFER")
0015 
0016 import FWCore.Framework.test.cmsExceptionsFatal_cff
0017 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
0018 
0019 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0020 
0021 process.source = cms.Source("WatcherSource",
0022                             inputDir = cms.string("."),
0023                             filePatterns = cms.vstring("inDir/.*\.dat"),
0024                             inprocessDir = cms.string("process"),
0025                             processedDir = cms.string("processed"),
0026                             corruptedDir = cms.string("corrupt"),
0027                             tokenFile = cms.untracked.string("watcherSourceToken"),
0028                             timeOutInSec = cms.int32(10),
0029                             verbosity = cms.untracked.int32(1)
0030 )
0031 
0032 #process.finishProcessFile = cms.EDAnalyzer("ecallasersortingtest::CreateFileAfterStartAnalyzer",
0033 #                              fileName = cms.untracked.string("watcherSourceToken")
0034 #)
0035 
0036 process.a1 = cms.EDAnalyzer("StreamThingAnalyzer",
0037     product_to_get = cms.string('m1')
0038 )
0039 
0040 ids = [cms.EventID(1,0,0), cms.EventID(1,1,0)]
0041 for e in range(10123456789, 10123456839):
0042     ids.append(cms.EventID(1,1,e))
0043 if args.alt:
0044     for e in range(15123456789, 15123456839):
0045         ids.append(cms.EventID(1,1,e))
0046 
0047 if args.ext:
0048     ids.append(cms.EventID(1,1,0))
0049     ids.append(cms.EventID(1,0,0))
0050     ids.append(cms.EventID(1,0,0))
0051     ids.append(cms.EventID(1,1,0))
0052     for e in range(20123456789, 20123456839):
0053         ids.append(cms.EventID(1,1,e))
0054 
0055 ids.append(cms.EventID(1,1,0))
0056 ids.append(cms.EventID(1,0,0))
0057 
0058 process.check = cms.EDAnalyzer("RunLumiEventChecker",
0059                                eventSequence = cms.untracked.VEventID(ids)
0060 )
0061 
0062 
0063 process.out = cms.OutputModule("PoolOutputModule",
0064     fileName = cms.untracked.string('myout.root')
0065 )
0066 
0067 process.end = cms.EndPath(process.a1*process.out*process.check)