File indexing completed on 2024-04-06 12:10:59
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from FWCore.PythonUtilities.LumiList import LumiList
0004 from FWCore.ParameterSet.VarParsing import VarParsing
0005
0006 options = VarParsing("analysis")
0007 options.register("runList"
0008 , []
0009 , VarParsing.multiplicity.list
0010 , VarParsing.varType.int
0011 , "Run selection")
0012 options.register("lumiList"
0013 , "/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions17/13TeV/DCSOnly/json_DCSONLY.txt"
0014 , VarParsing.multiplicity.singleton
0015 , VarParsing.varType.string
0016 , "JSON file")
0017 options.parseArguments()
0018
0019 lumilist = LumiList(filename = options.lumiList)
0020 if len(options.runList) :
0021 runlist = LumiList(runs = options.runList)
0022 lumilist = lumilist & runlist
0023 if not len(lumilist) :
0024 raise RuntimeError("The resulting LumiList is empty")
0025
0026 process = cms.Process("testRPCCPPF")
0027
0028 process.load("FWCore.MessageService.MessageLogger_cfi")
0029 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0030
0031 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0032 process.GlobalTag.globaltag = "92X_dataRun2_Express_v7"
0033
0034 process.load("EventFilter.RPCRawToDigi.RPCCPPFRawToDigi_sqlite_cff")
0035 process.load("EventFilter.RPCRawToDigi.rpcPacker_cfi")
0036 process.rpcpacker.InputLabel = cms.InputTag("rpcCPPFRawToDigi")
0037 process.load("EventFilter.RPCRawToDigi.rpcUnpackingModule_cfi")
0038 process.rpcUnpackingModulePacked = process.rpcUnpackingModule.clone()
0039 process.rpcUnpackingModulePacked.InputLabel = cms.InputTag("rpcpacker")
0040
0041 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0042
0043
0044 process.source = cms.Source("PoolSource"
0045 , fileNames = cms.untracked.vstring(options.inputFiles)
0046
0047 )
0048
0049 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
0050
0051
0052 process.p = cms.Path( process.rpcUnpackingModule
0053 + process.rpcCPPFRawToDigi * process.rpcpacker * process.rpcUnpackingModulePacked
0054 )
0055
0056
0057 process.out = cms.OutputModule("PoolOutputModule"
0058 , outputCommands = cms.untracked.vstring("drop *"
0059 , "keep *_*_*_testRPCCPPF")
0060
0061 , fileName = cms.untracked.string("testRPCCPPF.root")
0062 , SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("p"))
0063 )
0064
0065 process.e = cms.EndPath(process.out)