Skip to content

Commit

Permalink
use "HIDQM*" streams in online-DQM clients if "runType==hi_run"
Browse files Browse the repository at this point in the history
  • Loading branch information
missirol committed Jan 27, 2024
1 parent 9fca027 commit 8665f3d
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,22 @@
if unitTest:
process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
from DQM.Integration.config.unitteststreamerinputsource_cfi import options
# new stream label
process.source.streamLabel = cms.untracked.string('streamDQMOnlineBeamspot')
# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.source.streamLabel = 'streamHIDQMOnlineBeamspot'
else:
process.source.streamLabel = 'streamDQMOnlineBeamspot'

elif live:
# for live online DQM in P5
process.load("DQM.Integration.config.inputsource_cfi")
from DQM.Integration.config.inputsource_cfi import options
# new stream label
process.source.streamLabel = cms.untracked.string('streamDQMOnlineBeamspot')
# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.source.streamLabel = 'streamHIDQMOnlineBeamspot'
else:
process.source.streamLabel = 'streamDQMOnlineBeamspot'

else:
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options

# new stream label
#process.source.streamLabel = cms.untracked.string('streamDQMOnlineBeamspot')

# for testing in lxplus
#process.load("DQM.Integration.config.fileinputsource_cfi")
#from DQM.Integration.config.fileinputsource_cfi import options

#--------------------------
# HLT Filter
# 0=random, 1=physics, 2=calibration, 3=technical
Expand Down Expand Up @@ -173,6 +166,4 @@
# Final path
print("Final Source settings:", process.source)

process.p = cms.Path(process.dqmcommon
* process.monitor )

process.p = cms.Path( process.dqmcommon * process.monitor )
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,9 @@

process.source.streamLabel = "streamDQMCalibration"


process.ecalPedestalMonitorTask.verbosity = 0
process.ecalPedestalMonitorTask.commonParameters.onlineMode = True


process.ecalLaserLedMonitorTask.verbosity = 0
process.ecalLaserLedMonitorTask.collectionTags.EBLaserLedUncalibRecHit = "ecalLaserLedUncalibRecHit:EcalUncalibRecHitsEB"
process.ecalLaserLedMonitorTask.collectionTags.EELaserLedUncalibRecHit = "ecalLaserLedUncalibRecHit:EcalUncalibRecHitsEE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process("process", Run3)

unitTest = False
if 'unitTest=True' in sys.argv:
unitTest=True
unitTest = 'unitTest=True' in sys.argv

### Load cfis ###

Expand Down Expand Up @@ -58,7 +56,11 @@
process.preScaler.prescaleFactor = 1

if not options.inputFiles:
process.source.streamLabel = cms.untracked.string("streamDQMGPUvsCPU")
# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.source.streamLabel = "streamHIDQMGPUvsCPU"
else:
process.source.streamLabel = "streamDQMGPUvsCPU"

process.dqmEnv.subSystemFolder = 'Ecal'
process.dqmSaver.tag = 'EcalGPU'
Expand Down
36 changes: 21 additions & 15 deletions DQM/Integration/python/clients/hcalgpu_dqm_sourceclient-live_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,42 @@
useOfflineGT = False
useFileInput = False
useMap = False

unitTest = False
if 'unitTest=True' in sys.argv:
unitTest=True
useFileInput=False
unitTest = 'unitTest=True' in sys.argv

#-------------------------------------
# Central DQM Stuff imports
#-------------------------------------
from DQM.Integration.config.online_customizations_cfi import *

if useOfflineGT:
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = autoCond['run3_data_prompt']
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = autoCond['run3_data_prompt']
else:
process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
process.load('DQM.Integration.config.FrontierCondition_GT_cfi')

if unitTest:
process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
from DQM.Integration.config.unitteststreamerinputsource_cfi import options
process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
from DQM.Integration.config.unitteststreamerinputsource_cfi import options
elif useFileInput:
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options
else:
process.load('DQM.Integration.config.inputsource_cfi')
from DQM.Integration.config.inputsource_cfi import options
process.load('DQM.Integration.config.inputsource_cfi')
from DQM.Integration.config.inputsource_cfi import options

process.load('DQM.Integration.config.environment_cfi')

#-------------------------------------
# Central DQM Customization
#-------------------------------------
process.source.streamLabel = cms.untracked.string("streamDQMGPUvsCPU")

if not useFileInput:
# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.source.streamLabel = "streamHIDQMGPUvsCPU"
else:
process.source.streamLabel = "streamDQMGPUvsCPU"

process.dqmEnv.subSystemFolder = subsystem
process.dqmSaver.tag = 'HcalGPU'
process.dqmSaver.runNumber = options.runNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
# destinations = cms.untracked.vstring('cerr'),
#)

unitTest = 'unitTest=True' in sys.argv

unitTest=False
if 'unitTest=True' in sys.argv:
unitTest=True
#-----------------------------
if unitTest:
import FWCore.ParameterSet.VarParsing as VarParsing
Expand Down Expand Up @@ -97,16 +95,11 @@
process.source.firstRun = cms.untracked.uint32(options.runNumber)
process.source.firstLuminosityBlock = cms.untracked.uint32(1)
process.source.numberEventsInLuminosityBlock = cms.untracked.uint32(2)
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(100)
)
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(100))

else:
process.load("DQM.Integration.config.inputsource_cfi")
from DQM.Integration.config.inputsource_cfi import options
# for live online DQM in P5
# new stream label
#process.source.streamLabel = cms.untracked.string('streamDQMOnlineBeamspot')

#ESProducer
process.load("CondCore.CondDB.CondDB_cfi")
Expand Down Expand Up @@ -168,7 +161,6 @@
from DQM.Integration.config.online_customizations_cfi import *
process = customise(process)

