Back to home page

Project CMSSW displayed by LXR

 
 

    


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/Collisions16/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("testRPCTwinMux")
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 = "80X_dataRun2_Express_v15"
0033 
0034 process.load("EventFilter.RPCRawToDigi.RPCTwinMuxRawToDigi_sqlite_cff")
0035 process.load("EventFilter.RPCRawToDigi.RPCTwinMuxDigiToRaw_sqlite_cff")
0036 process.RPCTwinMuxDigiToRaw.inputTag = cms.InputTag("RPCTwinMuxRawToDigi")
0037 
0038 process.load("EventFilter.RPCRawToDigi.rpcPacker_cfi")
0039 process.rpcpacker.InputLabel = cms.InputTag("RPCTwinMuxRawToDigi")
0040 process.load("EventFilter.RPCRawToDigi.rpcUnpackingModule_cfi")
0041 process.rpcUnpackingModulePacked = process.rpcUnpackingModule.clone()
0042 process.rpcUnpackingModulePacked.InputLabel = cms.InputTag("rpcpacker")
0043 
0044 process.RPCTwinMuxDigiToRawPAC = process.RPCTwinMuxDigiToRaw.clone()
0045 process.RPCTwinMuxDigiToRawPAC.inputTag = cms.InputTag("rpcUnpackingModule")
0046 process.RPCTwinMuxRawToDigiPAC = process.RPCTwinMuxRawToDigi.clone()
0047 process.RPCTwinMuxRawToDigiPAC.inputTag = cms.InputTag("RPCTwinMuxDigiToRawPAC")
0048 
0049 process.RPCTwinMuxRawToDigiPacked = process.RPCTwinMuxRawToDigi.clone()
0050 process.RPCTwinMuxRawToDigiPacked.inputTag = cms.InputTag("RPCTwinMuxDigiToRaw")
0051 
0052 process.load("EventFilter.L1TXRawToDigi.twinMuxStage2Digis_cfi")
0053 process.twinMuxStage2DigisPacked = process.twinMuxStage2Digis.clone()
0054 process.twinMuxStage2DigisPacked.DTTM7_FED_Source = cms.InputTag("RPCTwinMuxDigiToRaw")
0055 
0056 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0057 
0058 # Source
0059 process.source = cms.Source("PoolSource"
0060                             , fileNames = cms.untracked.vstring(options.inputFiles)
0061                             , lumisToProcess = lumilist.getVLuminosityBlockRange()
0062 )
0063 
0064 #process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
0065 process.maxLuminosityBlocks = cms.untracked.PSet(input = cms.untracked.int32(10))
0066 
0067 process.p = cms.Path( ( process.rpcUnpackingModule * process.RPCTwinMuxDigiToRawPAC * process.RPCTwinMuxRawToDigiPAC )
0068                       + ( process.RPCTwinMuxRawToDigi
0069                           * ( ( process.rpcpacker * process.rpcUnpackingModulePacked )
0070                               + ( process.RPCTwinMuxDigiToRaw
0071                                   * ( process.RPCTwinMuxRawToDigiPacked + process.twinMuxStage2DigisPacked ) )
0072                           )
0073                       )
0074                       + process.twinMuxStage2Digis
0075 )
0076 
0077 # Output
0078 process.out = cms.OutputModule("PoolOutputModule"
0079                                , outputCommands = cms.untracked.vstring("drop *"
0080                                                                         , "keep *_*_*_testRPCTwinMux")
0081                                , fileName = cms.untracked.string(options.outputFile)
0082                                #, fileName = cms.untracked.string("testRPCTwinMux.root")
0083                                , SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("p"))
0084 )
0085 
0086 process.e = cms.EndPath(process.out)