Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:40

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # VarParsing
0004 import FWCore.ParameterSet.VarParsing as VarParsing
0005 options = VarParsing.VarParsing('analysis')
0006 options.register('nThreads', 4, options.multiplicity.singleton, options.varType.int, 'number of threads')
0007 options.register('nStreams', 0, options.multiplicity.singleton, options.varType.int, 'number of streams')
0008 options.register('globalTag', 'auto:run3_hlt_relval', options.multiplicity.singleton, options.varType.string, 'name of GlobalTag')
0009 options.setDefault('inputFiles', [
0010   '/store/data/Run2022B/HLTPhysics/RAW/v1/000/355/456/00000/69b26b27-4bd1-4524-bc18-45f7b9b5e076.root',
0011 ])
0012 options.setDefault('maxEvents', 200)
0013 options.setType('outputFile', options.varType.string)
0014 options.setDefault('outputFile', 'testTriggerMonitors_DQMIO.root')
0015 options.parseArguments()
0016 
0017 # Process
0018 process = cms.Process('DQM')
0019 
0020 process.options.numberOfThreads = options.nThreads
0021 process.options.numberOfStreams = options.nStreams
0022 process.maxEvents.input = options.maxEvents
0023 
0024 # Source (EDM input)
0025 process.source = cms.Source('PoolSource',
0026   fileNames = cms.untracked.vstring(options.inputFiles),
0027   inputCommands = cms.untracked.vstring(
0028     'drop *',
0029     'keep FEDRawDataCollection_rawDataCollector__*',
0030     'keep edmTriggerResults_TriggerResults__HLT',
0031   )
0032 )
0033 
0034 # DQMStore (Service)
0035 process.load('DQMServices.Core.DQMStore_cfi')
0036 
0037 # MessageLogger (Service)
0038 process.load('FWCore.MessageLogger.MessageLogger_cfi')
0039 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0040 
0041 # FastTimerService (Service)
0042 from HLTrigger.Timer.FastTimerService_cfi import FastTimerService as _FastTimerService
0043 process.FastTimerService = _FastTimerService.clone(
0044   dqmTimeRange = 2000,
0045   enableDQM = True,
0046   enableDQMTransitions = True,
0047   enableDQMbyLumiSection = True,
0048   enableDQMbyModule = True,
0049   enableDQMbyPath = True,
0050   enableDQMbyProcesses = True
0051 )
0052 process.MessageLogger.FastReport = dict()
0053 
0054 # ThroughputService (Service)
0055 from HLTrigger.Timer.ThroughputService_cfi import ThroughputService as _ThroughputService
0056 process.ThroughputService = _ThroughputService.clone(
0057   dqmPathByProcesses = True,
0058   timeRange = 60000,
0059   timeResolution = 5.828
0060 )
0061 process.MessageLogger.ThroughputService = dict()
0062 
0063 # GlobalTag (ESSource)
0064 from Configuration.AlCa.GlobalTag import GlobalTag as customiseGlobalTag
0065 process.GlobalTag = customiseGlobalTag(globaltag = options.globalTag)
0066 
0067 # EventData modules
0068 from EventFilter.L1TRawToDigi.gtStage2Digis_cfi import gtStage2Digis as _gtStage2Digis
0069 process.gtStage2Digis = _gtStage2Digis.clone()
0070 
0071 from EventFilter.ScalersRawToDigi.ScalersRawToDigi_cfi import scalersRawToDigi as _scalersRawToDigi
0072 process.scalersRawToDigi = _scalersRawToDigi.clone()
0073 
0074 from EventFilter.OnlineMetaDataRawToDigi.onlineMetaDataRawToDigi_cfi import onlineMetaDataRawToDigi as _onlineMetaDataDigis
0075 process.onlineMetaDataDigis = _onlineMetaDataDigis.clone()
0076 
0077 from DQM.HLTEvF.triggerRatesMonitor_cfi import triggerRatesMonitor as _triggerRatesMonitor
0078 process.triggerRatesMonitor = _triggerRatesMonitor.clone(
0079   hltResults = 'TriggerResults::HLT'
0080 )
0081 
0082 from DQM.HLTEvF.triggerBxMonitor_cfi import triggerBxMonitor as _triggerBxMonitor
0083 process.triggerBxMonitor = _triggerBxMonitor.clone(
0084   hltResults = 'TriggerResults::HLT'
0085 )
0086 
0087 from DQM.HLTEvF.triggerBxVsOrbitMonitor_cfi import triggerBxVsOrbitMonitor as _triggerBxVsOrbitMonitor
0088 process.triggerBxVsOrbitMonitor = _triggerBxVsOrbitMonitor.clone(
0089   hltResults = 'TriggerResults::HLT'
0090 )
0091 
0092 from DQM.HLTEvF.lumiMonitor_cfi import lumiMonitor as _lumiMonitor
0093 process.lumiMonitor = _lumiMonitor.clone(
0094   scalers = 'scalersRawToDigi',
0095   onlineMetaDataDigis = 'onlineMetaDataDigis'
0096 )
0097 
0098 from DQM.HLTEvF.psMonitoring_cfi import psMonitoring as _psColumnMonitor
0099 process.psColumnMonitor = _psColumnMonitor.clone(
0100   ugtBXInputTag = 'gtStage2Digis',
0101   histoPSet = dict(
0102     psColumnPSet = dict(
0103       nbins = 20
0104     )
0105   )
0106 )
0107 
0108 # Output module (file in DQM format)
0109 process.dqmOutput = cms.OutputModule('DQMRootOutputModule',
0110   fileName = cms.untracked.string(options.outputFile)
0111 )
0112 
0113 # EndPath
0114 process.endp = cms.EndPath(
0115     process.gtStage2Digis
0116   + process.scalersRawToDigi
0117   + process.onlineMetaDataDigis
0118   + process.triggerRatesMonitor
0119   + process.triggerBxMonitor
0120   + process.triggerBxVsOrbitMonitor
0121   + process.lumiMonitor
0122   + process.psColumnMonitor
0123   + process.dqmOutput
0124 )