Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-20 00:21:32

0001 #-------------------------------------
0002 #   Hcal DQM Application using New DQM Sources/Clients
0003 #-------------------------------------
0004 
0005 #-------------------------------------
0006 #   Standard Python Imports
0007 #-------------------------------------
0008 import os, sys, socket, string
0009 
0010 #-------------------------------------
0011 #   Standard CMSSW Imports/Definitions
0012 #-------------------------------------
0013 import FWCore.ParameterSet.Config as cms
0014 from Configuration.Eras.Era_Run3_cff import Run3
0015 process      = cms.Process('HCALDQM', Run3)
0016 subsystem    = 'Hcal'
0017 cmssw        = os.getenv("CMSSW_VERSION").split("_")
0018 debugstr     = "### HcalDQM::cfg::DEBUG: "
0019 warnstr      = "### HcalDQM::cfg::WARN: "
0020 errorstr     = "### HcalDQM::cfg::ERROR:"
0021 useOfflineGT = False
0022 useFileInput = False
0023 useMap       = False
0024 
0025 unitTest = False
0026 if 'unitTest=True' in sys.argv:
0027     unitTest=True
0028     useFileInput=False
0029 
0030 #-------------------------------------
0031 #   Central DQM Stuff imports
0032 #-------------------------------------
0033 from DQM.Integration.config.online_customizations_cfi import *
0034 if useOfflineGT:
0035     process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0036     process.GlobalTag.globaltag = autoCond['run3_data_prompt'] 
0037 else:
0038     process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
0039 if unitTest:
0040     process.load("DQM.Integration.config.unittestinputsource_cfi")
0041     from DQM.Integration.config.unittestinputsource_cfi import options
0042 elif useFileInput:
0043     process.load("DQM.Integration.config.fileinputsource_cfi")
0044     from DQM.Integration.config.fileinputsource_cfi import options
0045 else:
0046     process.load('DQM.Integration.config.inputsource_cfi')
0047     from DQM.Integration.config.inputsource_cfi import options
0048 process.load('DQM.Integration.config.environment_cfi')
0049 
0050 #-------------------------------------
0051 #   Central DQM Customization
0052 #-------------------------------------
0053 process.source.streamLabel = cms.untracked.string("streamDQMGPUvsCPU")
0054 process.dqmEnv.subSystemFolder = subsystem
0055 process.dqmSaver.tag = 'HcalGPU'
0056 process.dqmSaver.runNumber = options.runNumber
0057 process.dqmSaverPB.tag = 'HcalGPU'
0058 process.dqmSaverPB.runNumber = options.runNumber
0059 process = customise(process)
0060 process.DQMStore.verbose = 0
0061 if not unitTest and not useFileInput :
0062   if not options.BeamSplashRun :
0063     process.source.minEventsPerLumi = 100
0064 
0065 #-------------------------------------
0066 #   CMSSW/Hcal non-DQM Related Module import
0067 #-------------------------------------
0068 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0069 process.load('FWCore.MessageLogger.MessageLogger_cfi')
0070 process.load("EventFilter.HcalRawToDigi.HcalRawToDigi_cfi")
0071 process.load('EventFilter.CastorRawToDigi.CastorRawToDigi_cff')
0072 process.load("SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff")
0073 
0074 #-------------------------------------
0075 #   CMSSW/Hcal non-DQM Related Module Settings
0076 #   -> runType
0077 #   -> Generic Input tag for the Raw Collection
0078 #   -> cmssw version
0079 #   -> Turn off default blocking of dead channels from rechit collection
0080 #   -> Drop Channel Status Bits (had benn 'HcalCellOff', "HcalCellDead")
0081 #   -> For Trigger Primitives Emulation
0082 #   -> L1 GT setting
0083 #   -> Rename the hbheprereco to hbhereco
0084 #-------------------------------------
0085 runType         = process.runType.getRunType()
0086 runTypeName     = process.runType.getRunTypeName()
0087 isCosmicRun     = runTypeName=="cosmic_run" or runTypeName=="cosmic_run_stage1"
0088 isHeavyIon      = runTypeName=="hi_run"
0089 cmssw           = os.getenv("CMSSW_VERSION").split("_")
0090 
0091 
0092 #-------------------------------------
0093 #   Hcal DQM Tasks and Harvesters import
0094 #   New Style
0095 #-------------------------------------
0096 process.load('DQM.HcalTasks.hcalGPUComparisonTask_cfi')
0097 process.load('DQM.HcalTasks.HcalOnlineHarvesting')
0098 process.load('DQM.HcalTasks.HcalQualityTests')
0099 
0100 #-------------------------------------
0101 #   Some Settings before Finishing up
0102 #   New Style Modules
0103 #-------------------------------------
0104 oldsubsystem = subsystem
0105 process.hcalGPUComparisonTask.tagHBHE_ref = "hltHbherecoFromGPU"
0106 process.hcalGPUComparisonTask.tagHBHE_target = "hltHbherecoLegacy"
0107 process.hcalGPUComparisonTask.runkeyVal = runType
0108 process.hcalGPUComparisonTask.runkeyName = runTypeName
0109 
0110 #-------------------------------------
0111 #   Hcal DQM Tasks/Clients Sequences Definition
0112 #-------------------------------------
0113 process.tasksPath = cms.Path(
0114         process.hcalGPUComparisonTask
0115 )
0116 
0117 #-------------------------------------
0118 #   Paths/Sequences Definitions
0119 #-------------------------------------
0120 
0121 process.dqmPath = cms.EndPath(
0122         process.dqmEnv)
0123 process.dqmPath1 = cms.EndPath(
0124         process.dqmSaver
0125         *process.dqmSaverPB
0126 )
0127 
0128 process.schedule = cms.Schedule(
0129     process.tasksPath,
0130     process.dqmPath,
0131     process.dqmPath1
0132 )
0133 
0134 #-------------------------------------
0135 #   Scheduling and Process Customizations
0136 #-------------------------------------
0137 process.options = cms.untracked.PSet(
0138         Rethrow = cms.untracked.vstring(
0139             "ProductNotFound",
0140             "TooManyProducts",
0141             "TooFewProducts"
0142         )
0143 )
0144 process.options.wantSummary = True
0145 
0146 # tracer
0147 #process.Tracer = cms.Service("Tracer")
0148 print("Final Source settings:", process.source)
0149 process = customise(process)