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_*_v*",
27  "DQM_*_v*",
28  "HLT_*Calibration_v*",
29  "HLT_DTErrors_v*",
30  "HLT_Random_v*",
31  "HLT_HcalNZS_v*",
32  "HLT_HcalPhiSym_v*",
33  "HLT_Activity_Ecal*_v*",
34  "HLT_IsoTrackHB_v*",
35  "HLT_IsoTrackHE_v*",
36  "HLT_L1SingleMuOpen_AntiBPTX_v*",
37  "HLT_JetE*_NoBPTX*_v*",
38  "HLT_L2Mu*_NoBPTX*_v*",
39  "HLT_PixelTracks_Multiplicity70_v*",
40  "HLT_PixelTracks_Multiplicity80_v*",
41  "HLT_PixelTracks_Multiplicity90_v*",
42  "HLT_Beam*_v*",
43  #"HLT_L1Tech_*_v*",
44  "HLT_GlobalRunHPDNoise_v*",
45  "HLT_L1TrackerCosmics_v*",
46  "HLT_HcalUTCA_v*",
47 
48  # TODO: paths not supported by FastSim, but for which a recovery should be attempted
49  "HLT_DoubleMu33NoFiltersNoVtx_v*",
50  "HLT_DoubleMu38NoFiltersNoVtx_v*",
51  "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
52  "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
53  "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
54  "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
55  "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
56  "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
57  "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
58  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
59  "HLT_HT500_DisplacedDijet40_Inclusive_v*",
60  "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
61  "HLT_HT550_DisplacedDijet40_Inclusive_v*",
62  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
63  "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
64  "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
65  "HLT_MET75_IsoTrk50_v*",
66  "HLT_MET90_IsoTrk50_v*",
67  "HLT_VBF_DisplacedJet40_DisplacedTrack_v*",
68  "HLT_VBF_DisplacedJet40_TightID_DisplacedTrack_v*",
69  "HLT_VBF_DisplacedJet40_VTightID_DisplacedTrack_v*",
70  "HLT_VBF_DisplacedJet40_VVTightID_DisplacedTrack_v*",
71  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Tight_v*",
72  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Loose_v*",
73  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Tight_v*",
74  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Loose_v*",
75  "HLT_Mu38NoFiltersNoVtx_DisplacedJet60_Loose_v*",
76  "HLT_Mu28NoFiltersNoVtx_DisplacedJet40_Loose_v*",
77  "HLT_Mu28NoFiltersNoVtx_CentralCaloJet40_v*",
78  "HLT_Mu23NoFiltersNoVtx_Photon23_CaloIdL_v*",
79  "HLT_DoubleMu18NoFiltersNoVtx_v*",
80  "HLT_DoubleMuNoFiltersNoVtx_SaveObjects_v*",
81  )
82 
83  def __init__(self, configuration):
84  self.config = configuration
85  self.data = None
86  self.source = []
87  self.parent = []
88 
89  self.options = {
90  'essources' : [],
91  'esmodules' : [],
92  'modules' : [],
93  'sequences' : [],
94  'services' : [],
95  'paths' : [],
96  'psets' : [],
97  'blocks' : [],
98  }
99 
100  self.labels = {}
101  if self.config.fragment:
102  self.labels['process'] = 'fragment.'
103  self.labels['dict'] = 'fragment.__dict__'
104  else:
105  self.labels['process'] = 'process.'
106  self.labels['dict'] = 'process.__dict__'
107 
108  if self.config.online:
109  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
110  else:
111  self.labels['connect'] = 'frontier://FrontierProd'
112 
113  if self.config.prescale and (self.config.prescale.lower() != 'none'):
114  self.labels['prescale'] = self.config.prescale
115 
116  # get the configuration from ConfdB
117  from confdbOfflineConverter import OfflineConverter
118  self.converter = OfflineConverter(database = self.config.menu.db)
119  self.buildPathList()
120  self.buildOptions()
122  self.customize()
123 
124 
126  if self.config.menu.run:
127  args = ['--runNumber', self.config.menu.run]
128  else:
129  args = ['--configName', self.config.menu.name ]
130  args.append('--noedsources')
131  for key, vals in self.options.iteritems():
132  if vals:
133  args.extend(('--'+key, ','.join(vals)))
134 
135  data, err = self.converter.query( *args )
136  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
137  print "%s: error while retriving the HLT menu" % os.path.basename(sys.argv[0])
138  print
139  print err
140  print
141  sys.exit(1)
142  self.data = data
143 
144 
145  def getPathList(self):
146  if self.config.menu.run:
147  args = ['--runNumber', self.config.menu.run]
148  else:
149  args = ['--configName', self.config.menu.name]
150  args.extend( (
151  '--cff',
152  '--noedsources',
153  '--noes',
154  '--noservices',
155  '--nosequences',
156  '--nomodules'
157  ) )
158 
159  data, err = self.converter.query( *args )
160  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
161  print "%s: error while retriving the list of paths from the HLT menu" % os.path.basename(sys.argv[0])
162  print
163  print err
164  print
165  sys.exit(1)
166  filter = re.compile(r' *= *cms.(End)?Path.*')
167  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
168  return paths
169 
170 
171  @staticmethod
172  def expandWildcards(globs, collection):
173  # expand a list of unix-style wildcards matching a given collection
174  # wildcards with no matches are silently discarded
175  matches = []
176  for glob in globs:
177  negate = ''
178  if glob[0] == '-':
179  negate = '-'
180  glob = glob[1:]
181  # translate a unix-style glob expression into a regular expression
182  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
183  matches.extend( negate + element for element in collection if filter.match(element) )
184  return matches
185 
186 
187  @staticmethod
188  def consolidateNegativeList(elements):
189  # consolidate a list of path exclusions and re-inclusions
190  # the result is the list of paths to be removed from the dump
191  result = set()
192  for element in elements:
193  if element[0] == '-':
194  result.add( element )
195  else:
196  result.discard( '-' + element )
197  return sorted( element for element in result )
198 
199  @staticmethod
200  def consolidatePositiveList(elements):
201  # consolidate a list of path selection and re-exclusions
202  # the result is the list of paths to be included in the dump
203  result = set()
204  for element in elements:
205  if element[0] == '-':
206  result.discard( element[1:] )
207  else:
208  result.add( element )
209  return sorted( element for element in result )
210 
211 
212  # dump the final configuration
213  def dump(self):
214  self.data = self.data % self.labels
215  if self.config.fragment:
216  self.data = re.sub( r'\bprocess\b', 'fragment', self.data )
217  self.data = re.sub( r'\bProcess\b', 'ProcessFragment', self.data )
218  return self.data
219 
220 
221  # add specific customizations
222  def specificCustomize(self):
223  # specific customizations now live in HLTrigger.Configuration.customizeHLTforALL.customizeHLTforAll(.,.)
224  if self.config.fragment:
225  self.data += """
226 # add specific customizations
227 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
228 fragment = customizeHLTforAll(fragment)
229 """
230  else:
231  if self.config.type=="Fake":
232  prefix = "run1"
233  else:
234  prefix = "run2"
235  _gtData = "auto:"+prefix+"_hlt_"+self.config.type
236  _gtMc = "auto:"+prefix+"_mc_" +self.config.type
237  self.data += """
238 # add specific customizations
239 _customInfo = {}
240 _customInfo['menuType' ]= "%s"
241 _customInfo['globalTags']= {}
242 _customInfo['globalTags'][True ] = "%s"
243 _customInfo['globalTags'][False] = "%s"
244 _customInfo['inputFiles']={}
245 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
246 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
247 _customInfo['maxEvents' ]= %s
248 _customInfo['globalTag' ]= "%s"
249 _customInfo['inputFile' ]= %s
250 _customInfo['realData' ]= %s
251 _customInfo['fastSim' ]= %s
252 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
253 process = customizeHLTforAll(process,_customInfo)
254 """ % (self.config.type,_gtData,_gtMc,self.config.type,self.config.type,self.config.events,self.config.globaltag,self.source,self.config.data,self.config.fastsim)
255 
256 
257  # customize the configuration according to the options
258  def customize(self):
259 
260  # adapt the source to the current scenario
261  if not self.config.fragment:
262  self.build_source()
263 
264  # manual override some parameters
265  if self.config.type in ('HIon', ):
266  if self.config.data:
267  if not self.config.fragment:
268  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
269 
270 # if self.config.type in ('HIon', ):
271 # self.data += """
272 ## Disable HF Noise filters in HIon menu
273 #if 'hltHfreco' in %(dict)s:
274 # %(process)shltHfreco.setNoiseFlags = cms.bool( False )
275 #"""
276 # else:
277 # self.data += """
278 ## Enable HF Noise filters in non-HIon menu
279 #if 'hltHfreco' in %(dict)s:
280 # %(process)shltHfreco.setNoiseFlags = cms.bool( True )
281 #"""
282 
283 # self.data += """
284 ## untracked parameters with NO default in the code
285 #if 'hltHcalDataIntegrityMonitor' in %(dict)s:
286 # %(process)shltHcalDataIntegrityMonitor.RawDataLabel = cms.untracked.InputTag("rawDataCollector")
287 #if 'hltDt4DSegments' in %(dict)s:
288 # %(process)shltDt4DSegments.debug = cms.untracked.bool( False )
289 #"""
290 
291  # if requested, remove the HLT prescales
292  self.fixPrescales()
293 
294  # if requested, override all ED/HLTfilters to always pass ("open" mode)
295  self.instrumentOpenMode()
296 
297  # if requested, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
298  self.instrumentErrorEventType()
299 
300  # if requested, instrument the self with the modules and EndPath needed for timing studies
301  self.instrumentTiming()
302 
303  if self.config.fragment:
304  self.data += """
305 # dummyfy hltGetConditions in cff's
306 if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
307  %(process)shltDummyConditions = cms.EDFilter( "HLTBool",
308  result = cms.bool( True )
309  )
310  %(process)sHLTriggerFirstPath.replace(%(process)shltGetConditions,%(process)shltDummyConditions)
311 """
312 
313  # if requested, adapt the configuration for FastSim
314  self.fixForFastSim()
315 
316  else:
317 
318  if self.config.type not in ('Fake',) :
319  if '50ns' in self.config.type :
320  self.data += """
321 # load 2015 Run-2 L1 Menu for 50ns
322 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_Collisions2015_50ns_v1 as loadL1Menu
323 process = loadL1Menu(process)
324 """
325  elif 'HIon' in self.config.type :
326  self.data += """
327 # load 2015 Run-2 L1 Menu for HIon
328 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_CollisionsHeavyIons2015_v0 as loadL1Menu
329 process = loadL1Menu(process)
330 """
331  else :
332  self.data += """
333 # load 2015 Run-2 L1 Menu for 25ns (default for GRun, PIon)
334 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_Collisions2015_25ns_v2 as loadL1menu
335 process = loadL1menu(process)
336 """
337 
338  # override the process name and adapt the relevant filters
339  self.overrideProcessName()
340 
341  # override the output modules to output root files
342  self.overrideOutput()
343 
344  # add global options
345  self.addGlobalOptions()
346 
347  # if requested or necessary, override the GlobalTag and connection strings (incl. L1!)
348  self.overrideGlobalTag()
349 
350  # if requested, override the L1 self from the GlobalTag (Xml)
351  self.overrideL1MenuXml()
352 
353  # if requested, add snippet to run on new L1 skim
354  self.switchToNewL1Skim()
355 
356  # if requested, run (part of) the L1 emulator
357  self.runL1Emulator()
358 
359  # request summary informations from the MessageLogger
360  self.updateMessageLogger()
361 
362  # replace DQMStore and DQMRootOutputModule with a configuration suitable for running offline
363  self.instrumentDQM()
364 
365  # load 5.2.x JECs, until they are in the GlobalTag
366 # self.loadAdditionalConditions('load 5.2.x JECs',
367 # {
368 # 'record' : 'JetCorrectionsRecord',
369 # 'tag' : 'JetCorrectorParametersCollection_AK5Calo_2012_V8_hlt_mc',
370 # 'label' : 'AK5CaloHLT',
371 # 'connect' : '%(connect)s/CMS_CONDITIONS'
372 # }, {
373 # 'record' : 'JetCorrectionsRecord',
374 # 'tag' : 'JetCorrectorParametersCollection_AK5PF_2012_V8_hlt_mc',
375 # 'label' : 'AK5PFHLT',
376 # 'connect' : '%(connect)s/CMS_CONDITIONS'
377 # }, {
378 # 'record' : 'JetCorrectionsRecord',
379 # 'tag' : 'JetCorrectorParametersCollection_AK5PFchs_2012_V8_hlt_mc',
380 # 'label' : 'AK5PFchsHLT',
381 # 'connect' : '%(connect)s/CMS_CONDITIONS'
382 # }
383 # )
384 
385  # add specific customisations
386  self.specificCustomize()
387 
388 
389  def addGlobalOptions(self):
390  # add global options
391  self.data += """
392 # limit the number of events to be processed
393 %%(process)smaxEvents = cms.untracked.PSet(
394  input = cms.untracked.int32( %d )
395 )
396 """ % self.config.events
397 
398  if not self.config.profiling:
399  self.data += """
400 # enable the TrigReport and TimeReport
401 %(process)soptions = cms.untracked.PSet(
402  wantSummary = cms.untracked.bool( True )
403 )
404 """
405 
406 
407  def _fix_parameter(self, **args):
408  """arguments:
409  name: parameter name (optional)
410  type: parameter type (look for tracked and untracked variants)
411  value: original value
412  replace: replacement value
413  """
414  if 'name' in args:
415  self.data = re.sub(
416  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
417  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
418  self.data)
419  else:
420  self.data = re.sub(
421  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
422  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
423  self.data)
424 
425 
426  def fixForFastSim(self):
427  if self.config.fastsim:
428  # adapt the the configuration fragment to run under fastsim
429  self.data = re.compile( r'process = cms\.Process.*$', re.MULTILINE ).sub( r'\g<0>\n\nprocess.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )', self.data)
430 
431  # remove the definition of streams and datasets
432  self.data = re.compile( r'^process\.streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
433  self.data = re.compile( r'^process\.datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
434 
435  # fix the definition of some modules
436  # FIXME: this should be updated to take into accout the --l1-emulator option
437  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
438  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'simGmtDigis')
439  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'simGtDigis')
440  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'simGtDigis')
441  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
442  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
443  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
444  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
445  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
446  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
447  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
448  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
449  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
450  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
451 
452  # MeasurementTrackerEvent
453  self._fix_parameter( type = 'InputTag', value = 'hltSiStripClusters', replace = 'MeasurementTrackerEvent')
454 
455  # fix the definition of sequences and paths
456  self.data = re.sub( r'process.hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
457  self.data = re.sub( r'process.hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
458  self.data = re.sub( r'process.hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
459  self.data = re.sub( r'process.HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
460  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
461 
462 
463  def fixPrescales(self):
464  # update the PrescaleService to match the new list of paths
465  if self.options['paths']:
466  if self.options['paths'][0][0] == '-':
467  # drop requested paths
468  for minuspath in self.options['paths']:
469  path = minuspath[1:]
470  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
471  else:
472  # keep requested paths
473  for path in self.all_paths:
474  if path not in self.options['paths']:
475  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
476 
477  if self.config.prescale and (self.config.prescale.lower() != 'none'):
478  # TO DO: check that the requested prescale column is valid
479  self.data += """
480 # force the use of a specific HLT prescale column
481 if 'PrescaleService' in %(dict)s:
482  %(process)sPrescaleService.forceDefault = True
483  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
484 """
485 
486 
488  if self.config.open:
489  # find all EDfilters
490  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
491  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
492  # remove existing 'cms.ignore' and '~' modifiers
493  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
494  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
495  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
496  for some in splitter(filters, 1000):
497  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
498  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
499 
500 
502  if self.config.errortype:
503  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
504  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
505  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
506  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
507 
508 
509  def overrideGlobalTag(self):
510  # overwrite GlobalTag
511  # the logic is:
512  # - always set the correct connection string and pfnPrefix
513  # - if a GlobalTag is specified on the command line:
514  # - override the global tag
515  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
516  # - if a GlobalTag is NOT specified on the command line:
517  # - when running on data, do nothing, and keep the global tag in the menu
518  # - when running on mc, take the GT from the configuration.type
519 
520  # override the GlobalTag connection string and pfnPrefix
521  text = """
522 # override the GlobalTag, connection string and pfnPrefix
523 if 'GlobalTag' in %(dict)s:
524 """
525 
526  # when running on MC, override the global tag even if not specified on the command line
527  if not self.config.data and not self.config.globaltag:
528  if self.config.type in globalTag:
529  self.config.globaltag = globalTag[self.config.type]
530  else:
531  self.config.globaltag = globalTag['GRun']
532 
533  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
534  if self.config.l1.override:
535  self.config.l1.record = 'L1GtTriggerMenuRcd'
536  self.config.l1.label = ''
537  self.config.l1.tag = self.config.l1.override
538  if not self.config.l1.connect:
539  self.config.l1.connect = '%(connect)s/CMS_CONDITIONS'
540  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
541  else:
542  self.config.l1cond = None
543 
544  if self.config.globaltag or self.config.l1cond:
545  text += " from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag as customiseGlobalTag\n"
546  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
547  if self.config.globaltag:
548  text += ", globaltag = %s" % repr(self.config.globaltag)
549  if self.config.l1cond:
550  text += ", conditions = %s" % repr(self.config.l1cond)
551  text += ")\n"
552 
553  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_CONDITIONS'
554  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
555  for pset in process.GlobalTag.toGet.value():
556  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
557  # fix for multi-run processing
558  %(process)sGlobalTag.RefreshEachRun = cms.untracked.bool( False )
559  %(process)sGlobalTag.ReconnectEachRun = cms.untracked.bool( False )
560 """
561  self.data += text
562 
563  def overrideL1MenuXml(self):
564  # if requested, override the L1 menu from the GlobalTag (Xml file)
565  if self.config.l1Xml.XmlFile:
566  text = """
567 # override the L1 menu from an Xml file
568 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
569  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
570  DefXmlFile = cms.string('%(XmlFile)s'),
571  VmeXmlFile = cms.string('')
572 )
573 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
574  recordName = cms.string('L1GtTriggerMenuRcd'),
575  iovIsRunNotTime = cms.bool(True),
576  firstValid = cms.vuint32(1)
577 )
578 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
579 """
580  self.data += text % self.config.l1Xml.__dict__
581 
582  def runL1EmulatorGT(self):
583  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
584  if not self.config.emulator:
585  return
586 
587  if self.config.emulator != 'gt':
588  # only the GT emulator is currently supported
589  return
590 
591  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
592  text = """
593 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
594 """
595  if self.config.fragment:
596  # FIXME in a cff, should also update the HLTSchedule
597  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
598  else:
599  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
600 
601  if not 'hltBoolFalse' in self.data:
602  # add hltBoolFalse
603  text += """
604 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
605  result = cms.bool( False )
606 )
607 """
608  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
609 
610  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
611 
612 
613  def runL1Emulator(self):
614  # if requested, run (part of) the L1 emulator
615  if self.config.emulator:
616  # FIXME this fragment used "process" explicitly
617  emulator = {
618  'RawToDigi': '',
619  'CustomL1T': '',
620  'CustomHLT': ''
621  }
622 
623  if self.config.data:
624  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
625  else:
626  emulator['RawToDigi'] = 'RawToDigi_cff'
627 
628  if self.config.emulator == 'gt':
629  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
630  emulator['CustomHLT'] = 'switchToSimGtDigis'
631  elif self.config.emulator == 'gct,gt':
632  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
633  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
634  elif self.config.emulator == 'gmt,gt':
635  # XXX currently unsupported
636  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
637  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
638  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
639  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
640  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
641  elif self.config.emulator in ('stage1,gt'):
642  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
643  emulator['CustomHLT'] = 'switchToSimStage1Digis'
644  else:
645  # unsupported argument, default to running the whole emulator
646  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
647  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
648 
649  self.data += """
650 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
651 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
652 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
653 import L1Trigger.Configuration.L1Trigger_custom
654 #
655 """ % emulator
656 
657  if (self.config.emulator).find("stage1")>-1:
658  self.data += """
659 # 2015 Run2 emulator
660 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
661 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
662 """ % emulator
663  else:
664  self.data += """
665 # Run1 Emulator
666 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
667 """ % emulator
668 
669  self.data += """
670 #
671 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
672 # customize the HLT to use the emulated results
673 import HLTrigger.Configuration.customizeHLTforL1Emulator
674 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
675 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
676 """ % emulator
677 
678  def switchToNewL1Skim(self):
679  # add snippet to switch to new L1 skim files
680  if self.config.l1skim:
681  self.data += """
682 # Customize the menu to use information from new L1 emulator in the L1 skim files
683 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
684 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
685 for module in process.__dict__.itervalues():
686  if isinstance(module, cms._Module):
687  for parameter in module.__dict__.itervalues():
688  if isinstance(parameter, cms.InputTag):
689  if parameter.moduleLabel == 'hltGtDigis':
690  parameter.moduleLabel = "gtDigisFromSkim"
691  elif parameter.moduleLabel == 'hltL1GtObjectMap':
692  parameter.moduleLabel = "gtDigisFromSkim"
693  elif parameter.moduleLabel == 'hltGctDigis':
694  parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
695 """
696 
697  def overrideOutput(self):
698  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
699  self.data = re.sub(
700  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
701  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 ),',
702  self.data
703  )
704 
705  if not self.config.fragment and self.config.output == 'full':
706  # add a single "keep *" output
707  self.data += """
708 # add a single "keep *" output
709 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
710  fileName = cms.untracked.string( "outputFULL.root" ),
711  fastCloning = cms.untracked.bool( False ),
712  dataset = cms.untracked.PSet(
713  dataTier = cms.untracked.string( 'RECO' ),
714  filterName = cms.untracked.string( '' )
715  ),
716  outputCommands = cms.untracked.vstring( 'keep *' )
717 )
718 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
719 """
720 
721 
722  # override the process name and adapt the relevant filters
724  if self.config.name is None:
725  return
726 
727  # sanitise process name
728  self.config.name = self.config.name.replace("_","")
729  # override the process name
730  quote = '[\'\"]'
731  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)
732 
733  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
734  self.data += """
735 # adapt HLT modules to the correct process name
736 if 'hltTrigReport' in %%(dict)s:
737  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
738 
739 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
740  %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
741 
742 if 'hltPreExpressOutputSmart' in %%(dict)s:
743  %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
744 
745 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
746  %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
747 
748 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
749  %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
750 
751 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
752  %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
753 
754 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
755  %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
756 
757 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
758  %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
759 
760 if 'hltDQMHLTScalers' in %%(dict)s:
761  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
762  %%(process)shltDQMHLTScalers.processname = '%(name)s'
763 
764 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
765  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
766 """ % self.config.__dict__
767 
768 
770  # request summary informations from the MessageLogger
771  self.data += """
772 if 'MessageLogger' in %(dict)s:
773  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
774  %(process)sMessageLogger.categories.append('L1GtTrigReport')
775  %(process)sMessageLogger.categories.append('HLTrigReport')
776  %(process)sMessageLogger.categories.append('FastReport')
777 """
778 
779 
780  def loadAdditionalConditions(self, comment, *conditions):
781  # load additional conditions
782  self.data += """
783 # %s
784 if 'GlobalTag' in %%(dict)s:
785 """ % comment
786  for condition in conditions:
787  self.data += """ %%(process)sGlobalTag.toGet.append(
788  cms.PSet(
789  record = cms.string( '%(record)s' ),
790  tag = cms.string( '%(tag)s' ),
791  label = cms.untracked.string( '%(label)s' ),
792  connect = cms.untracked.string( '%(connect)s' )
793  )
794  )
795 """ % condition
796 
797 
798  def loadCffCommand(self, module):
799  # load a cfi or cff module
800  if self.config.fragment:
801  return 'from %s import *\n' % module
802  else:
803  return 'process.load( "%s" )\n' % module
804 
805  def loadCff(self, module):
806  self.data += self.loadCffCommand(module)
807 
808 
809  def overrideParameters(self, module, parameters):
810  # override a module's parameter if the module is present in the configuration
811  self.data += "if '%s' in %%(dict)s:\n" % module
812  for (parameter, value) in parameters:
813  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
814  self.data += "\n"
815 
816 
817  def instrumentTiming(self):
818  if self.config.profiling:
819  # instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
820  text = ''
821 
822  if not 'hltGetRaw' in self.data:
823  # add hltGetRaw
824  text += """
825 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
826  RawDataCollection = cms.InputTag( "rawDataCollector" )
827 )
828 """
829 
830  if not 'hltGetConditions' in self.data:
831  # add hltGetConditions
832  text += """
833 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
834  verbose = cms.untracked.bool( False ),
835  toGet = cms.VPSet( )
836 )
837 """
838 
839  if not 'hltBoolFalse' in self.data:
840  # add hltBoolFalse
841  text += """
842 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
843  result = cms.bool( False )
844 )
845 """
846 
847  # add the definition of HLTriggerFirstPath
848  # FIXME in a cff, should also update the HLTSchedule
849  text += """
850 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
851 """
852  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
853 
854 
855  # instrument the menu with the Service, EDProducer and EndPath needed for timing studies
856  # FIXME in a cff, should also update the HLTSchedule
857  if self.config.timing:
858  self.data += """
859 # instrument the menu with the modules and EndPath needed for timing studies
860 """
861 
862  if not 'FastTimerService' in self.data:
863  self.data += '\n# configure the FastTimerService\n'
864  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
865  else:
866  self.data += '\n# configure the FastTimerService\n'
867 
868  self.data += """# this is currently ignored in CMSSW 7.x, always using the real time clock
869 %(process)sFastTimerService.useRealTimeClock = True
870 # enable specific features
871 %(process)sFastTimerService.enableTimingPaths = True
872 %(process)sFastTimerService.enableTimingModules = True
873 %(process)sFastTimerService.enableTimingExclusive = True
874 # print a text summary at the end of the job
875 %(process)sFastTimerService.enableTimingSummary = True
876 # skip the first path (disregard the time spent loading event and conditions data)
877 %(process)sFastTimerService.skipFirstPath = True
878 # enable DQM plots
879 %(process)sFastTimerService.enableDQM = True
880 # enable most per-path DQM plots
881 %(process)sFastTimerService.enableDQMbyPathActive = True
882 %(process)sFastTimerService.enableDQMbyPathTotal = True
883 %(process)sFastTimerService.enableDQMbyPathOverhead = False
884 %(process)sFastTimerService.enableDQMbyPathDetails = True
885 %(process)sFastTimerService.enableDQMbyPathCounters = True
886 %(process)sFastTimerService.enableDQMbyPathExclusive = True
887 # disable per-module DQM plots
888 %(process)sFastTimerService.enableDQMbyModule = False
889 %(process)sFastTimerService.enableDQMbyModuleType = False
890 # enable per-event DQM sumary plots
891 %(process)sFastTimerService.enableDQMSummary = True
892 # enable per-event DQM plots by lumisection
893 %(process)sFastTimerService.enableDQMbyLumiSection = True
894 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
895 # set the time resolution of the DQM plots
896 %(process)sFastTimerService.dqmTimeRange = 1000.
897 %(process)sFastTimerService.dqmTimeResolution = 5.
898 %(process)sFastTimerService.dqmPathTimeRange = 100.
899 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
900 %(process)sFastTimerService.dqmModuleTimeRange = 40.
901 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
902 # set the base DQM folder for the plots
903 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
904 %(process)sFastTimerService.enableDQMbyProcesses = True
905 """
906 
907 
908  def instrumentDQM(self):
909  if not self.config.hilton:
910  # remove any reference to the hltDQMFileSaver
911  if 'hltDQMFileSaver' in self.data:
912  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
913  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
914  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
915 
916  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
917  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
918  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
919  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
920  dqmstore += """
921 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
922  fileName = cms.untracked.string("DQMIO.root")
923 )
924 """
925 
926  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
927  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
928  if empty_path.search(self.data):
929  # replace an empty DQMOutput path
930  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
931  elif other_path.search(self.data):
932  # prepend the dqmOutput to the DQMOutput path
933  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
934  else:
935  # ceate a new DQMOutput path with the dqmOutput module
936  self.data += dqmstore
937  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
938 
939 
940  @staticmethod
941  def dumppaths(paths):
942  sys.stderr.write('Path selection:\n')
943  for path in paths:
944  sys.stderr.write('\t%s\n' % path)
945  sys.stderr.write('\n\n')
946 
947  def buildPathList(self):
948  self.all_paths = self.getPathList()
949 
950  if self.config.paths:
951  # no path list was requested, dump the full table, minus unsupported / unwanted paths
952  paths = self.config.paths.split(',')
953  else:
954  # dump only the requested paths, plus the eventual output endpaths
955  paths = []
956 
957  if self.config.fragment or self.config.output in ('none', 'full'):
958  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
959  if self.config.paths:
960  # paths are removed by default
961  pass
962  else:
963  # drop all output endpaths
964  paths.append( "-*Output" )
965  elif self.config.output == 'minimal':
966  # drop all output endpaths but HLTDQMResultsOutput
967  if self.config.paths:
968  paths.append( "HLTDQMResultsOutput" )
969  else:
970  paths.append( "-*Output" )
971  paths.append( "HLTDQMResultsOutput" )
972  else:
973  # keep / add back all output endpaths
974  if self.config.paths:
975  paths.append( "*Output" )
976  else:
977  pass # paths are kepy by default
978 
979  # drop paths unsupported by fastsim
980  if self.config.fastsim:
981  paths.extend( "-%s" % path for path in self.fastsimUnsupportedPaths )
982 
983  # drop unwanted paths for profiling (and timing studies)
984  if self.config.profiling:
985  paths.append( "-HLTriggerFirstPath" )
986  paths.append( "-HLTAnalyzerEndpath" )
987 
988  # this should never be in any dump (nor online menu)
989  paths.append( "-OfflineOutput" )
990 
991  # expand all wildcards
992  paths = self.expandWildcards(paths, self.all_paths)
993 
994  if self.config.paths:
995  # do an "additive" consolidation
996  self.options['paths'] = self.consolidatePositiveList(paths)
997  if not self.options['paths']:
998  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
999  else:
1000  # do a "subtractive" consolidation
1001  self.options['paths'] = self.consolidateNegativeList(paths)
1002 
1003 
1004  def buildOptions(self):
1005  # common configuration for all scenarios
1006  self.options['services'].append( "-DQM" )
1007  self.options['services'].append( "-FUShmDQMOutputService" )
1008  self.options['services'].append( "-MicroStateService" )
1009  self.options['services'].append( "-ModuleWebRegistry" )
1010  self.options['services'].append( "-TimeProfilerService" )
1011 
1012  # remove the DAQ modules and the online definition of the DQMStore and DQMFileSaver
1013  # unless a hilton-like configuration has been requested
1014  if not self.config.hilton:
1015  self.options['services'].append( "-EvFDaqDirector" )
1016  self.options['services'].append( "-FastMonitoringService" )
1017  self.options['services'].append( "-DQMStore" )
1018  self.options['modules'].append( "-hltDQMFileSaver" )
1019 
1020  if self.config.fragment:
1021  # extract a configuration file fragment
1022  self.options['essources'].append( "-GlobalTag" )
1023  self.options['essources'].append( "-HepPDTESSource" )
1024  self.options['essources'].append( "-XMLIdealGeometryESSource" )
1025  self.options['essources'].append( "-eegeom" )
1026  self.options['essources'].append( "-es_hardcode" )
1027  self.options['essources'].append( "-magfield" )
1028 
1029  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
1030  self.options['esmodules'].append( "-SlaveField0" )
1031  self.options['esmodules'].append( "-SlaveField20" )
1032  self.options['esmodules'].append( "-SlaveField30" )
1033  self.options['esmodules'].append( "-SlaveField35" )
1034  self.options['esmodules'].append( "-SlaveField38" )
1035  self.options['esmodules'].append( "-SlaveField40" )
1036  self.options['esmodules'].append( "-VBF0" )
1037  self.options['esmodules'].append( "-VBF20" )
1038  self.options['esmodules'].append( "-VBF30" )
1039  self.options['esmodules'].append( "-VBF35" )
1040  self.options['esmodules'].append( "-VBF38" )
1041  self.options['esmodules'].append( "-VBF40" )
1042  self.options['esmodules'].append( "-CSCGeometryESModule" )
1043  self.options['esmodules'].append( "-CaloGeometryBuilder" )
1044  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
1045  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
1046  self.options['esmodules'].append( "-DTGeometryESModule" )
1047  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
1048  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
1049  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
1050  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
1051  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
1052  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
1053  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
1054  self.options['esmodules'].append( "-MuonNumberingInitialization" )
1055  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
1056  self.options['esmodules'].append( "-RPCGeometryESModule" )
1057  self.options['esmodules'].append( "-SiStripGainESProducer" )
1058  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
1059  self.options['esmodules'].append( "-SiStripQualityESProducer" )
1060  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
1061  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
1062  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
1063  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
1064  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
1065  self.options['esmodules'].append( "-hcal_db_producer" )
1066  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
1067  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
1068  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
1069  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
1070  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
1071  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
1072  self.options['esmodules'].append( "-trackerTopology" )
1073 
1074  if not self.config.fastsim:
1075  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
1076  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
1077  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
1078  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
1079  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
1080  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
1081  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
1082  self.options['esmodules'].append( "-XMLFromDBSource" )
1083  self.options['esmodules'].append( "-sistripconn" )
1084 
1085  self.options['services'].append( "-MessageLogger" )
1086 
1087  self.options['psets'].append( "-maxEvents" )
1088  self.options['psets'].append( "-options" )
1089 
1090  if self.config.fragment or (self.config.prescale and (self.config.prescale.lower() == 'none')):
1091  self.options['services'].append( "-PrescaleService" )
1092 
1093  if self.config.fragment or self.config.timing:
1094  self.options['services'].append( "-FastTimerService" )
1095 
1096  if self.config.fastsim:
1097  # remove components not supported or needed by fastsim
1098  self.options['esmodules'].append( "-navigationSchoolESProducer" )
1099  self.options['esmodules'].append( "-TransientTrackBuilderESProducer" )
1100  self.options['esmodules'].append( "-SteppingHelixPropagatorAny" )
1101  self.options['esmodules'].append( "-OppositeMaterialPropagator" )
1102  self.options['esmodules'].append( "-MaterialPropagator" )
1103  self.options['esmodules'].append( "-CaloTowerConstituentsMapBuilder" )
1104  self.options['esmodules'].append( "-CaloTopologyBuilder" )
1105 
1106  self.options['modules'].append( "hltL3MuonIsolations" )
1107  self.options['modules'].append( "hltPixelVertices" )
1108  self.options['modules'].append( "-hltCkfL1SeededTrackCandidates" )
1109  self.options['modules'].append( "-hltCtfL1SeededithMaterialTracks" )
1110  self.options['modules'].append( "-hltCkf3HitL1SeededTrackCandidates" )
1111  self.options['modules'].append( "-hltCtf3HitL1SeededWithMaterialTracks" )
1112  self.options['modules'].append( "-hltCkf3HitActivityTrackCandidates" )
1113  self.options['modules'].append( "-hltCtf3HitActivityWithMaterialTracks" )
1114  self.options['modules'].append( "-hltActivityCkfTrackCandidatesForGSF" )
1115  self.options['modules'].append( "-hltL1SeededCkfTrackCandidatesForGSF" )
1116  self.options['modules'].append( "-hltMuCkfTrackCandidates" )
1117  self.options['modules'].append( "-hltMuCtfTracks" )
1118  self.options['modules'].append( "-hltTau3MuCkfTrackCandidates" )
1119  self.options['modules'].append( "-hltTau3MuCtfWithMaterialTracks" )
1120  self.options['modules'].append( "-hltMuTrackJpsiCkfTrackCandidates" )
1121  self.options['modules'].append( "-hltMuTrackJpsiCtfTracks" )
1122  self.options['modules'].append( "-hltMuTrackJpsiEffCkfTrackCandidates" )
1123  self.options['modules'].append( "-hltMuTrackJpsiEffCtfTracks" )
1124  self.options['modules'].append( "-hltJpsiTkPixelSeedFromL3Candidate" )
1125  self.options['modules'].append( "-hltCkfTrackCandidatesJpsiTk" )
1126  self.options['modules'].append( "-hltCtfWithMaterialTracksJpsiTk" )
1127  self.options['modules'].append( "-hltMuTrackCkfTrackCandidatesOnia" )
1128  self.options['modules'].append( "-hltMuTrackCtfTracksOnia" )
1129 
1130  self.options['modules'].append( "-hltFEDSelector" )
1131  self.options['modules'].append( "-hltL3TrajSeedOIHit" )
1132  self.options['modules'].append( "-hltL3TrajSeedIOHit" )
1133  self.options['modules'].append( "-hltL3NoFiltersTrajSeedOIHit" )
1134  self.options['modules'].append( "-hltL3NoFiltersTrajSeedIOHit" )
1135  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIState" )
1136  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIHit" )
1137  self.options['modules'].append( "-hltL3TrackCandidateFromL2IOHit" )
1138  self.options['modules'].append( "-hltL3TrackCandidateFromL2NoVtx" )
1139  self.options['modules'].append( "-hltHcalDigis" )
1140  self.options['modules'].append( "-hltHoreco" )
1141  self.options['modules'].append( "-hltHfreco" )
1142  self.options['modules'].append( "-hltHbhereco" )
1143  self.options['modules'].append( "-hltESRawToRecHitFacility" )
1144  self.options['modules'].append( "-hltEcalRecHitAll" )
1145  self.options['modules'].append( "-hltESRecHitAll" )
1146  # === eGamma
1147  self.options['modules'].append( "-hltEgammaCkfTrackCandidatesForGSF" )
1148  self.options['modules'].append( "-hltEgammaGsfTracks" )
1149  self.options['modules'].append( "-hltEgammaCkfTrackCandidatesForGSFUnseeded" )
1150  self.options['modules'].append( "-hltEgammaGsfTracksUnseeded" )
1151  # === hltPF
1152  self.options['modules'].append( "-hltPFJetCkfTrackCandidates" )
1153  self.options['modules'].append( "-hltPFJetCtfWithMaterialTracks" )
1154  self.options['modules'].append( "-hltPFlowTrackSelectionHighPurity" )
1155  # === hltFastJet
1156  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator" )
1157  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates" )
1158  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks" )
1159  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator" )
1160  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates" )
1161  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks" )
1162  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet" )
1163  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet" )
1164  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet" )
1165  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbbVBF" )
1166  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbbVBF" )
1167  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF" )
1168  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1169  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1170  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1171  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1172  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1173  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1174  # === hltBLifetimeRegional
1175  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbb" )
1176  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbb" )
1177  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbb" )
1178  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhi" )
1179  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhi" )
1180  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhi" )
1181  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1182  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1183  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1184  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1185  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1186  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1187  self.options['modules'].append( "-hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF" )
1188  self.options['modules'].append( "-hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF" )
1189  self.options['modules'].append( "-hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF" )
1190  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV" )
1191  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV" )
1192  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV" )
1193  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb" )
1194  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb" )
1195  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb" )
1196 
1197  self.options['modules'].append( "-hltPixelTracksForMinBias" )
1198  self.options['modules'].append( "-hltPixelTracksForHighMult" )
1199  self.options['modules'].append( "-hltRegionalPixelTracks" )
1200  self.options['modules'].append( "-hltPixelTracksReg" )
1201  self.options['modules'].append( "-hltPixelTracksL3Muon" )
1202  self.options['modules'].append( "-hltPixelTracksGlbTrkMuon" )
1203  self.options['modules'].append( "-hltPixelTracksHighPtTkMuIso" )
1204  self.options['modules'].append( "-hltPixelTracksHybrid" )
1205  self.options['modules'].append( "-hltPixelTracksForPhotons" )
1206  self.options['modules'].append( "-hltPixelTracksForEgamma" )
1207  self.options['modules'].append( "-hltPixelTracksElectrons" )
1208  self.options['modules'].append( "-hltPixelTracksForHighPt" )
1209  self.options['modules'].append( "-hltHighPtPixelTracks" )
1210  self.options['modules'].append( "-hltPixelTracksForNoPU" )
1211 
1212  self.options['modules'].append( "-hltFastPixelHitsVertex" )
1213  self.options['modules'].append( "-hltFastPixelTracks")
1214  self.options['modules'].append( "-hltFastPixelTracksRecover")
1215 
1216  self.options['modules'].append( "-hltPixelLayerPairs" )
1217  self.options['modules'].append( "-hltPixelLayerTriplets" )
1218  self.options['modules'].append( "-hltPixelLayerTripletsReg" )
1219  self.options['modules'].append( "-hltPixelLayerTripletsHITHB" )
1220  self.options['modules'].append( "-hltPixelLayerTripletsHITHE" )
1221  self.options['modules'].append( "-hltMixedLayerPairs" )
1222 
1223  self.options['modules'].append( "-hltFastPrimaryVertexbbPhi")
1224  self.options['modules'].append( "-hltPixelTracksFastPVbbPhi")
1225  self.options['modules'].append( "-hltPixelTracksRecoverbbPhi" )
1226  self.options['modules'].append( "-hltFastPixelHitsVertexVHbb" )
1227  self.options['modules'].append( "-hltFastPixelTracksVHbb" )
1228  self.options['modules'].append( "-hltFastPixelTracksRecoverVHbb" )
1229 
1230  self.options['modules'].append( "-hltFastPrimaryVertex")
1231  self.options['modules'].append( "-hltFastPVPixelVertexFilter")
1232  self.options['modules'].append( "-hltFastPVPixelTracks")
1233  self.options['modules'].append( "-hltFastPVPixelTracksRecover" )
1234 
1235  self.options['modules'].append( "hltPixelMatchElectronsActivity" )
1236 
1237  self.options['modules'].append( "-hltMuonCSCDigis" )
1238  self.options['modules'].append( "-hltMuonDTDigis" )
1239  self.options['modules'].append( "-hltMuonRPCDigis" )
1240  self.options['modules'].append( "-hltGtDigis" )
1241  self.options['modules'].append( "-hltL1GtTrigReport" )
1242  self.options['modules'].append( "hltCsc2DRecHits" )
1243  self.options['modules'].append( "hltDt1DRecHits" )
1244  self.options['modules'].append( "hltRpcRecHits" )
1245  self.options['modules'].append( "-hltScalersRawToDigi" )
1246 
1247  self.options['sequences'].append( "-HLTL1SeededEgammaRegionalRecoTrackerSequence" )
1248  self.options['sequences'].append( "-HLTEcalActivityEgammaRegionalRecoTrackerSequence" )
1249  self.options['sequences'].append( "-HLTPixelMatchElectronActivityTrackingSequence" )
1250  self.options['sequences'].append( "-HLTDoLocalStripSequence" )
1251  self.options['sequences'].append( "-HLTDoLocalPixelSequence" )
1252  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegL2Tau" )
1253  self.options['sequences'].append( "-HLTDoLocalStripSequenceReg" )
1254  self.options['sequences'].append( "-HLTDoLocalPixelSequenceReg" )
1255  self.options['sequences'].append( "-HLTDoLocalStripSequenceRegForBTag" )
1256  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegForBTag" )
1257  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegForNoPU" )
1258  self.options['sequences'].append( "-hltSiPixelDigis" )
1259  self.options['sequences'].append( "-hltSiPixelClusters" )
1260  self.options['sequences'].append( "-hltSiPixelRecHits" )
1261  self.options['sequences'].append( "-HLTRecopixelvertexingSequence" )
1262  self.options['sequences'].append( "-HLTEndSequence" )
1263  self.options['sequences'].append( "-HLTBeginSequence" )
1264  self.options['sequences'].append( "-HLTBeginSequenceNZS" )
1265  self.options['sequences'].append( "-HLTBeginSequenceBPTX" )
1266  self.options['sequences'].append( "-HLTBeginSequenceAntiBPTX" )
1267  self.options['sequences'].append( "-HLTHBHENoiseSequence" )
1268  self.options['sequences'].append( "-HLTIterativeTrackingIter04" )
1269  self.options['sequences'].append( "-HLTIterativeTrackingIter02" )
1270  self.options['sequences'].append( "-HLTIterativeTracking" )
1271  self.options['sequences'].append( "-HLTIterativeTrackingForHighPt" )
1272  self.options['sequences'].append( "-HLTIterativeTrackingTau3Mu" )
1273  self.options['sequences'].append( "-HLTIterativeTrackingReg" )
1274  self.options['sequences'].append( "-HLTIterativeTrackingForElectronIter02" )
1275  self.options['sequences'].append( "-HLTIterativeTrackingForPhotonsIter02" )
1276  self.options['sequences'].append( "-HLTIterativeTrackingL3MuonIter02" )
1277  self.options['sequences'].append( "-HLTIterativeTrackingGlbTrkMuonIter02" )
1278  self.options['sequences'].append( "-HLTIterativeTrackingL3MuonRegIter02" )
1279  self.options['sequences'].append( "-HLTIterativeTrackingHighPtTkMu" )
1280  self.options['sequences'].append( "-HLTIterativeTrackingHighPtTkMuIsoIter02" )
1281  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIter02" )
1282  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIter12" )
1283  self.options['sequences'].append( "-HLTIterativeTrackingForTauIter04" )
1284  self.options['sequences'].append( "-HLTIterativeTrackingForTauIter02" )
1285  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedJpsiIter02" )
1286  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedPsiPrimeIter02" )
1287  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedNRMuMuIter02" )
1288  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIteration0" )
1289  self.options['sequences'].append( "-HLTIterativeTrackingIteration4DisplacedJets" )
1290  self.options['sequences'].append( "-HLTRegionalCKFTracksForL3Isolation" )
1291  self.options['sequences'].append( "-HLTHBHENoiseCleanerSequence" )
1292 
1293  # remove HLTAnalyzerEndpath from fastsim cff's
1294  if self.config.fragment:
1295  self.options['paths'].append( "-HLTAnalyzerEndpath" )
1296 
1297 
1298  def append_filenames(self, name, filenames):
1299  if len(filenames) > 255:
1300  token_open = "( *("
1301  token_close = ") )"
1302  else:
1303  token_open = "("
1304  token_close = ")"
1305 
1306  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
1307  for line in filenames:
1308  self.data += " '%s',\n" % line
1309  self.data += " %s,\n" % (token_close)
1310 
1311 
1312  def expand_filenames(self, input):
1313  # check if the input is a dataset or a list of files
1314  if input[0:8] == 'dataset:':
1315  from dasFileQuery import dasFileQuery
1316  # extract the dataset name, and use DAS to fine the list of LFNs
1317  dataset = input[8:]
1318  files = dasFileQuery(dataset)
1319  else:
1320  # assume a comma-separated list of input files
1321  files = self.config.input.split(',')
1322  return files
1323 
1324  def build_source(self):
1325  if self.config.input:
1326  # if a dataset or a list of input files was given, use it
1327  self.source = self.expand_filenames(self.config.input)
1328  elif self.config.online:
1329  # online we always run on data
1330  self.source = [ "file:/tmp/InputCollection.root" ]
1331  elif self.config.data:
1332  # offline we can run on data...
1333  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1334  else:
1335  # ...or on mc
1336  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1337 
1338  if self.config.parent:
1339  # if a dataset or a list of input files was given for the parent data, use it
1340  self.parent = self.expand_filenames(self.config.parent)
1341 
1342  self.data += """
1343 %(process)ssource = cms.Source( "PoolSource",
1344 """
1345  self.append_filenames("fileNames", self.source)
1346  if (self.parent):
1347  self.append_filenames("secondaryFileNames", self.parent)
1348  self.data += """\
1349  inputCommands = cms.untracked.vstring(
1350  'keep *'
1351  )
1352 )
1353 """
def _fix_parameter
Definition: confdb.py:407
def build_source
Definition: confdb.py:1324
def loadAdditionalConditions
Definition: confdb.py:780
def loadCff
Definition: confdb.py:805
def buildPathList
Definition: confdb.py:947
def instrumentTiming
Definition: confdb.py:817
def runL1Emulator
Definition: confdb.py:613
def instrumentErrorEventType
Definition: confdb.py:501
def switchToNewL1Skim
Definition: confdb.py:678
def expand_filenames
Definition: confdb.py:1312
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
def instrumentDQM
Definition: confdb.py:908
def splitter
Definition: confdb.py:11
def overrideGlobalTag
Definition: confdb.py:509
def fixPrescales
Definition: confdb.py:463
def specificCustomize
Definition: confdb.py:222
def consolidateNegativeList
Definition: confdb.py:188
def dumppaths
Definition: confdb.py:941
def loadCffCommand
Definition: confdb.py:798
def runL1EmulatorGT
Definition: confdb.py:582
def consolidatePositiveList
Definition: confdb.py:200
def expandWildcards
Definition: confdb.py:172
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:125
def fixForFastSim
Definition: confdb.py:426
list object
Definition: dbtoconf.py:77
def buildOptions
Definition: confdb.py:1004
def overrideProcessName
Definition: confdb.py:723
def overrideL1MenuXml
Definition: confdb.py:563
def append_filenames
Definition: confdb.py:1298
def addGlobalOptions
Disable HF Noise filters in HIon menu if &#39;hltHfreco&#39; in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( False ) &quot;&quot;" else: self.data += &quot;&quot;" Enable HF Noise filters in non-HIon menu if &#39;hltHfreco&#39; in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( True ) &quot;&quot;".
Definition: confdb.py:389
def instrumentOpenMode
Definition: confdb.py:487
def overrideOutput
Definition: confdb.py:697
def overrideParameters
Definition: confdb.py:809
def updateMessageLogger
Definition: confdb.py:769
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