Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #-------------------------------------
0002 #   Pixel 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('PIXELDQMLIVE', Run3)
0016 subsystem    = 'Pixel'
0017 cmssw        = os.getenv("CMSSW_VERSION").split("_")
0018 debugstr     = "### PixelDQM::cfg::DEBUG: "
0019 warnstr      = "### PixelDQM::cfg::WARN: "
0020 errorstr     = "### PixelDQM::cfg::ERROR:"
0021 useOfflineGT = False
0022 useFileInput = False
0023 useMap       = False
0024 unitTest     = 'unitTest=True' in sys.argv
0025 
0026 #-------------------------------------
0027 #   Central DQM Stuff imports
0028 #-------------------------------------
0029 from DQM.Integration.config.online_customizations_cfi import *
0030 
0031 if useOfflineGT:
0032     process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0033     process.GlobalTag.globaltag = autoCond['run3_data_prompt']
0034 else:
0035     process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
0036 
0037 if unitTest:
0038     process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
0039     from DQM.Integration.config.unitteststreamerinputsource_cfi import options
0040 elif useFileInput:
0041     process.load("DQM.Integration.config.fileinputsource_cfi")
0042     from DQM.Integration.config.fileinputsource_cfi import options
0043 else:
0044     process.load('DQM.Integration.config.inputsource_cfi')
0045     from DQM.Integration.config.inputsource_cfi import options
0046 
0047 process.load('DQM.Integration.config.environment_cfi')
0048 
0049 #-------------------------------------
0050 #   Central DQM Customization
0051 #-------------------------------------
0052 
0053 if not useFileInput:
0054     # stream label
0055     if process.runType.getRunType() == process.runType.hi_run:
0056         process.source.streamLabel = "streamHIDQMGPUvsCPU"
0057     else:
0058         process.source.streamLabel = "streamDQMGPUvsCPU"
0059 
0060 process.dqmEnv.subSystemFolder = subsystem
0061 process.dqmSaver.tag = 'PixelGPU'
0062 process.dqmSaver.runNumber = options.runNumber
0063 process.dqmSaverPB.tag = 'PixelGPU'
0064 process.dqmSaverPB.runNumber = options.runNumber
0065 process = customise(process)
0066 process.DQMStore.verbose = 0
0067 if not unitTest and not useFileInput :
0068   if not options.BeamSplashRun :
0069     process.source.minEventsPerLumi = 100
0070 
0071 #-------------------------------------
0072 #   CMSSW/Pixel non-DQM Related Module import
0073 #-------------------------------------
0074 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0075 process.load('FWCore.MessageLogger.MessageLogger_cfi')
0076 
0077 #-------------------------------------
0078 #   CMSSW non-DQM Related Module Settings
0079 #-------------------------------------
0080 runType         = process.runType.getRunType()
0081 runTypeName     = process.runType.getRunTypeName()
0082 isCosmicRun     = runTypeName=="cosmic_run" or runTypeName=="cosmic_run_stage1"
0083 isHeavyIon      = runTypeName=="hi_run"
0084 cmssw           = os.getenv("CMSSW_VERSION").split("_")
0085 
0086 #-------------------------------------
0087 #   Pixel DQM Tasks and Harvesters import
0088 #-------------------------------------
0089 process.load('DQM.SiPixelHeterogeneous.SiPixelHeterogenousDQM_FirstStep_cff')
0090 
0091 #-------------------------------------
0092 #   Some Settings before Finishing up
0093 #-------------------------------------
0094 if process.runType.getRunType() == process.runType.hi_run:
0095     process.siPixelPhase1RawDataErrorComparator.pixelErrorSrcGPU = 'hltSiPixelDigisFromSoAPPOnAA'
0096     process.siPixelPhase1RawDataErrorComparator.pixelErrorSrcCPU = 'hltSiPixelDigisLegacyPPOnAA'
0097 else:
0098     process.siPixelPhase1RawDataErrorComparator.pixelErrorSrcGPU = 'hltSiPixelDigisFromSoA'
0099     process.siPixelPhase1RawDataErrorComparator.pixelErrorSrcCPU = 'hltSiPixelDigisLegacy'
0100 #-------------------------------------
0101 #       Some Debug
0102 #-------------------------------------
0103 process.dump = cms.EDAnalyzer("EventContentAnalyzer")
0104 process.dumpPath = cms.Path(process.dump)
0105 
0106 #-------------------------------------
0107 #   Hcal DQM Tasks/Clients Sequences Definition
0108 #-------------------------------------
0109 process.tasksPath = cms.Path(process.siPixelPhase1RawDataErrorComparator)
0110 
0111 #-------------------------------------
0112 #   Paths/Sequences Definitions
0113 #-------------------------------------
0114 process.dqmPath = cms.EndPath(process.dqmEnv)
0115 process.dqmPath1 = cms.EndPath(process.dqmSaver*process.dqmSaverPB)
0116 process.schedule = cms.Schedule(process.tasksPath,
0117                                 #process.dumpPath,  # for debug
0118                                 process.dqmPath,
0119                                 process.dqmPath1)
0120 
0121 #-------------------------------------
0122 #   Scheduling and Process Customizations
0123 #-------------------------------------
0124 process.options = cms.untracked.PSet(
0125         Rethrow = cms.untracked.vstring(
0126             "ProductNotFound",
0127             "TooManyProducts",
0128             "TooFewProducts"
0129         )
0130 )
0131 process.options.wantSummary = True
0132 
0133 # tracer
0134 #process.Tracer = cms.Service("Tracer")
0135 print("Final Source settings:", process.source)
0136 process = customise(process)