process.p = cms.Path( process.dqmcommon * process.monitor )

process.p = cms.Path( process.dqmcommon
* process.monitor )
print("Final Source settings:", process.source)
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,42 @@
useOfflineGT = False
useFileInput = False
useMap = False

unitTest = False
if 'unitTest=True' in sys.argv:
unitTest=True
useFileInput=False
unitTest = 'unitTest=True' in sys.argv

#-------------------------------------
# Central DQM Stuff imports
#-------------------------------------
from DQM.Integration.config.online_customizations_cfi import *

if useOfflineGT:
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = autoCond['run3_data_prompt']
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = autoCond['run3_data_prompt']
else:
process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
process.load('DQM.Integration.config.FrontierCondition_GT_cfi')

if unitTest:
process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
from DQM.Integration.config.unitteststreamerinputsource_cfi import options
process.load("DQM.Integration.config.unitteststreamerinputsource_cfi")
from DQM.Integration.config.unitteststreamerinputsource_cfi import options
elif useFileInput:
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options
process.load("DQM.Integration.config.fileinputsource_cfi")
from DQM.Integration.config.fileinputsource_cfi import options
else:
process.load('DQM.Integration.config.inputsource_cfi')
from DQM.Integration.config.inputsource_cfi import options
process.load('DQM.Integration.config.inputsource_cfi')
from DQM.Integration.config.inputsource_cfi import options

process.load('DQM.Integration.config.environment_cfi')

#-------------------------------------
# Central DQM Customization
#-------------------------------------
process.source.streamLabel = cms.untracked.string("streamDQMGPUvsCPU")

if not useFileInput:
# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.source.streamLabel = "streamHIDQMGPUvsCPU"
else:
process.source.streamLabel = "streamDQMGPUvsCPU"

process.dqmEnv.subSystemFolder = subsystem
process.dqmSaver.tag = 'PixelGPU'
process.dqmSaver.runNumber = options.runNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
process = cms.Process('CTPPSDQM', Run3)

test = False
unitTest = False

if 'unitTest=True' in sys.argv:
unitTest=True
unitTest = 'unitTest=True' in sys.argv

# event source
if unitTest:
Expand All @@ -29,7 +26,7 @@
'drop *',
'keep FEDRawDataCollection_*_*_*'
)

process.source.streamLabel = "streamDQMPPSRandom"

# DQM environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
)
)

# stream label
if process.runType.getRunType() == process.runType.hi_run:
process.analyzer.streamLabels[0] = "streamHIDQM"

process.p = cms.Path(process.analyzer)
process.dqmsave_step = cms.Path(process.dqmEnv * process.dqmSaver)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
Example configuration for online reconstruction meant for visualization clients.
"""

unitTest = False
if 'unitTest=True' in sys.argv:
unitTest=True
unitTest = 'unitTest=True' in sys.argv

if unitTest:
from DQM.Integration.config.unittestinputsource_cfi import options, runType, source
Expand Down Expand Up @@ -73,9 +71,15 @@
process.source.skipFirstLumis = True
process.source.minEventsPerLumi = 0
process.source.nextLumiTimeoutMillis = 10000
process.source.streamLabel = 'streamDQMEventDisplay'
if options.BeamSplashRun :
set_BeamSplashRun_settings( process.source )

if options.BeamSplashRun:
set_BeamSplashRun_settings( process.source )

# stream label
if runType.getRunType() == runType.hi_run:
process.source.streamLabel = "streamHIDQMEventDisplay"
else:
process.source.streamLabel = "streamDQMEventDisplay"

m = re.search(r"\((\w+)\)", str(source.runNumber))
runno = str(m.group(1))
Expand Down
1 change: 0 additions & 1 deletion DQM/Integration/python/clients/visualization-live_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
process.source.skipFirstLumis = True
process.source.minEventsPerLumi = 0
process.source.nextLumiTimeoutMillis = 10000
process.source.streamLabel = 'streamDQM'
if options.BeamSplashRun :
set_BeamSplashRun_settings( process.source )

Expand Down
15 changes: 11 additions & 4 deletions DQM/Integration/python/config/inputsource_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,30 @@

runType = RunType()
if not options.runkey.strip():
options.runkey = 'pp_run'
options.runkey = 'pp_run'

runType.setRunType(options.runkey.strip())

if not options.inputFiles:
# Input source
nextLumiTimeoutMillis = 240000
endOfRunKills = True

if options.scanOnce:
endOfRunKills = False
nextLumiTimeoutMillis = 0


# stream label
if runType.getRunType() == runType.hi_run:
streamLabel = 'streamHIDQM'
else:
streamLabel = 'streamDQM'

source = cms.Source("DQMStreamerReader",
runNumber = cms.untracked.uint32(options.runNumber),
runInputDir = cms.untracked.string(options.runInputDir),
SelectEvents = cms.untracked.vstring('*'),
streamLabel = cms.untracked.string('streamDQM'),
streamLabel = cms.untracked.string(streamLabel),
scanOnce = cms.untracked.bool(options.scanOnce),
datafnPosition = cms.untracked.uint32(options.datafnPosition),
minEventsPerLumi = cms.untracked.int32(1),
Expand All @@ -117,6 +123,7 @@
endOfRunKills = cms.untracked.bool(endOfRunKills),
inputFileTransitionsEachEvent = cms.untracked.bool(False)
)

else:
print("The list of input files is provided. Disabling discovery and running on everything.")
files = ["file://" + x for x in options.inputFiles]
Expand Down
Loading

0 comments on commit 8665f3d

Please sign in to comment.