CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
confdb.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import sys
4 import re
5 import os
6 import urllib, urllib2
7 from pipe import pipe as _pipe
8 from options import globalTag
9 from itertools import islice
10 
11 def splitter(iterator, n):
12  i = iterator.__iter__()
13  while True:
14  l = list(islice(i, n))
15  if l:
16  yield l
17  else:
18  break
19 
20 
22  # paths not supported by FastSim
23  fastsimUnsupportedPaths = (
24 
25  # paths for which a recovery is not foreseen/possible
26  "AlCa_EcalEta_v*",
27  "AlCa_EcalPhiSym_v*",
28  "AlCa_EcalPi0_v*",
29  "AlCa_EcalPi0EBonly_v*",
30  "AlCa_EcalPi0EEonly_v*",
31  "AlCa_EcalEtaEBonly_v*",
32  "AlCa_EcalEtaEEonly_v*",
33  "AlCa_RPCMuonNoHits_v*",
34  "AlCa_RPCMuonNoTriggers_v*",
35  "AlCa_RPCMuonNormalisation_v*",
36  "AlCa_LumiPixels_v*",
37  "AlCa_LumiPixels_Random_v*",
38  "AlCa_LumiPixels_ZeroBias_v*",
39  "DQM_FEDIntegrity_v*",
40  "DQM_HcalEmptyEvents_v*",
41  "HLT_Calibration_v*",
42  "HLT_EcalCalibration_v*",
43  "HLT_HcalCalibration_v*",
44  "HLT_TrackerCalibration_v*",
45  "HLT_DTErrors_v*",
46  "HLT_DTCalibration_v*",
47  "HLT_Random_v*",
48  "HLT_HcalNZS_v*",
49  "HLT_HcalPhiSym_v*",
50  "HLT_IsoTrackHB_v*",
51  "HLT_IsoTrackHE_v*",
52  "HLT_L1SingleMuOpen_AntiBPTX_v*",
53  "HLT_JetE30_NoBPTX*_v*",
54  "HLT_JetE50_NoBPTX*_v*",
55  "HLT_JetE50_NoBPTX3BX_NoHalo_v*",
56  "HLT_JetE70_NoBPTX3BX_NoHalo_v*",
57  "HLT_L2Mu10_NoVertex_NoBPTX3BX_NoHalo_v*",
58  "HLT_L2Mu20_NoVertex_NoBPTX3BX_NoHalo_v*",
59  "HLT_L2Mu30_NoVertex_NoBPTX3BX_NoHalo_v*",
60  "HLT_JetE30_NoBPTX3BX_v*",
61  "HLT_JetE50_NoBPTX3BX_v*",
62  "HLT_JetE70_NoBPTX3BX_v*",
63  "HLT_L2Mu10_NoVertex_NoBPTX3BX_v*",
64  "HLT_L2Mu10_NoVertex_NoBPTX3BX_v*",
65  "HLT_L2Mu10_NoVertex_NoBPTX3BX_v*",
66  "HLT_L2Mu20_NoVertex_NoBPTX3BX_v*",
67  "HLT_L2Mu30_NoVertex_NoBPTX3BX_v*",
68  "HLT_L2Mu20_NoVertex_2Cha_NoBPTX3BX_NoHalo_v*",
69  "HLT_L2Mu30_NoVertex_2Cha_NoBPTX3BX_NoHalo_v*",
70  "HLT_PixelTracks_Multiplicity70_v*",
71  "HLT_PixelTracks_Multiplicity80_v*",
72  "HLT_PixelTracks_Multiplicity90_v*",
73  "HLT_BeamGas_HF_Beam1_v*",
74  "HLT_BeamGas_HF_Beam2_v*",
75  "HLT_BeamHalo_v*",
76  "HLT_L1Tech_CASTOR_HaloMuon_v*",
77  "HLT_L1Tech_DT_GlobalOR_v*",
78  "HLT_GlobalRunHPDNoise_v*",
79  "HLT_L1Tech_HBHEHO_totalOR_v*",
80  "HLT_L1Tech_HCAL_HF_single_channel_v*",
81  "HLT_L1TrackerCosmics_v*",
82  "HLT_HcalUTCA_v*",
83 
84 # TODO: paths not supported by FastSim, but for which a recovery should be attempted
85 
86  "HLT_DoubleMediumIsoPFTau30_Trk1_eta2p1_Reg_Jet30_v*",
87  "HLT_DoubleMediumIsoPFTau30_Trk1_eta2p1_Reg_v*",
88  "HLT_DoubleMediumIsoPFTau35_Trk1_eta2p1_Prong1_Reg_v*",
89  "HLT_DoubleMediumIsoPFTau35_Trk1_eta2p1_Reg_v*",
90  "HLT_IsoMu18_eta2p1_MediumIsoPFTau25_Trk1_eta2p1_Reg_v*",
91 # (not really needed for the five above, because the corresponding paths without regional
92 # tracking are already in the HLT menu)
93 
94  )
95 
96  def __init__(self, configuration):
97  self.config = configuration
98  self.data = None
99  self.source = None
100  self.parent = None
101 
102  self.options = {
103  'essources' : [],
104  'esmodules' : [],
105  'modules' : [],
106  'sequences' : [],
107  'services' : [],
108  'paths' : [],
109  'psets' : [],
110  'blocks' : [],
111  }
112 
113  self.labels = {}
114  if self.config.fragment:
115  self.labels['process'] = ''
116  self.labels['dict'] = 'locals()'
117  else:
118  self.labels['process'] = 'process.'
119  self.labels['dict'] = 'process.__dict__'
120 
121  if self.config.online:
122  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
123  else:
124  self.labels['connect'] = 'frontier://FrontierProd'
125 
126  # get the configuration from ConfdB
127  self.buildPathList()
128  self.buildOptions()
130  self.customize()
131 
132 
134  url = 'http://cms-project-confdb-hltdev.web.cern.ch/cms-project-confdb-hltdev/get.jsp'
135  postdata = dict([ (key, ','.join(vals)) for key, vals in self.options.iteritems() if vals ])
136  postdata['noedsources'] = ''
137  if self.config.fragment:
138  postdata['cff'] = ''
139  if self.config.menu.run:
140  postdata['runNumber'] = self.config.menu.run
141  else:
142  postdata['dbName'] = self.config.menu.db
143  postdata['configName']= self.config.menu.name
144 
145  data = urllib2.urlopen(url, urllib.urlencode(postdata)).read()
146  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
147  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
148  self.data = data
149 
150 
151  def getPathList(self):
152  url = 'http://cms-project-confdb-hltdev.web.cern.ch/cms-project-confdb-hltdev/get.jsp'
153  postdata = {
154  'noedsources': '',
155  'noes': '',
156  'noservices': '',
157  'nosequences': '',
158  'nomodules' : '',
159  'cff': '',
160  }
161  if self.config.menu.run:
162  postdata['runNumber'] = self.config.menu.run
163  else:
164  postdata['dbName'] = self.config.menu.db
165  postdata['configName']= self.config.menu.name
166 
167  data = urllib2.urlopen(url, urllib.urlencode(postdata)).read()
168  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
169  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
170  filter = re.compile(r' *= *cms.(End)?Path.*')
171  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
172  return paths
173 
174 
175  @staticmethod
176  def expandWildcards(globs, collection):
177  # expand a list of unix-style wildcards matching a given collection
178  # wildcards with no matches are silently discarded
179  matches = []
180  for glob in globs:
181  negate = ''
182  if glob[0] == '-':
183  negate = '-'
184  glob = glob[1:]
185  # translate a unix-style glob expression into a regular expression
186  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
187  matches.extend( negate + element for element in collection if filter.match(element) )
188  return matches
189 
190 
191  @staticmethod
192  def consolidateNegativeList(elements):
193  # consolidate a list of path exclusions and re-inclusions
194  # the result is the list of paths to be removed from the dump
195  result = set()
196  for element in elements:
197  if element[0] == '-':
198  result.add( element )
199  else:
200  result.discard( '-' + element )
201  return sorted( element for element in result )
202 
203  @staticmethod
204  def consolidatePositiveList(elements):
205  # consolidate a list of path selection and re-exclusions
206  # the result is the list of paths to be included in the dump
207  result = set()
208  for element in elements:
209  if element[0] == '-':
210  result.discard( element[1:] )
211  else:
212  result.add( element )
213  return sorted( element for element in result )
214 
215 
216  # dump the final configuration
217  def dump(self):
218  return self.data % self.labels
219 
220 
221  # add release-specific customizations
223  # version specific customizations
224  self.data += """
225 # CMSSW version specific customizations
226 import os
227 cmsswVersion = os.environ['CMSSW_VERSION']
228 
229 # customization for CMSSW_5_2_X
230 if cmsswVersion.startswith('CMSSW_5_2_'):
231 
232  # force the use of the correct calo jet energy corrections
233  if 'hltESPL1FastJetCorrectionESProducer' in %(dict)s:
234  %(process)shltESPL1FastJetCorrectionESProducer.algorithm = "AK5CaloHLT"
235 
236  if 'hltESPL2RelativeCorrectionESProducer' in %(dict)s:
237  %(process)shltESPL2RelativeCorrectionESProducer.algorithm = "AK5CaloHLT"
238 
239  if 'hltESPL3AbsoluteCorrectionESProducer' in %(dict)s:
240  %(process)shltESPL3AbsoluteCorrectionESProducer.algorithm = "AK5CaloHLT"
241 
242 
243 # customization for CMSSW_5_3_X
244 if cmsswVersion.startswith('CMSSW_5_3_'):
245 
246  # do not override the calo jet energy corrections in 5.3.x for consistency with the current MC samples
247  pass
248 
249 
250 # customization for CMSSW_6_1_X and 6_2_X
251 if cmsswVersion.startswith('CMSSW_6_1_') or cmsswVersion.startswith('CMSSW_6_2_'):
252 
253  # force the use of the correct calo jet energy corrections
254  if 'hltESPL1FastJetCorrectionESProducer' in %(dict)s:
255  %(process)shltESPL1FastJetCorrectionESProducer.algorithm = "AK5CaloHLT"
256 
257  if 'hltESPL2RelativeCorrectionESProducer' in %(dict)s:
258  %(process)shltESPL2RelativeCorrectionESProducer.algorithm = "AK5CaloHLT"
259 
260  if 'hltESPL3AbsoluteCorrectionESProducer' in %(dict)s:
261  %(process)shltESPL3AbsoluteCorrectionESProducer.algorithm = "AK5CaloHLT"
262 
263  # adapt the HLT menu to the "prototype for Event Interpretation" development
264  if 'hltPFPileUp' in %(dict)s:
265  # define new PFCandidateFwdPtrProducer module
266  %(process)shltParticleFlowPtrs = cms.EDProducer("PFCandidateFwdPtrProducer",
267  src = cms.InputTag('hltParticleFlow')
268  )
269  # add the new module before the hltPFPileUp module
270  _sequence = None
271  for _sequence in [ _sequence for _sequence in %(dict)s.itervalues() if isinstance(_sequence, cms._ModuleSequenceType)]:
272  try:
273  _sequence.insert( _sequence.index(%(process)shltPFPileUp), %(process)shltParticleFlowPtrs )
274  except ValueError:
275  pass
276  # reconfigure hltPFPileUp and hltPFNoPileUp to use the new module
277  %(process)shltPFPileUp.PFCandidates = cms.InputTag( "hltParticleFlowPtrs" )
278  %(process)shltPFNoPileUp.bottomCollection = cms.InputTag( "hltParticleFlowPtrs" )
279 
280  # postLS1 muon extension
281  # /CalibMuon/CSCCalibration/python/CSCIndexer_cfi.py
282  %(process)sCSCIndexerESSource = cms.ESSource("EmptyESSource",
283  recordName = cms.string("CSCIndexerRecord"),
284  firstValid = cms.vuint32(1),
285  iovIsRunNotTime = cms.bool(True)
286  )
287  %(process)sCSCIndexerESProducer = cms.ESProducer("CSCIndexerESProducer",
288  AlgoName = cms.string("CSCIndexerStartup")
289  )
290  # /CalibMuon/CSCCalibration/python/CSCChannelMapper_cfi.py
291  %(process)sCSCChannelMapperESSource = cms.ESSource("EmptyESSource",
292  recordName = cms.string("CSCChannelMapperRecord"),
293  firstValid = cms.vuint32(1),
294  iovIsRunNotTime = cms.bool(True)
295  )
296  %(process)sCSCChannelMapperESProducer = cms.ESProducer("CSCChannelMapperESProducer",
297  AlgoName = cms.string("CSCChannelMapperStartup")
298  )
299 
300 # customization for CMSSW_6_2_X only
301 if cmsswVersion.startswith('CMSSW_6_2_'):
302  # /Geometry/TrackerNumberingBuilder/trackerTopologyConstants_cfi.py
303  %(process)strackerTopologyConstants = cms.ESProducer('TrackerTopologyEP',
304  pxb_layerStartBit = cms.uint32(16),
305  pxb_ladderStartBit = cms.uint32(8),
306  pxb_moduleStartBit = cms.uint32(2),
307  pxb_layerMask = cms.uint32(15),
308  pxb_ladderMask = cms.uint32(255),
309  pxb_moduleMask = cms.uint32(63),
310  pxf_sideStartBit = cms.uint32(23),
311  pxf_diskStartBit = cms.uint32(16),
312  pxf_bladeStartBit = cms.uint32(10),
313  pxf_panelStartBit = cms.uint32(8),
314  pxf_moduleStartBit = cms.uint32(2),
315  pxf_sideMask = cms.uint32(3),
316  pxf_diskMask = cms.uint32(15),
317  pxf_bladeMask = cms.uint32(63),
318  pxf_panelMask = cms.uint32(3),
319  pxf_moduleMask = cms.uint32(63),
320  tec_sideStartBit = cms.uint32(18),
321  tec_wheelStartBit = cms.uint32(14),
322  tec_petal_fw_bwStartBit = cms.uint32(12),
323  tec_petalStartBit = cms.uint32(8),
324  tec_ringStartBit = cms.uint32(5),
325  tec_moduleStartBit = cms.uint32(2),
326  tec_sterStartBit = cms.uint32(0),
327  tec_sideMask = cms.uint32(3),
328  tec_wheelMask = cms.uint32(15),
329  tec_petal_fw_bwMask = cms.uint32(3),
330  tec_petalMask = cms.uint32(15),
331  tec_ringMask = cms.uint32(7),
332  tec_moduleMask = cms.uint32(7),
333  tec_sterMask = cms.uint32(3),
334  tib_layerStartBit = cms.uint32(14),
335  tib_str_fw_bwStartBit = cms.uint32(12),
336  tib_str_int_extStartBit = cms.uint32(10),
337  tib_strStartBit = cms.uint32(4),
338  tib_moduleStartBit = cms.uint32(2),
339  tib_sterStartBit = cms.uint32(0),
340  tib_layerMask = cms.uint32(7),
341  tib_str_fw_bwMask = cms.uint32(3),
342  tib_str_int_extMask = cms.uint32(3),
343  tib_strMask = cms.uint32(63),
344  tib_moduleMask = cms.uint32(3),
345  tib_sterMask = cms.uint32(3),
346  tid_sideStartBit = cms.uint32(13),
347  tid_wheelStartBit = cms.uint32(11),
348  tid_ringStartBit = cms.uint32(9),
349  tid_module_fw_bwStartBit = cms.uint32(7),
350  tid_moduleStartBit = cms.uint32(2),
351  tid_sterStartBit = cms.uint32(0),
352  tid_sideMask = cms.uint32(3),
353  tid_wheelMask = cms.uint32(3),
354  tid_ringMask = cms.uint32(3),
355  tid_module_fw_bwMask = cms.uint32(3),
356  tid_moduleMask = cms.uint32(31),
357  tid_sterMask = cms.uint32(3),
358  tob_layerStartBit = cms.uint32(14),
359  tob_rod_fw_bwStartBit = cms.uint32(12),
360  tob_rodStartBit = cms.uint32(5),
361  tob_moduleStartBit = cms.uint32(2),
362  tob_sterStartBit = cms.uint32(0),
363  tob_layerMask = cms.uint32(7),
364  tob_rod_fw_bwMask = cms.uint32(3),
365  tob_rodMask = cms.uint32(127),
366  tob_moduleMask = cms.uint32(7),
367  tob_sterMask = cms.uint32(3),
368  appendToDataLabel = cms.string('')
369  )
370 
371 """
372 
373  # customize the configuration according to the options
374  def customize(self):
375 
376  # adapt the source to the current scenario
377  if not self.config.fragment:
378  self.build_source()
379 
380  # manual override some parameters
381  if self.config.type in ('GRun', ):
382  self.data += """
383 # Enable HF Noise filters in GRun menu
384 if 'hltHfreco' in %(dict)s:
385  %(process)shltHfreco.setNoiseFlags = cms.bool( True )
386 """
387  if self.config.type in ('HIon', ):
388  self.data += """
389 # Disable HF Noise filters in HIon menu
390 if 'hltHfreco' in %(dict)s:
391  %(process)shltHfreco.setNoiseFlags = cms.bool( False )
392 """
393 
394 # self.data += """
395 ## untracked parameters with NO default in the code
396 #if 'hltHcalDataIntegrityMonitor' in %(dict)s:
397 # %(process)shltHcalDataIntegrityMonitor.RawDataLabel = cms.untracked.InputTag("rawDataCollector")
398 #if 'hltDt4DSegments' in %(dict)s:
399 # %(process)shltDt4DSegments.debug = cms.untracked.bool( False )
400 #"""
401 
402  # if requested, override the L1 self from the GlobalTag (Xml)
403  self.overrideL1MenuXml()
404 
405  # if running on MC, adapt the configuration accordingly
406  self.fixForMC()
407 
408  # if requested, remove the HLT prescales
409  self.fixPrescales()
410 
411  # if requested, override all ED/HLTfilters to always pass ("open" mode)
412  self.instrumentOpenMode()
413 
414  # if requested, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
415  self.instrumentErrorEventType()
416 
417  # if requested, instrument the self with the modules and EndPath needed for timing studies
418  self.instrumentTiming()
419 
420  # add version-specific customisations
422 
423  if self.config.fragment:
424 
425 # self.data += """
426 ## dummyfy hltGetConditions in cff's
427 #if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
428 # %(process)shltDummyConditions = cms.EDFilter( "HLTBool",
429 # result = cms.bool( True )
430 # )
431 # %(process)sHLTriggerFirstPath.replace(%(process)shltGetConditions,%(process)shltDummyConditions)
432 #"""
433 
434  # if requested, adapt the configuration for FastSim
435  self.fixForFastSim()
436 
437  else:
438 
439  # override the process name and adapt the relevant filters
440  self.overrideProcessName()
441 
442  # override the output modules to output root files
443  self.overrideOutput()
444 
445  # add global options
446  self.addGlobalOptions()
447 
448  # if requested or necessary, override the GlobalTag and connection strings (incl. L1!)
449  self.overrideGlobalTag()
450 
451  # if requested, run (part of) the L1 emulator
452  self.runL1Emulator()
453 
454  # request summary informations from the MessageLogger
455  self.updateMessageLogger()
456 
457  # load 5.2.x JECs, until they are in the GlobalTag
458 # self.loadAdditionalConditions('load 5.2.x JECs',
459 # {
460 # 'record' : 'JetCorrectionsRecord',
461 # 'tag' : 'JetCorrectorParametersCollection_AK5Calo_2012_V8_hlt_mc',
462 # 'label' : 'AK5CaloHLT',
463 # 'connect' : '%(connect)s/CMS_COND_31X_PHYSICSTOOLS'
464 # }, {
465 # 'record' : 'JetCorrectionsRecord',
466 # 'tag' : 'JetCorrectorParametersCollection_AK5PF_2012_V8_hlt_mc',
467 # 'label' : 'AK5PFHLT',
468 # 'connect' : '%(connect)s/CMS_COND_31X_PHYSICSTOOLS'
469 # }, {
470 # 'record' : 'JetCorrectionsRecord',
471 # 'tag' : 'JetCorrectorParametersCollection_AK5PFchs_2012_V8_hlt_mc',
472 # 'label' : 'AK5PFchsHLT',
473 # 'connect' : '%(connect)s/CMS_COND_31X_PHYSICSTOOLS'
474 # }
475 # )
476 
477 
478  def addGlobalOptions(self):
479  # add global options
480  self.data += """
481 # limit the number of events to be processed
482 %%(process)smaxEvents = cms.untracked.PSet(
483  input = cms.untracked.int32( %d )
484 )
485 """ % self.config.events
486 
487  if not self.config.profiling:
488  self.data += """
489 # enable the TrigReport and TimeReport
490 %(process)soptions = cms.untracked.PSet(
491  wantSummary = cms.untracked.bool( True )
492 )
493 """
494 
495 
496  def _fix_parameter(self, **args):
497  """arguments:
498  name: parameter name (optional)
499  type: parameter type (look for tracked and untracked variants)
500  value: original value
501  replace: replacement value
502  """
503  if 'name' in args:
504  self.data = re.sub(
505  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
506  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
507  self.data)
508  else:
509  self.data = re.sub(
510  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
511  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
512  self.data)
513 
514 
515  def fixForMC(self):
516  if not self.config.data:
517  # customise the HLT menu for running on MC
518  if not self.config.fragment:
519  self.data += """
520 # customise the HLT menu for running on MC
521 from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
522 process = customizeHLTforMC(process)
523 """
524 
525 
526  def fixForFastSim(self):
527  if self.config.fastsim:
528  # adapt the hle configuration (fragment) to run under fastsim
529  self.data = re.sub( r'import FWCore.ParameterSet.Config as cms', r'\g<0>\nfrom FastSimulation.HighLevelTrigger.HLTSetup_cff import *', self.data)
530 
531  # remove the definition of streams and datasets
532  self.data = re.compile( r'^streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
533  self.data = re.compile( r'^datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
534 
535  # fix the definition of module
536  # FIXME: this should be updated to take into accout the --l1-emulator option
537  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
538  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'gmtDigis')
539  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'gtDigis')
540  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'gtDigis')
541  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
542  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
543  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
544  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
545  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
546  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
547  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
548  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
549  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
550  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
551 
552  # fix the definition of sequences and paths
553  self.data = re.sub( r'hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
554  self.data = re.sub( r'hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
555  self.data = re.sub( r'hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
556  self.data = re.sub( r'HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
557  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
558 
559 
560  def fixPrescales(self):
561  # update the PrescaleService to match the new list of paths
562  if self.options['paths']:
563  if self.options['paths'][0][0] == '-':
564  # drop requested paths
565  for minuspath in self.options['paths']:
566  path = minuspath[1:]
567  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
568  else:
569  # keep requested paths
570  for path in self.all_paths:
571  if path not in self.options['paths']:
572  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
573 
574  if self.config.unprescale:
575  self.data += """
576 # remove the HLT prescales
577 if 'PrescaleService' in %(dict)s:
578  %(process)sPrescaleService.lvl1DefaultLabel = cms.string( '0' )
579  %(process)sPrescaleService.lvl1Labels = cms.vstring( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' )
580  %(process)sPrescaleService.prescaleTable = cms.VPSet( )
581 """
582 
583 
585  if self.config.open:
586  # find all EDfilters
587  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
588  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
589  # remove existing 'cms.ingore' and '~' modifiers
590  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
591  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
592  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
593  for some in splitter(filters, 1000):
594  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
595  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
596 
597 
599  if self.config.errortype:
600  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
601  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
602  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
603  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
604 
605 
606  def overrideGlobalTag(self):
607  # overwrite GlobalTag
608  # the logic is:
609  # - always set the correct connection string and pfnPrefix
610  # - if a GlobalTag is specified on the command line:
611  # - override the global tag
612  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
613  # - if a GlobalTag is NOT specified on the command line:
614  # - when running on data, do nothing, and keep the global tag in the menu
615  # - when running on mc, take the GT from the configuration.type
616 
617  # override the GlobalTag connection string and pfnPrefix
618  text = """
619 # override the GlobalTag, connection string and pfnPrefix
620 if 'GlobalTag' in %(dict)s:
621 """
622 
623  # when running on MC, override the global tag even if not specified on the command line
624  if not self.config.data and not self.config.globaltag:
625  if self.config.type in globalTag:
626  self.config.globaltag = globalTag[self.config.type]
627  else:
628  self.config.globaltag = globalTag['GRun']
629 
630  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
631  if self.config.l1.override:
632  self.config.l1.record = 'L1GtTriggerMenuRcd'
633  self.config.l1.label = ''
634  self.config.l1.tag = self.config.l1.override
635  if not self.config.l1.connect:
636  self.config.l1.connect = '%(connect)s/CMS_COND_31X_L1T'
637  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
638  else:
639  self.config.l1cond = None
640 
641  if self.config.globaltag or self.config.l1cond:
642  text += " from Configuration.AlCa.GlobalTag import GlobalTag as customiseGlobalTag\n"
643  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
644  if self.config.globaltag:
645  text += ", globaltag = %s" % repr(self.config.globaltag)
646  if self.config.l1cond:
647  text += ", conditions = %s" % repr(self.config.l1cond)
648  text += ")\n"
649 
650  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_COND_31X_GLOBALTAG'
651  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
652  for pset in process.GlobalTag.toGet.value():
653  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
654 """
655  self.data += text
656 
657  def overrideL1MenuXml(self):
658  # if requested, override the L1 menu from the GlobalTag (Xml file)
659  if self.config.l1Xml.XmlFile:
660  text = """
661 # override the L1 menu from an Xml file
662 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
663  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
664  DefXmlFile = cms.string('%(XmlFile)s'),
665  VmeXmlFile = cms.string('')
666 )
667 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
668  recordName = cms.string('L1GtTriggerMenuRcd'),
669  iovIsRunNotTime = cms.bool(True),
670  firstValid = cms.vuint32(1)
671 )
672 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
673 """
674  self.data += text % self.config.l1Xml.__dict__
675 
676  def runL1EmulatorGT(self):
677  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
678  if not self.config.emulator:
679  return
680 
681  if self.config.emulator != 'gt':
682  # only the GT emulator is currently supported
683  return
684 
685  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
686  text = """
687 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
688 """
689  if self.config.fragment:
690  # FIXME in a cff, should also update the HLTSchedule
691  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
692  else:
693  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
694 
695  if not 'hltBoolFalse' in self.data:
696  # add hltBoolFalse
697  text += """
698 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
699  result = cms.bool( False )
700 )
701 """
702  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
703 
704  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
705 
706 
707  def runL1Emulator(self):
708  # if requested, run (part of) the L1 emulator
709  if self.config.emulator:
710  # FIXME this fragment used "process" explicitly
711  emulator = {
712  'RawToDigi': '',
713  'CustomL1T': '',
714  'CustomHLT': ''
715  }
716 
717  if self.config.data:
718  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
719  else:
720  emulator['RawToDigi'] = 'RawToDigi_cff'
721 
722  if self.config.emulator == 'gt':
723  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
724  emulator['CustomHLT'] = 'switchToSimGtDigis'
725  elif self.config.emulator == 'gct,gt':
726  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
727  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
728  elif self.config.emulator == 'gmt,gt':
729  # XXX currently unsupported
730  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
731  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
732  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
733  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
734  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
735  else:
736  # unsupported argument, default to running the whole emulator
737  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
738  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
739 
740  self.data += """
741 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
742 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
743 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
744 import L1Trigger.Configuration.L1Trigger_custom
745 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
746 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
747 
748 # customize the HLT to use the emulated results
749 import HLTrigger.Configuration.customizeHLTforL1Emulator
750 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
751 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
752 """ % emulator
753 
754 
755  def overrideOutput(self):
756  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
757  self.data = re.sub(
758  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
759  r'%(process)shltOutput\2 = cms.OutputModule( "PoolOutputModule",\n fileName = cms.untracked.string( "output\2.root" ),\n fastCloning = cms.untracked.bool( False ),\n dataset = cms.untracked.PSet(\n filterName = cms.untracked.string( "" ),\n dataTier = cms.untracked.string( "RAW" )\n ),',
760  self.data
761  )
762 
763  if not self.config.fragment and self.config.output == 'full':
764  # add a single "keep *" output
765  self.data += """
766 # add a single "keep *" output
767 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
768  fileName = cms.untracked.string( "outputFULL.root" ),
769  fastCloning = cms.untracked.bool( False ),
770  dataset = cms.untracked.PSet(
771  dataTier = cms.untracked.string( 'RECO' ),
772  filterName = cms.untracked.string( '' )
773  ),
774  outputCommands = cms.untracked.vstring( 'keep *' )
775 )
776 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
777 """
778 
779 
780  # override the process name and adapt the relevant filters
782  if self.config.name is None:
783  return
784 
785  # override the process name
786  quote = '[\'\"]'
787  self.data = re.compile(r'^(process\s*=\s*cms\.Process\(\s*' + quote + r')\w+(' + quote + r'\s*\).*)$', re.MULTILINE).sub(r'\1%s\2' % self.config.name, self.data, 1)
788 
789  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
790  self.data += """
791 # adapt HLT modules to the correct process name
792 if 'hltTrigReport' in %%(dict)s:
793  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
794 
795 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
796  %%(process)shltPreExpressCosmicsOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
797 
798 if 'hltPreExpressOutputSmart' in %%(dict)s:
799  %%(process)shltPreExpressOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
800 
801 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
802  %%(process)shltPreDQMForHIOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
803 
804 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
805  %%(process)shltPreDQMForPPOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
806 
807 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
808  %%(process)shltPreHLTDQMResultsOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
809 
810 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
811  %%(process)shltPreHLTDQMOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
812 
813 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
814  %%(process)shltPreHLTMONOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
815 
816 if 'hltDQMHLTScalers' in %%(dict)s:
817  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
818  %%(process)shltDQMHLTScalers.processname = '%(name)s'
819 
820 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
821  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
822 """ % self.config.__dict__
823 
824 
826  # request summary informations from the MessageLogger
827  self.data += """
828 if 'MessageLogger' in %(dict)s:
829  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
830  %(process)sMessageLogger.categories.append('L1GtTrigReport')
831  %(process)sMessageLogger.categories.append('HLTrigReport')
832  %(process)sMessageLogger.categories.append('FastReport')
833 """
834 
835 
836  def loadAdditionalConditions(self, comment, *conditions):
837  # load additional conditions
838  self.data += """
839 # %s
840 if 'GlobalTag' in %%(dict)s:
841 """ % comment
842  for condition in conditions:
843  self.data += """ %%(process)sGlobalTag.toGet.append(
844  cms.PSet(
845  record = cms.string( '%(record)s' ),
846  tag = cms.string( '%(tag)s' ),
847  label = cms.untracked.string( '%(label)s' ),
848  connect = cms.untracked.string( '%(connect)s' )
849  )
850  )
851 """ % condition
852 
853 
854  def loadCff(self, module):
855  # load a cfi or cff module
856  if self.config.fragment:
857  self.data += 'from %s import *\n' % module
858  else:
859  self.data += 'process.load( "%s" )\n' % module
860 
861 
862  def overrideParameters(self, module, parameters):
863  # override a module's parameter if the module is present in the configuration
864  self.data += "if '%s' in %%(dict)s:\n" % module
865  for (parameter, value) in parameters:
866  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
867  self.data += "\n"
868 
869 
870  def instrumentTiming(self):
871  if self.config.profiling:
872  # instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
873  text = ''
874 
875  if not 'hltGetRaw' in self.data:
876  # add hltGetRaw
877  text += """
878 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
879  RawDataCollection = cms.InputTag( "rawDataCollector" )
880 )
881 """
882 
883  if not 'hltGetConditions' in self.data:
884  # add hltGetConditions
885  text += """
886 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
887  verbose = cms.untracked.bool( False ),
888  toGet = cms.VPSet( )
889 )
890 """
891 
892  if not 'hltBoolFalse' in self.data:
893  # add hltBoolFalse
894  text += """
895 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
896  result = cms.bool( False )
897 )
898 """
899 
900  # add the definition of HLTriggerFirstPath
901  # FIXME in a cff, should also update the HLTSchedule
902  text += """
903 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
904 """
905  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
906 
907 
908  # instrument the menu with the Service, EDProducer and EndPath needed for timing studies
909  # FIXME in a cff, should also update the HLTSchedule
910  if self.config.timing:
911  self.data += """
912 # instrument the menu with the modules and EndPath needed for timing studies
913 """
914 
915  hasFST = False
916  if 'FastTimerService' in self.data:
917  hasFST = True
918 
919  self.data += '\n# configure the FastTimerService\n'
920  if not hasFST:
921  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
922  self.data += """%(process)sFastTimerService.useRealTimeClock = False
923 %(process)sFastTimerService.enableTimingPaths = True
924 %(process)sFastTimerService.enableTimingModules = True
925 %(process)sFastTimerService.enableTimingExclusive = True
926 %(process)sFastTimerService.enableTimingSummary = True
927 %(process)sFastTimerService.skipFirstPath = True
928 %(process)sFastTimerService.enableDQM = True
929 %(process)sFastTimerService.enableDQMbyPathActive = True
930 %(process)sFastTimerService.enableDQMbyPathTotal = True
931 %(process)sFastTimerService.enableDQMbyPathOverhead = True
932 %(process)sFastTimerService.enableDQMbyPathDetails = True
933 %(process)sFastTimerService.enableDQMbyPathCounters = True
934 %(process)sFastTimerService.enableDQMbyPathExclusive = True
935 %(process)sFastTimerService.enableDQMbyModule = True
936 %(process)sFastTimerService.enableDQMSummary = True
937 %(process)sFastTimerService.enableDQMbyLuminosity = True
938 %(process)sFastTimerService.enableDQMbyLumiSection = True
939 %(process)sFastTimerService.enableDQMbyProcesses = False
940 %(process)sFastTimerService.dqmTimeRange = 1000.
941 %(process)sFastTimerService.dqmTimeResolution = 5.
942 %(process)sFastTimerService.dqmPathTimeRange = 100.
943 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
944 %(process)sFastTimerService.dqmModuleTimeRange = 40.
945 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
946 %(process)sFastTimerService.dqmLuminosityRange = 1e+34
947 %(process)sFastTimerService.dqmLuminosityResolution = 1e+31
948 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
949 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
950 %(process)sFastTimerService.luminosityProduct = cms.untracked.InputTag( 'hltScalersRawToDigi' )
951 %(process)sFastTimerService.supportedProcesses = cms.untracked.vuint32( )
952 """
953 
954  self.data += """
955 # FastTimerServiceClient
956 %(process)sfastTimerServiceClient = cms.EDAnalyzer( "FastTimerServiceClient",
957  dqmPath = cms.untracked.string( "HLT/TimerService" )
958 )
959 
960 # DQM file saver
961 %(process)sdqmFileSaver = cms.EDAnalyzer( "DQMFileSaver",
962  convention = cms.untracked.string( "Offline" ),
963  workflow = cms.untracked.string( "/HLT/FastTimerService/All" ),
964  dirName = cms.untracked.string( "." ),
965  saveByRun = cms.untracked.int32(1),
966  saveByLumiSection = cms.untracked.int32(-1),
967  saveByEvent = cms.untracked.int32(-1),
968  saveByTime = cms.untracked.int32(-1),
969  saveByMinute = cms.untracked.int32(-1),
970  saveAtJobEnd = cms.untracked.bool(False),
971  forceRunNumber = cms.untracked.int32(-1),
972 )
973 
974 %(process)sTimingOutput = cms.EndPath( %(process)sfastTimerServiceClient + %(process)sdqmFileSaver )
975 """
976 
977  @staticmethod
978  def dumppaths(paths):
979  sys.stderr.write('Path selection:\n')
980  for path in paths:
981  sys.stderr.write('\t%s\n' % path)
982  sys.stderr.write('\n\n')
983 
984  def buildPathList(self):
985  self.all_paths = self.getPathList()
986 
987  if self.config.paths:
988  # no path list was requested, dump the full table, minus unsupported / unwanted paths
989  paths = self.config.paths.split(',')
990  else:
991  # dump only the requested paths, plus the eventual output endpaths
992  paths = []
993 
994  if self.config.fragment or self.config.output in ('none', 'full'):
995  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
996  if self.config.paths:
997  # paths are removed by default
998  pass
999  else:
1000  # drop all output endpaths
1001  paths.append( "-*Output" )
1002  elif self.config.output == 'minimal':
1003  # drop all output endpaths but HLTDQMResultsOutput
1004  if self.config.paths:
1005  paths.append( "HLTDQMResultsOutput" )
1006  else:
1007  paths.append( "-*Output" )
1008  paths.append( "HLTDQMResultsOutput" )
1009  else:
1010  # keep / add back all output endpaths
1011  if self.config.paths:
1012  paths.append( "*Output" )
1013  else:
1014  pass # paths are kepy by default
1015 
1016  # drop paths unsupported by fastsim
1017  if self.config.fastsim:
1018  paths.extend( "-%s" % path for path in self.fastsimUnsupportedPaths )
1019 
1020  # drop unwanted paths for profiling (and timing studies)
1021  if self.config.profiling:
1022  paths.append( "-HLTriggerFirstPath" )
1023  paths.append( "-HLTAnalyzerEndpath" )
1024 
1025  # this should never be in any dump (nor online menu)
1026  paths.append( "-OfflineOutput" )
1027 
1028  # expand all wildcards
1029  paths = self.expandWildcards(paths, self.all_paths)
1030 
1031  if self.config.paths:
1032  # do an "additive" consolidation
1033  self.options['paths'] = self.consolidatePositiveList(paths)
1034  if not self.options['paths']:
1035  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
1036  else:
1037  # do a "subtractive" consolidation
1038  self.options['paths'] = self.consolidateNegativeList(paths)
1039 
1040 
1041  def buildOptions(self):
1042  # common configuration for all scenarios
1043  self.options['services'].append( "-FUShmDQMOutputService" )
1044 
1045  if self.config.fragment:
1046  # extract a configuration file fragment
1047  self.options['essources'].append( "-GlobalTag" )
1048  self.options['essources'].append( "-HepPDTESSource" )
1049  self.options['essources'].append( "-XMLIdealGeometryESSource" )
1050  self.options['essources'].append( "-eegeom" )
1051  self.options['essources'].append( "-es_hardcode" )
1052  self.options['essources'].append( "-magfield" )
1053 
1054  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
1055  self.options['esmodules'].append( "-SlaveField0" )
1056  self.options['esmodules'].append( "-SlaveField20" )
1057  self.options['esmodules'].append( "-SlaveField30" )
1058  self.options['esmodules'].append( "-SlaveField35" )
1059  self.options['esmodules'].append( "-SlaveField38" )
1060  self.options['esmodules'].append( "-SlaveField40" )
1061  self.options['esmodules'].append( "-VBF0" )
1062  self.options['esmodules'].append( "-VBF20" )
1063  self.options['esmodules'].append( "-VBF30" )
1064  self.options['esmodules'].append( "-VBF35" )
1065  self.options['esmodules'].append( "-VBF38" )
1066  self.options['esmodules'].append( "-VBF40" )
1067  self.options['esmodules'].append( "-CSCGeometryESModule" )
1068  self.options['esmodules'].append( "-CaloGeometryBuilder" )
1069  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
1070  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
1071  self.options['esmodules'].append( "-DTGeometryESModule" )
1072  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
1073  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
1074  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
1075  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
1076  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
1077  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
1078  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
1079  self.options['esmodules'].append( "-MuonNumberingInitialization" )
1080  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
1081  self.options['esmodules'].append( "-RPCGeometryESModule" )
1082  self.options['esmodules'].append( "-SiStripGainESProducer" )
1083  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
1084  self.options['esmodules'].append( "-SiStripQualityESProducer" )
1085  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
1086  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
1087  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
1088  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
1089  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
1090  self.options['esmodules'].append( "-hcal_db_producer" )
1091  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
1092  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
1093  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
1094  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
1095  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
1096  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
1097  if not self.config.fastsim:
1098  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
1099  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
1100  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
1101  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
1102  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
1103  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
1104  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
1105  self.options['esmodules'].append( "-XMLFromDBSource" )
1106  self.options['esmodules'].append( "-sistripconn" )
1107 
1108  self.options['services'].append( "-PrescaleService" )
1109  self.options['services'].append( "-MessageLogger" )
1110  self.options['services'].append( "-DQM" )
1111  self.options['services'].append( "-DQMStore" )
1112  self.options['services'].append( "-MicroStateService" )
1113  self.options['services'].append( "-ModuleWebRegistry" )
1114  self.options['services'].append( "-TimeProfilerService" )
1115  self.options['services'].append( "-FastTimerService" )
1116 
1117  self.options['psets'].append( "-maxEvents" )
1118  self.options['psets'].append( "-options" )
1119 
1120  if self.config.fastsim:
1121  # remove components not supported or needed by fastsim
1122  self.options['esmodules'].append( "-navigationSchoolESProducer" )
1123  self.options['esmodules'].append( "-TransientTrackBuilderESProducer" )
1124  self.options['esmodules'].append( "-SteppingHelixPropagatorAny" )
1125  self.options['esmodules'].append( "-OppositeMaterialPropagator" )
1126  self.options['esmodules'].append( "-MaterialPropagator" )
1127  self.options['esmodules'].append( "-CaloTowerConstituentsMapBuilder" )
1128  self.options['esmodules'].append( "-CaloTopologyBuilder" )
1129 
1130  self.options['services'].append( "-UpdaterService" )
1131 
1132  self.options['modules'].append( "hltL3MuonIsolations" )
1133  self.options['modules'].append( "hltPixelVertices" )
1134  # 2011 start
1135  self.options['modules'].append( "-hltCkfL1IsoTrackCandidates" )
1136  self.options['modules'].append( "-hltCtfL1IsoWithMaterialTracks" )
1137  self.options['modules'].append( "-hltCkfL1NonIsoTrackCandidates" )
1138  self.options['modules'].append( "-hltCtfL1NonIsoWithMaterialTracks" )
1139  self.options['modules'].append( "-hltCkf3HitL1IsoTrackCandidates" )
1140  self.options['modules'].append( "-hltCtf3HitL1IsoWithMaterialTracks" )
1141  self.options['modules'].append( "-hltCkf3HitL1NonIsoTrackCandidates" )
1142  self.options['modules'].append( "-hltCtf3HitL1NonIsoWithMaterialTracks" )
1143  # 2011 stop
1144  self.options['modules'].append( "-hltCkfL1SeededTrackCandidates" )
1145  self.options['modules'].append( "-hltCtfL1SeededithMaterialTracks" )
1146  self.options['modules'].append( "-hltCkf3HitL1SeededTrackCandidates" )
1147  self.options['modules'].append( "-hltCtf3HitL1SeededWithMaterialTracks" )
1148  self.options['modules'].append( "-hltCkf3HitActivityTrackCandidates" )
1149  self.options['modules'].append( "-hltCtf3HitActivityWithMaterialTracks" )
1150  self.options['modules'].append( "-hltActivityCkfTrackCandidatesForGSF" )
1151  self.options['modules'].append( "-hltL1SeededCkfTrackCandidatesForGSF" )
1152  self.options['modules'].append( "-hltMuCkfTrackCandidates" )
1153  self.options['modules'].append( "-hltMuCtfTracks" )
1154  self.options['modules'].append( "-hltTau3MuCkfTrackCandidates" )
1155  self.options['modules'].append( "-hltTau3MuCtfWithMaterialTracks" )
1156  self.options['modules'].append( "-hltMuTrackJpsiCkfTrackCandidates" )
1157  self.options['modules'].append( "-hltMuTrackJpsiCtfTracks" )
1158  self.options['modules'].append( "-hltMuTrackJpsiEffCkfTrackCandidates" )
1159  self.options['modules'].append( "-hltMuTrackJpsiEffCtfTracks" )
1160  self.options['modules'].append( "-hltJpsiTkPixelSeedFromL3Candidate" )
1161  self.options['modules'].append( "-hltCkfTrackCandidatesJpsiTk" )
1162  self.options['modules'].append( "-hltCtfWithMaterialTracksJpsiTk" )
1163  self.options['modules'].append( "-hltMuTrackCkfTrackCandidatesOnia" )
1164  self.options['modules'].append( "-hltMuTrackCtfTracksOnia" )
1165 
1166  self.options['modules'].append( "-hltESRegionalEgammaRecHit" )
1167  self.options['modules'].append( "-hltEcalRegionalJetsFEDs" )
1168  self.options['modules'].append( "-hltEcalRegionalMuonsFEDs" )
1169  self.options['modules'].append( "-hltEcalRegionalEgammaFEDs" )
1170  self.options['modules'].append( "-hltFEDSelector" )
1171  self.options['modules'].append( "-hltL3TrajSeedOIHit" )
1172  self.options['modules'].append( "-hltL3TrajSeedIOHit" )
1173  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIState" )
1174  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIHit" )
1175  self.options['modules'].append( "-hltL3TrackCandidateFromL2IOHit" )
1176  self.options['modules'].append( "-hltL3TrackCandidateFromL2NoVtx" )
1177  self.options['modules'].append( "-hltHcalDigis" )
1178  self.options['modules'].append( "-hltHoreco" )
1179  self.options['modules'].append( "-hltHfreco" )
1180  self.options['modules'].append( "-hltHbhereco" )
1181  self.options['modules'].append( "-hltEcalRegionalRestFEDs" )
1182  self.options['modules'].append( "-hltEcalRegionalESRestFEDs" )
1183  self.options['modules'].append( "-hltEcalRawToRecHitFacility" )
1184  self.options['modules'].append( "-hltESRawToRecHitFacility" )
1185  self.options['modules'].append( "-hltEcalRegionalJetsRecHit" )
1186  self.options['modules'].append( "-hltEcalRegionalMuonsRecHit" )
1187  self.options['modules'].append( "-hltEcalRegionalEgammaRecHit" )
1188  self.options['modules'].append( "-hltEcalRecHitAll" )
1189  self.options['modules'].append( "-hltESRecHitAll" )
1190  # === hltPF
1191  self.options['modules'].append( "-hltPFJetCkfTrackCandidates" )
1192  self.options['modules'].append( "-hltPFJetCtfWithMaterialTracks" )
1193  self.options['modules'].append( "-hltPFlowTrackSelectionHighPurity" )
1194  # === hltFastJet
1195  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator" )
1196  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates" )
1197  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks" )
1198  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator" )
1199  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates" )
1200  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks" )
1201  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet" )
1202  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet" )
1203  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet" )
1204  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbbVBF" )
1205  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbbVBF" )
1206  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF" )
1207  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1208  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1209  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1210  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1211  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1212  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1213 
1214  # === hltBLifetimeRegional
1215 
1216  # 2011 start
1217  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorSingleTop" )
1218  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksSingleTop" )
1219  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesSingleTop" )
1220  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorEleJetSingleTop" )
1221  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesEleJetSingleTop" )
1222  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksEleJetSingleTop" )
1223  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorIsoEleJetSingleTop" )
1224  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesIsoEleJetSingleTop" )
1225  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksIsoEleJetSingleTop" )
1226  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorRA2b" )
1227  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesRA2b" )
1228  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksRA2b" )
1229  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorRAzr" )
1230  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesRAzr" )
1231  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksRAzr" )
1232  self.options['modules'].append( "-hltBLifetimeRegionalPixel3DSeedGeneratorJet30Hbb" )
1233  self.options['modules'].append( "-hltBLifetimeRegional3DCkfTrackCandidatesJet30Hbb" )
1234  self.options['modules'].append( "-hltBLifetimeRegional3DCtfWithMaterialTracksJet30Hbb" )
1235  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorGammaB" )
1236  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesGammaB" )
1237  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksGammaB" )
1238  # 2011 stop
1239 
1240  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbb" )
1241  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbb" )
1242  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbb" )
1243  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhi" )
1244  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhi" )
1245  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhi" )
1246  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1247  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1248  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1249  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1250  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1251  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1252  self.options['modules'].append( "-hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF" )
1253  self.options['modules'].append( "-hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF" )
1254  self.options['modules'].append( "-hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF" )
1255  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV" )
1256  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV" )
1257  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV" )
1258  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb" )
1259  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb" )
1260  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb" )
1261 
1262  self.options['modules'].append( "-hltPixelTracksForMinBias" )
1263  self.options['modules'].append( "-hltPixelTracksForHighMult" )
1264  self.options['modules'].append( "-hltRegionalPixelTracks" )
1265  self.options['modules'].append( "-hltPixelTracksReg" )
1266  self.options['modules'].append( "-hltIter4Merged" )
1267  self.options['modules'].append( "-hltFastPixelHitsVertex" )
1268  self.options['modules'].append( "-hltFastPixelTracks")
1269  self.options['modules'].append( "-hltFastPixelTracksRecover")
1270 
1271  self.options['modules'].append( "-hltFastPrimaryVertexbbPhi")
1272  self.options['modules'].append( "-hltPixelTracksFastPVbbPhi")
1273  self.options['modules'].append( "-hltPixelTracksRecoverbbPhi" )
1274  self.options['modules'].append( "-hltFastPixelHitsVertexVHbb" )
1275  self.options['modules'].append( "-hltFastPixelTracksVHbb" )
1276  self.options['modules'].append( "-hltFastPixelTracksRecoverVHbb" )
1277 
1278  self.options['modules'].append( "-hltFastPrimaryVertex")
1279  self.options['modules'].append( "-hltFastPVPixelTracks")
1280  self.options['modules'].append( "-hltFastPVPixelTracksRecover" )
1281 
1282  self.options['modules'].append( "-hltIter4Tau3MuMerged" )
1283  self.options['modules'].append( "hltPixelMatchElectronsActivity" )
1284 
1285  self.options['modules'].append( "-hltMuonCSCDigis" )
1286  self.options['modules'].append( "-hltMuonDTDigis" )
1287  self.options['modules'].append( "-hltMuonRPCDigis" )
1288  self.options['modules'].append( "-hltGtDigis" )
1289  self.options['modules'].append( "-hltL1GtTrigReport" )
1290  self.options['modules'].append( "hltCsc2DRecHits" )
1291  self.options['modules'].append( "hltDt1DRecHits" )
1292  self.options['modules'].append( "hltRpcRecHits" )
1293  self.options['modules'].append( "-hltScalersRawToDigi" )
1294 
1295  # 2011 start
1296  self.options['sequences'].append( "-HLTL1IsoEgammaRegionalRecoTrackerSequence" )
1297  self.options['sequences'].append( "-HLTL1NonIsoEgammaRegionalRecoTrackerSequence" )
1298  # 2011 stop
1299  self.options['sequences'].append( "-HLTL1SeededEgammaRegionalRecoTrackerSequence" )
1300  self.options['sequences'].append( "-HLTEcalActivityEgammaRegionalRecoTrackerSequence" )
1301  self.options['sequences'].append( "-HLTPixelMatchElectronActivityTrackingSequence" )
1302  self.options['sequences'].append( "-HLTDoLocalStripSequence" )
1303  self.options['sequences'].append( "-HLTDoLocalPixelSequence" )
1304  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegL2Tau" )
1305  self.options['sequences'].append( "-hltSiPixelDigis" )
1306  self.options['sequences'].append( "-hltSiPixelClusters" )
1307  self.options['sequences'].append( "-hltSiPixelRecHits" )
1308  self.options['sequences'].append( "-HLTRecopixelvertexingSequence" )
1309  self.options['sequences'].append( "-HLTEndSequence" )
1310  self.options['sequences'].append( "-HLTBeginSequence" )
1311  self.options['sequences'].append( "-HLTBeginSequenceNZS" )
1312  self.options['sequences'].append( "-HLTBeginSequenceBPTX" )
1313  self.options['sequences'].append( "-HLTBeginSequenceAntiBPTX" )
1314  self.options['sequences'].append( "-HLTHBHENoiseSequence" )
1315  self.options['sequences'].append( "-HLTIterativeTracking" )
1316  self.options['sequences'].append( "-HLTIterativeTrackingTau3Mu" )
1317  self.options['sequences'].append( "-HLTRegionalCKFTracksForL3Isolation" )
1318  self.options['sequences'].append( "-HLTHBHENoiseCleanerSequence" )
1319 
1320  # remove HLTAnalyzerEndpath from fastsim cff's
1321  if self.config.fragment:
1322  self.options['paths'].append( "-HLTAnalyzerEndpath" )
1323 
1324 
1325  def build_source(self):
1326  if self.config.input:
1327  # if a dataset or a list of input files was given, use it
1328  if self.config.input[0:8] == 'dataset:':
1329  from dbsFileQuery import dbsFileQuery
1330  # extract the dataset name, and use DBS to fine the list of LFNs
1331  dataset = self.config.input[8:]
1332  query = 'find file where dataset=' + dataset
1333  files = dbsFileQuery(query)
1334  self.source = files
1335  else:
1336  # assume a list of input files
1337  self.source = self.config.input.split(',')
1338  elif self.config.online:
1339  # online we always run on data
1340  self.source = [ "file:/tmp/InputCollection.root" ]
1341  elif self.config.data:
1342  # offline we can run on data...
1343  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1344  else:
1345  # ...or on mc
1346  self.source = [ "file:RelVal_Raw_%s_STARTUP.root" % self.config.type ]
1347 
1348  self.data += """
1349 %(process)ssource = cms.Source( "PoolSource",
1350  fileNames = cms.untracked.vstring(
1351 """
1352  if self.source:
1353  for line in self.source:
1354  self.data += " '%s',\n" % line
1355  self.data += """ ),
1356  secondaryFileNames = cms.untracked.vstring(
1357 """
1358  if self.parent:
1359  for line in self.parent:
1360  self.data += " '%s',\n" % line
1361  self.data += """ ),
1362  inputCommands = cms.untracked.vstring(
1363  'keep *'
1364  )
1365 )
1366 """
def _fix_parameter
Definition: confdb.py:496
def build_source
Definition: confdb.py:1325
def loadAdditionalConditions
Definition: confdb.py:836
def loadCff
Definition: confdb.py:854
def fixForMC
Definition: confdb.py:515
def buildPathList
Definition: confdb.py:984
def instrumentTiming
Definition: confdb.py:870
def runL1Emulator
Definition: confdb.py:707
def instrumentErrorEventType
Definition: confdb.py:598
def splitter
Definition: confdb.py:11
def overrideGlobalTag
Definition: confdb.py:606
def fixPrescales
Definition: confdb.py:560
def releaseSpecificCustomize
Definition: confdb.py:222
def consolidateNegativeList
Definition: confdb.py:192
def dumppaths
Definition: confdb.py:978
def runL1EmulatorGT
Definition: confdb.py:676
def consolidatePositiveList
Definition: confdb.py:204
def expandWildcards
Definition: confdb.py:176
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:133
def fixForFastSim
Definition: confdb.py:526
list object
Definition: dbtoconf.py:77
def buildOptions
Definition: confdb.py:1041
def overrideProcessName
Definition: confdb.py:781
def overrideL1MenuXml
Definition: confdb.py:657
def addGlobalOptions
untracked parameters with NO default in the code if &#39;hltHcalDataIntegrityMonitor&#39; in %(dict)s: %(proc...
Definition: confdb.py:478
def instrumentOpenMode
Definition: confdb.py:584
def overrideOutput
Definition: confdb.py:755
def overrideParameters
Definition: confdb.py:862
def updateMessageLogger
Definition: confdb.py:825
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void set(const std::string &name, int value)
set the flag, with a run-time name