-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathhcalgpu_dqm_sourceclient-live_cfg.py
155 lines (135 loc) · 5.09 KB
/
hcalgpu_dqm_sourceclient-live_cfg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#-------------------------------------
# Hcal DQM Application using New DQM Sources/Clients
#-------------------------------------
#-------------------------------------
# Standard Python Imports
#-------------------------------------
import os, sys, socket, string
#-------------------------------------
# Standard CMSSW Imports/Definitions
#-------------------------------------
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process('HCALDQM', Run3)
subsystem = 'Hcal'
cmssw = os.getenv("CMSSW_VERSION").split("_")
debugstr = "### HcalDQM::cfg::DEBUG: "
warnstr = "### HcalDQM::cfg::WARN: "
errorstr = "### HcalDQM::cfg::ERROR:"
useOfflineGT = False
useFileInput = False
useMap = 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']
else:
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
elif useFileInput:
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.environment_cfi')
#-------------------------------------
# Central DQM Customization
#-------------------------------------
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
# process.dqmSaverPB.tag = 'HcalGPU'
# process.dqmSaverPB.runNumber = options.runNumber
process = customise(process)
process.DQMStore.verbose = 0
if not unitTest and not useFileInput :
if not options.BeamSplashRun :
process.source.minEventsPerLumi = 100
#-------------------------------------
# CMSSW/Hcal non-DQM Related Module import
#-------------------------------------
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load('FWCore.MessageLogger.MessageLogger_cfi')
process.load("EventFilter.HcalRawToDigi.HcalRawToDigi_cfi")
process.load('EventFilter.CastorRawToDigi.CastorRawToDigi_cff')
process.load("SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff")
#-------------------------------------
# CMSSW/Hcal non-DQM Related Module Settings
# -> runType
# -> Generic Input tag for the Raw Collection
# -> cmssw version
# -> Turn off default blocking of dead channels from rechit collection
# -> Drop Channel Status Bits (had benn 'HcalCellOff', "HcalCellDead")
# -> For Trigger Primitives Emulation
# -> L1 GT setting
# -> Rename the hbheprereco to hbhereco
#-------------------------------------
runType = process.runType.getRunType()
runTypeName = process.runType.getRunTypeName()
isCosmicRun = runTypeName=="cosmic_run" or runTypeName=="cosmic_run_stage1"
isHeavyIon = runTypeName=="hi_run"
cmssw = os.getenv("CMSSW_VERSION").split("_")
#-------------------------------------
# Hcal DQM Tasks and Harvesters import
# New Style
#-------------------------------------
process.load('DQM.HcalTasks.hcalGPUComparisonTask_cfi')
process.load('DQM.HcalTasks.HcalOnlineHarvesting_cfi')
process.load('DQM.HcalTasks.HcalQualityTests_cfi')
#-------------------------------------
# Some Settings before Finishing up
# New Style Modules
#-------------------------------------
oldsubsystem = subsystem
process.hcalGPUComparisonTask.tagHBHE_ref = "hltHbherecoSerialSync"
process.hcalGPUComparisonTask.tagHBHE_target = "hltHbhereco"
process.hcalGPUComparisonTask.runkeyVal = runType
process.hcalGPUComparisonTask.runkeyName = runTypeName
#-------------------------------------
# Hcal DQM Tasks/Clients Sequences Definition
#-------------------------------------
process.tasksPath = cms.Path(
process.hcalGPUComparisonTask
)
#-------------------------------------
# Paths/Sequences Definitions
#-------------------------------------
process.dqmPath = cms.EndPath(
process.dqmEnv)
process.dqmPath1 = cms.EndPath(
process.dqmSaver
#*process.dqmSaverPB
)
process.schedule = cms.Schedule(
process.tasksPath,
process.dqmPath,
process.dqmPath1
)
#-------------------------------------
# Scheduling and Process Customizations
#-------------------------------------
process.options = cms.untracked.PSet(
Rethrow = cms.untracked.vstring(
"ProductNotFound",
"TooManyProducts",
"TooFewProducts"
)
)
process.options.wantSummary = True
# tracer
#process.Tracer = cms.Service("Tracer")
print("Final Source settings:", process.source)
process = customise(process)