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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
from __future__ import print_function
#
# cfg file to run online L1 Trigger emulator DQM
# the user can choose the environment (live, playback, file-P5, file)
# for 'file, one can also choose the global tag type and the actual tag
#
# V M Ghete 2010-07-09
import FWCore.ParameterSet.Config as cms
import sys
# choose the environment you run
#l1DqmEnv = 'live'
#l1DqmEnv = 'playback'
#l1DqmEnv = 'file-P5'
l1DqmEnv = 'file'
# for 'file' choose also the type of the global tag and (edit) the actual global tag
if l1DqmEnv == 'file' :
globalTagType = 'HLT'
#globalTagType = 'P'
#globalTagType = 'E'
#globalTagType = 'R'
if globalTagType == 'HLT' :
globalTagValue = 'GR_H_V26'
elif globalTagType == 'P' :
globalTagValue = 'GR_P_V29'
elif globalTagType == 'E' :
globalTagValue = 'GR_E_V23'
elif globalTagType == 'R' :
globalTagValue = 'GR_R_52_V4'
else :
print('No valid global tag type', globalTagType)
print('Valid types: HLT, P, E, R')
sys.exit()
process = cms.Process("L1TEmuDQM")
# check that a valid choice for environment exists
if not ((l1DqmEnv == 'live') or l1DqmEnv == 'playback' or l1DqmEnv == 'file-P5' or l1DqmEnv == 'file' ) :
print('No valid input source was chosen. Your value for l1DqmEnv input parameter is:')
print('l1DqmEnv = ', l1DqmEnv)
print('Available options: "live", "playback", "file-P5", "file" ')
sys.exit()
#----------------------------
# Event Source
#
if l1DqmEnv == 'live' :
process.load("DQM.Integration.test.inputsource_cfi")
process.EventStreamHttpReader.SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring("*")
)
process.EventStreamHttpReader.consumerName = 'L1TEMU DQM Consumer'
process.EventStreamHttpReader.maxEventRequestRate = cms.untracked.double(25.0)
elif l1DqmEnv == 'playback' :
print('FIXME')
sys.exit()
else :
# running on a file
process.load("DQM.L1TMonitor.inputsource_file_cfi")
#----------------------------
# DQM Environment
#
process.load("DQMServices.Core.DQM_cfg")
process.load("DQMServices.Components.DQMEnvironment_cfi")
process.dqmEnv.subSystemFolder = 'L1TEMU'
if l1DqmEnv == 'live' :
process.load("DQM.Integration.test.environment_cfi")
# no references needed
#
# load and configure modules via Global Tag
# https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)
elif l1DqmEnv == 'playback' :
print('FIXME')
elif l1DqmEnv == 'file-P5' :
process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)
else :
# running on a file, on lxplus (not on .cms)
process.load("DQM.L1TMonitor.environment_file_cff")
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
if globalTagType == 'HLT' :
process.GlobalTag.connect = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'
process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/')
process.GlobalTag.globaltag = globalTagValue+'::All'
es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
#process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
#-------------------------------------
# sequences needed for L1 emulator DQM
#
# standard unpacking sequence
process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
# L1 data - emulator sequences
process.load("DQM.L1TMonitor.L1TEmulatorMonitor_cff")
process.load("DQM.L1TMonitorClient.L1TEMUMonitorClient_cff")
#-------------------------------------
# paths & schedule for L1 emulator DQM
#
# TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence
# to avoid all these remove
process.rawToDigiPath = cms.Path(process.RawToDigi)
#
process.RawToDigi.remove("siPixelDigis")
process.RawToDigi.remove("siStripDigis")
process.RawToDigi.remove("scalersRawToDigi")
process.RawToDigi.remove("castorDigis")
# L1HvVal + emulator monitoring path
process.l1HwValEmulatorMonitorPath = cms.Path(process.l1HwValEmulatorMonitor)
# for RCT at P5, read FED vector from OMDS
if ( l1DqmEnv != 'file' ) :
process.load("L1TriggerConfig.RCTConfigProducers.l1RCTOmdsFedVectorProducer_cfi")
process.valRctDigis.getFedsFromOmds = cms.bool(True)
#
process.l1EmulatorMonitorClientPath = cms.Path(process.l1EmulatorMonitorClient)
#
process.l1EmulatorMonitorEndPath = cms.EndPath(process.dqmEnv*process.dqmSaver)
#
#
process.schedule = cms.Schedule(process.rawToDigiPath,
process.l1HwValEmulatorMonitorPath,
process.l1EmulatorMonitorClientPath,
process.l1EmulatorMonitorEndPath)
#---------------------------------------------
# examples for quick fixes in case of troubles
# please do not modify the commented lines
#
# remove a module from hardware validation
# cff file: L1Trigger.HardwareValidation.L1HardwareValidation_cff
#
# process.L1HardwareValidation.remove("deCsctf")
#
process.L1HardwareValidation.remove(process.deDt)
#
# remove a L1 trigger system from the comparator integrated in hardware validation
# cfi file: L1Trigger.HardwareValidation.L1Comparator_cfi
# remove (consistently) the same systems from L1TDEMON
# cfi file: DQM.L1TMonitor.L1TDEMON_cfi
#
#
# process.l1compare.COMPARE_COLLS = [
# 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0
# ]
# # ETP,HTP,RCT,GCT, DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
#
# process.l1demon.COMPARE_COLLS = [
# 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0
# ]
# # ETP,HTP,RCT,GCT, DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
#
# remove an expert module for L1 trigger system
# cff file: DQM.L1TMonitor.L1TEmulatorMonitor_cff
#
# process.l1ExpertDataVsEmulator.remove(process.l1GtHwValidation)
#
#process.l1ExpertDataVsEmulator.remove(process.l1TdeCSCTF)
#
# remove a module / sequence from l1EmulatorMonitorClient
# cff file: DQM.L1TMonitorClient.L1TEmulatorMonitorClient_cff
#
# process.l1EmulatorMonitorClient.remove(process.l1EmulatorErrorFlagClient)
#
#
# fast over-mask a system in L1TEMUEventInfoClient:
# if the name of the system is in the list, the system will be masked
# (the default mask value is given in L1Systems VPSet)
#
# names are case sensitive, order is irrelevant
# "ECAL", "HCAL", "RCT", "GCT", "DTTF", "DTTPG", "CSCTF", "CSCTPG", "RPC", "GMT", "GT"
#
# process.l1temuEventInfoClient.MaskL1Systems = cms.vstring("ECAL")
#
#
# fast over-mask an object in L1TEMUEventInfoClient:
# if the name of the object is in the list, the object will be masked
# (the default mask value is given in L1Objects VPSet)
#
# names are case sensitive, order is irrelevant
#
# "Mu", "NoIsoEG", "IsoEG", "CenJet", "ForJet", "TauJet", "ETM", "ETT", "HTT", "HTM",
# "HfBitCounts", "HfRingEtSums", "TechTrig", "GtExternal
#
# process.l1temuEventInfoClient.MaskL1Objects = cms.vstring("ETM")
#
#
# turn on verbosity in L1TEMUEventInfoClient
#
# process.l1EmulatorEventInfoClient.verbose = cms.untracked.bool(True)
print("Running with run type = ", process.runType.getRunType())
process.castorDigis.InputLabel = cms.InputTag("rawDataCollector")
process.csctfDigis.producer = cms.InputTag("rawDataCollector")
process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector")
process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector")
process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector")
process.rctDigis.inputLabel = cms.InputTag("rawDataCollector")
process.gctDigis.inputLabel = cms.InputTag("rawDataCollector")
process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector")
process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector")
process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector")
process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataCollector")
process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataCollector")
process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector")
process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector")
process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector")
process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector")
process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector")
#--------------------------------------------------
# Heavy Ion Specific Fed Raw Data Collection Label
#--------------------------------------------------
if (process.runType.getRunType() == process.runType.hi_run):
process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.csctfDigis.producer = cms.InputTag("rawDataRepacker")
process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker")
process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker")
process.rctDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker")
process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker")
process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataRepacker")
process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataRepacker")
process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker")
process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker")
process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker")
|