Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-08 02:27:16

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 import sys
0004 
0005 from Configuration.Eras.Era_Run3_cff import Run3
0006 process = cms.Process("DTDQM", Run3)
0007 
0008 unitTest = False
0009 if 'unitTest=True' in sys.argv:
0010   unitTest=True
0011 
0012 #----------------------------
0013 #### Event Source
0014 #----------------------------
0015 if unitTest:
0016     process.load("DQM.Integration.config.unittestinputsource_cfi")
0017     from DQM.Integration.config.unittestinputsource_cfi import options
0018 else:
0019     # for live online DQM in P5
0020     process.load("DQM.Integration.config.inputsource_cfi")
0021     from DQM.Integration.config.inputsource_cfi import options
0022 
0023 # for testing in lxplus
0024 #process.load("DQM.Integration.config.fileinputsource_cfi")
0025 #from DQM.Integration.config.fileinputsource_cfi import options
0026 
0027 #----------------------------
0028 #### DQM Environment
0029 #----------------------------
0030 process.load("DQM.Integration.config.environment_cfi")
0031 
0032 #----------------------------
0033 #### DQM Live Environment
0034 #----------------------------
0035 process.dqmEnv.subSystemFolder = 'DT'
0036 process.dqmSaver.tag = "DT"
0037 process.dqmSaver.runNumber = options.runNumber
0038 process.dqmSaverPB.tag = "DT"
0039 process.dqmSaverPB.runNumber = options.runNumber
0040 #-----------------------------
0041 
0042 #Enable HLT*Mu* filtering to monitor on Muon events
0043 #OR HLT_Physics* to monitor FEDs in commissioning runs
0044 if not unitTest:
0045     process.source.SelectEvents = cms.untracked.vstring("HLT*Mu*","HLT_*Physics*")
0046 
0047 # DT reco and DQM sequences
0048 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0049 process.load("Configuration/StandardSequences/MagneticField_cff")
0050 process.load("DQM.DTMonitorModule.dt_dqm_sourceclient_common_cff")
0051 #---- for P5 (online) DB access
0052 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0053 #---- for offline DB: change and possibly customise the GT
0054 #from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0055 #process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run2_data', '')
0056 
0057 # message logger
0058 process.MessageLogger = cms.Service("MessageLogger",
0059                                     destinations = cms.untracked.vstring('cout'),
0060                                     cout = cms.untracked.PSet(threshold = cms.untracked.string('WARNING'))
0061                                     )
0062 
0063 process.dqmmodules = cms.Sequence(process.dqmEnv + process.dqmSaver + process.dqmSaverPB)
0064 
0065 process.dtDQMPathPhys = cms.Path(process.unpackers + process.dqmmodules + process.physicsEventsFilter *  process.dtDQMPhysSequence)
0066 
0067 #process.dtDQMPathCalib = cms.Path(process.unpackers + process.dqmmodules + process.calibrationEventsFilter * process.dtDQMCalib)
0068 
0069 process.twinMuxStage2Digis.DTTM7_FED_Source = "rawDataCollector"
0070 process.dtunpacker.inputLabel = "rawDataCollector"
0071 process.gtDigis.DaqGtInputTag = "rawDataCollector"
0072 process.scalersRawToDigi.scalersInputTag = "rawDataCollector"
0073 
0074 print("Running with run type = ", process.runType.getRunType())
0075 
0076 #----------------------------
0077 #### pp run settings 
0078 #----------------------------
0079 
0080 if (process.runType.getRunType() == process.runType.pp_run):
0081     pass
0082 
0083 
0084 #----------------------------
0085 #### cosmic run settings 
0086 #----------------------------
0087 
0088 if (process.runType.getRunType() == process.runType.cosmic_run):
0089     pass
0090 
0091 
0092 #----------------------------
0093 #### HI run settings 
0094 #----------------------------
0095 
0096 if (process.runType.getRunType() == process.runType.hi_run):
0097     process.twinMuxStage2Digis.DTTM7_FED_Source = "rawDataRepacker"
0098     process.dtunpacker.inputLabel = "rawDataRepacker"
0099     process.gtDigis.DaqGtInputTag = "rawDataRepacker"
0100     process.scalersRawToDigi.scalersInputTag = "rawDataRepacker"
0101     
0102     process.dtDigiMonitor.ResetCycle = 9999
0103 
0104 
0105 
0106 ### process customizations included here
0107 from DQM.Integration.config.online_customizations_cfi import *
0108 print("Final Source settings:", process.source)
0109 process = customise(process)