Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-13 03:23:36

0001 #-------------------------------------
0002 #   PF DQM Application using New DQM Sources/Clients 
0003 #   Taken from HCAL DQM Client
0004 #-------------------------------------
0005 
0006 #-------------------------------------
0007 #   Standard Python Imports
0008 #-------------------------------------
0009 import os, sys, socket, string
0010 
0011 #-------------------------------------
0012 #   Standard CMSSW Imports/Definitions
0013 #-------------------------------------
0014 import FWCore.ParameterSet.Config as cms
0015 from Configuration.Eras.Era_Run3_cff import Run3
0016 process      = cms.Process('PFDQM', Run3)
0017 subsystem    = 'ParticleFlow'
0018 cmssw        = os.getenv("CMSSW_VERSION").split("_")
0019 debugstr     = "### PFDQM::cfg::DEBUG: "
0020 warnstr      = "### PFDQM::cfg::WARN: "
0021 errorstr     = "### PFDQM::cfg::ERROR:"
0022 useOfflineGT = False
0023 useFileInput = False
0024 useMap       = False
0025 unitTest     = 'unitTest=True' in sys.argv
0026 
0027 #-------------------------------------
0028 #   Central DQM Stuff imports
0029 #-------------------------------------
0030 from DQM.Integration.config.online_customizations_cfi import *
0031 
0032 if useOfflineGT:
0033     process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0034     process.GlobalTag.globaltag = autoCond['run3_data_prompt']
0035 else:
0036     process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
0037 
0038 if unitTest:
0039     process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
0040     from DQM.Integration.config.unitteststreamerinputsource_cfi import options
0041 elif useFileInput:
0042     process.load("DQM.Integration.config.fileinputsource_cfi")
0043     from DQM.Integration.config.fileinputsource_cfi import options
0044 else:
0045     process.load('DQM.Integration.config.inputsource_cfi')
0046     from DQM.Integration.config.inputsource_cfi import options
0047 
0048 process.load('DQM.Integration.config.environment_cfi')
0049 
0050 #-------------------------------------
0051 #   Central DQM Customization
0052 #-------------------------------------
0053 
0054 if not useFileInput:
0055     # stream label
0056     if process.runType.getRunType() == process.runType.hi_run:
0057         process.source.streamLabel = "streamHIDQMGPUvsCPU"
0058     else:
0059         process.source.streamLabel = "streamDQMGPUvsCPU"
0060 
0061 process.dqmEnv.subSystemFolder = subsystem
0062 process.dqmSaver.tag = 'PFGPU'
0063 process.dqmSaver.runNumber = options.runNumber
0064 process.dqmSaverPB.tag = 'PFGPU'
0065 process.dqmSaverPB.runNumber = options.runNumber
0066 process = customise(process)
0067 process.DQMStore.verbose = 0
0068 if not unitTest and not useFileInput :
0069   if not options.BeamSplashRun :
0070     process.source.minEventsPerLumi = 100
0071 
0072 #-------------------------------------
0073 #   CMSSW/Hcal non-DQM Related Module import
0074 #-------------------------------------
0075 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0076 process.load('FWCore.MessageLogger.MessageLogger_cfi')
0077 
0078 #-------------------------------------
0079 #   CMSSW/Hcal non-DQM Related Module Settings
0080 #   -> runType
0081 #   -> Generic Input tag for the Raw Collection
0082 #   -> cmssw version
0083 #----------------------------------------------
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 #   PF DQM Tasks and Harvesters import
0094 #   New Style
0095 #-------------------------------------
0096 process.load('DQM.PFTasks.pfHcalGPUComparisonTask_cfi')
0097 
0098 #-------------------------------------
0099 #   Some Settings before Finishing up
0100 #   New Style Modules
0101 #-------------------------------------
0102 oldsubsystem = subsystem
0103 #-------------------------------------
0104 #   Hcal DQM Tasks/Clients Sequences Definition
0105 #-------------------------------------
0106 process.tasksPath = cms.Path(
0107         process.pfHcalGPUComparisonTask
0108 )
0109 
0110 #-------------------------------------
0111 #   Paths/Sequences Definitions
0112 #-------------------------------------
0113 
0114 process.dqmPath = cms.EndPath(
0115         process.dqmEnv)
0116 process.dqmPath1 = cms.EndPath(
0117         process.dqmSaver
0118         *process.dqmSaverPB
0119 )
0120 
0121 process.schedule = cms.Schedule(
0122     process.tasksPath,
0123     process.dqmPath,
0124     process.dqmPath1
0125 )
0126 
0127 #-------------------------------------
0128 #   Scheduling and Process Customizations
0129 #-------------------------------------
0130 process.options = cms.untracked.PSet(
0131         Rethrow = cms.untracked.vstring(
0132             "TooManyProducts",
0133             "TooFewProducts"
0134         ),
0135         TryToContinue = cms.untracked.vstring('ProductNotFound')
0136 )
0137 process.options.wantSummary = True
0138 
0139 # tracer
0140 #process.Tracer = cms.Service("Tracer")
0141 print("Final Source settings:", process.source)
0142 process = customise(process)