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 
23  def __init__(self, configuration):
24  self.config = configuration
25  self.data = None
26  self.source = []
27  self.parent = []
28 
29  self.options = {
30  'essources' : [],
31  'esmodules' : [],
32  'modules' : [],
33  'sequences' : [],
34  'services' : [],
35  'paths' : [],
36  'psets' : [],
37  'blocks' : [],
38  }
39 
40  self.labels = {}
41  if self.config.fragment:
42  self.labels['process'] = 'fragment.'
43  self.labels['dict'] = 'fragment.__dict__'
44  else:
45  self.labels['process'] = 'process.'
46  self.labels['dict'] = 'process.__dict__'
47 
48  if self.config.online:
49  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
50  else:
51  self.labels['connect'] = 'frontier://FrontierProd'
52 
53  if self.config.prescale and (self.config.prescale.lower() != 'none'):
54  self.labels['prescale'] = self.config.prescale
55 
56  # get the configuration from ConfdB
57  from confdbOfflineConverter import OfflineConverter
58  self.converter = OfflineConverter(database = self.config.menu.db)
59  self.buildPathList()
60  self.buildOptions()
62  self.customize()
63 
64 
66  if self.config.menu.run:
67  args = ['--runNumber', self.config.menu.run]
68  else:
69  args = ['--configName', self.config.menu.name ]
70  args.append('--noedsources')
71  for key, vals in self.options.iteritems():
72  if vals:
73  args.extend(('--'+key, ','.join(vals)))
74 
75  data, err = self.converter.query( *args )
76  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
77  print "%s: error while retriving the HLT menu" % os.path.basename(sys.argv[0])
78  print
79  print err
80  print
81  sys.exit(1)
82  self.data = data
83 
84 
85  def getPathList(self):
86  if self.config.menu.run:
87  args = ['--runNumber', self.config.menu.run]
88  else:
89  args = ['--configName', self.config.menu.name]
90  args.extend( (
91  '--cff',
92  '--noedsources',
93  '--noes',
94  '--noservices',
95  '--nosequences',
96  '--nomodules'
97  ) )
98 
99  data, err = self.converter.query( *args )
100  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
101  print "%s: error while retriving the list of paths from the HLT menu" % os.path.basename(sys.argv[0])
102  print
103  print err
104  print
105  sys.exit(1)
106  filter = re.compile(r' *= *cms.(End)?Path.*')
107  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
108  return paths
109 
110 
111  @staticmethod
112  def expandWildcards(globs, collection):
113  # expand a list of unix-style wildcards matching a given collection
114  # wildcards with no matches are silently discarded
115  matches = []
116  for glob in globs:
117  negate = ''
118  if glob[0] == '-':
119  negate = '-'
120  glob = glob[1:]
121  # translate a unix-style glob expression into a regular expression
122  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
123  matches.extend( negate + element for element in collection if filter.match(element) )
124  return matches
125 
126 
127  @staticmethod
128  def consolidateNegativeList(elements):
129  # consolidate a list of path exclusions and re-inclusions
130  # the result is the list of paths to be removed from the dump
131  result = set()
132  for element in elements:
133  if element[0] == '-':
134  result.add( element )
135  else:
136  result.discard( '-' + element )
137  return sorted( element for element in result )
138 
139  @staticmethod
140  def consolidatePositiveList(elements):
141  # consolidate a list of path selection and re-exclusions
142  # the result is the list of paths to be included in the dump
143  result = set()
144  for element in elements:
145  if element[0] == '-':
146  result.discard( element[1:] )
147  else:
148  result.add( element )
149  return sorted( element for element in result )
150 
151 
152  # dump the final configuration
153  def dump(self):
154  self.data = self.data % self.labels
155  if self.config.fragment:
156  self.data = re.sub( r'\bprocess\b', 'fragment', self.data )
157  self.data = re.sub( r'\bProcess\b', 'ProcessFragment', self.data )
158  return self.data
159 
160 
161  # add specific customizations
162  def specificCustomize(self):
163  # specific customizations now live in HLTrigger.Configuration.customizeHLTforALL.customizeHLTforAll(.,.)
164  if self.config.fragment:
165  self.data += """
166 # add specific customizations
167 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
168 fragment = customizeHLTforAll(fragment)
169 """
170  else:
171  if self.config.type=="Fake":
172  prefix = "run1"
173  else:
174  prefix = "run2"
175  _gtData = "auto:"+prefix+"_hlt_"+self.config.type
176  _gtMc = "auto:"+prefix+"_mc_" +self.config.type
177  self.data += """
178 # add specific customizations
179 _customInfo = {}
180 _customInfo['menuType' ]= "%s"
181 _customInfo['globalTags']= {}
182 _customInfo['globalTags'][True ] = "%s"
183 _customInfo['globalTags'][False] = "%s"
184 _customInfo['inputFiles']={}
185 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
186 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
187 _customInfo['maxEvents' ]= %s
188 _customInfo['globalTag' ]= "%s"
189 _customInfo['inputFile' ]= %s
190 _customInfo['realData' ]= %s
191 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
192 process = customizeHLTforAll(process,_customInfo)
193 """ % (self.config.type,_gtData,_gtMc,self.config.type,self.config.type,self.config.events,self.config.globaltag,self.source,self.config.data)
194 
195 
196  # customize the configuration according to the options
197  def customize(self):
198 
199  # adapt the source to the current scenario
200  if not self.config.fragment:
201  self.build_source()
202 
203  # manual override some parameters
204  if self.config.type in ('HIon', ):
205  if self.config.data:
206  if not self.config.fragment:
207  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
208 
209 # if self.config.type in ('HIon', ):
210 # self.data += """
211 ## Disable HF Noise filters in HIon menu
212 #if 'hltHfreco' in %(dict)s:
213 # %(process)shltHfreco.setNoiseFlags = cms.bool( False )
214 #"""
215 # else:
216 # self.data += """
217 ## Enable HF Noise filters in non-HIon menu
218 #if 'hltHfreco' in %(dict)s:
219 # %(process)shltHfreco.setNoiseFlags = cms.bool( True )
220 #"""
221 
222 # self.data += """
223 ## untracked parameters with NO default in the code
224 #if 'hltHcalDataIntegrityMonitor' in %(dict)s:
225 # %(process)shltHcalDataIntegrityMonitor.RawDataLabel = cms.untracked.InputTag("rawDataCollector")
226 #if 'hltDt4DSegments' in %(dict)s:
227 # %(process)shltDt4DSegments.debug = cms.untracked.bool( False )
228 #"""
229 
230  # if requested, remove the HLT prescales
231  self.fixPrescales()
232 
233  # if requested, override all ED/HLTfilters to always pass ("open" mode)
234  self.instrumentOpenMode()
235 
236  # if requested, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
237  self.instrumentErrorEventType()
238 
239  # if requested, instrument the self with the modules and EndPath needed for timing studies
240  self.instrumentTiming()
241 
242  if self.config.fragment:
243  self.data += """
244 # dummyfy hltGetConditions in cff's
245 if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
246  %(process)shltDummyConditions = cms.EDFilter( "HLTBool",
247  result = cms.bool( True )
248  )
249  %(process)sHLTriggerFirstPath.replace(%(process)shltGetConditions,%(process)shltDummyConditions)
250 """
251 
252  else:
253 
254  if self.config.type not in ('Fake',) :
255  if '50ns' in self.config.type :
256  self.data += """
257 # load 2015 Run-2 L1 Menu for 50ns
258 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_Collisions2015_50ns_v1 as loadL1Menu
259 process = loadL1Menu(process)
260 """
261  elif 'HIon' in self.config.type :
262  self.data += """
263 # load 2015 Run-2 L1 Menu for HIon
264 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_CollisionsHeavyIons2015_v0 as loadL1Menu
265 process = loadL1Menu(process)
266 """
267  else :
268  self.data += """
269 # load 2015 Run-2 L1 Menu for 25ns (default for GRun, PIon)
270 from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_Collisions2015_25ns_v2 as loadL1menu
271 process = loadL1menu(process)
272 """
273 
274  # override the process name and adapt the relevant filters
275  self.overrideProcessName()
276 
277  # override the output modules to output root files
278  self.overrideOutput()
279 
280  # add global options
281  self.addGlobalOptions()
282 
283  # if requested or necessary, override the GlobalTag and connection strings (incl. L1!)
284  self.overrideGlobalTag()
285 
286  # if requested, override the L1 self from the GlobalTag (Xml)
287  self.overrideL1MenuXml()
288 
289  # if requested, add snippet to run on new L1 skim
290  self.switchToNewL1Skim()
291 
292  # if requested, run (part of) the L1 emulator
293  self.runL1Emulator()
294 
295  # request summary informations from the MessageLogger
296  self.updateMessageLogger()
297 
298  # replace DQMStore and DQMRootOutputModule with a configuration suitable for running offline
299  self.instrumentDQM()
300 
301  # load 5.2.x JECs, until they are in the GlobalTag
302 # self.loadAdditionalConditions('load 5.2.x JECs',
303 # {
304 # 'record' : 'JetCorrectionsRecord',
305 # 'tag' : 'JetCorrectorParametersCollection_AK5Calo_2012_V8_hlt_mc',
306 # 'label' : 'AK5CaloHLT',
307 # 'connect' : '%(connect)s/CMS_CONDITIONS'
308 # }, {
309 # 'record' : 'JetCorrectionsRecord',
310 # 'tag' : 'JetCorrectorParametersCollection_AK5PF_2012_V8_hlt_mc',
311 # 'label' : 'AK5PFHLT',
312 # 'connect' : '%(connect)s/CMS_CONDITIONS'
313 # }, {
314 # 'record' : 'JetCorrectionsRecord',
315 # 'tag' : 'JetCorrectorParametersCollection_AK5PFchs_2012_V8_hlt_mc',
316 # 'label' : 'AK5PFchsHLT',
317 # 'connect' : '%(connect)s/CMS_CONDITIONS'
318 # }
319 # )
320 
321  # add specific customisations
322  self.specificCustomize()
323 
324 
325  def addGlobalOptions(self):
326  # add global options
327  self.data += """
328 # limit the number of events to be processed
329 %%(process)smaxEvents = cms.untracked.PSet(
330  input = cms.untracked.int32( %d )
331 )
332 """ % self.config.events
333 
334  if not self.config.profiling:
335  self.data += """
336 # enable the TrigReport and TimeReport
337 %(process)soptions = cms.untracked.PSet(
338  wantSummary = cms.untracked.bool( True )
339 )
340 """
341 
342 
343  def _fix_parameter(self, **args):
344  """arguments:
345  name: parameter name (optional)
346  type: parameter type (look for tracked and untracked variants)
347  value: original value
348  replace: replacement value
349  """
350  if 'name' in args:
351  self.data = re.sub(
352  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
353  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
354  self.data)
355  else:
356  self.data = re.sub(
357  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
358  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
359  self.data)
360 
361 
362  def fixPrescales(self):
363  # update the PrescaleService to match the new list of paths
364  if self.options['paths']:
365  if self.options['paths'][0][0] == '-':
366  # drop requested paths
367  for minuspath in self.options['paths']:
368  path = minuspath[1:]
369  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
370  else:
371  # keep requested paths
372  for path in self.all_paths:
373  if path not in self.options['paths']:
374  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
375 
376  if self.config.prescale and (self.config.prescale.lower() != 'none'):
377  # TO DO: check that the requested prescale column is valid
378  self.data += """
379 # force the use of a specific HLT prescale column
380 if 'PrescaleService' in %(dict)s:
381  %(process)sPrescaleService.forceDefault = True
382  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
383 """
384 
385 
387  if self.config.open:
388  # find all EDfilters
389  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
390  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
391  # remove existing 'cms.ignore' and '~' modifiers
392  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
393  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
394  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
395  for some in splitter(filters, 1000):
396  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
397  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
398 
399 
401  if self.config.errortype:
402  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
403  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
404  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
405  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
406 
407 
408  def overrideGlobalTag(self):
409  # overwrite GlobalTag
410  # the logic is:
411  # - always set the correct connection string and pfnPrefix
412  # - if a GlobalTag is specified on the command line:
413  # - override the global tag
414  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
415  # - if a GlobalTag is NOT specified on the command line:
416  # - when running on data, do nothing, and keep the global tag in the menu
417  # - when running on mc, take the GT from the configuration.type
418 
419  # override the GlobalTag connection string and pfnPrefix
420  text = """
421 # override the GlobalTag, connection string and pfnPrefix
422 if 'GlobalTag' in %(dict)s:
423 """
424 
425  # when running on MC, override the global tag even if not specified on the command line
426  if not self.config.data and not self.config.globaltag:
427  if self.config.type in globalTag:
428  self.config.globaltag = globalTag[self.config.type]
429  else:
430  self.config.globaltag = globalTag['GRun']
431 
432  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
433  if self.config.l1.override:
434  self.config.l1.record = 'L1GtTriggerMenuRcd'
435  self.config.l1.label = ''
436  self.config.l1.tag = self.config.l1.override
437  if not self.config.l1.connect:
438  self.config.l1.connect = '%(connect)s/CMS_CONDITIONS'
439  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
440  else:
441  self.config.l1cond = None
442 
443  if self.config.globaltag or self.config.l1cond:
444  text += " from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag as customiseGlobalTag\n"
445  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
446  if self.config.globaltag:
447  text += ", globaltag = %s" % repr(self.config.globaltag)
448  if self.config.l1cond:
449  text += ", conditions = %s" % repr(self.config.l1cond)
450  text += ")\n"
451 
452  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_CONDITIONS'
453  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
454  for pset in process.GlobalTag.toGet.value():
455  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
456  # fix for multi-run processing
457  %(process)sGlobalTag.RefreshEachRun = cms.untracked.bool( False )
458  %(process)sGlobalTag.ReconnectEachRun = cms.untracked.bool( False )
459 """
460  self.data += text
461 
462  def overrideL1MenuXml(self):
463  # if requested, override the L1 menu from the GlobalTag (Xml file)
464  if self.config.l1Xml.XmlFile:
465  text = """
466 # override the L1 menu from an Xml file
467 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
468  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
469  DefXmlFile = cms.string('%(XmlFile)s'),
470  VmeXmlFile = cms.string('')
471 )
472 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
473  recordName = cms.string('L1GtTriggerMenuRcd'),
474  iovIsRunNotTime = cms.bool(True),
475  firstValid = cms.vuint32(1)
476 )
477 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
478 """
479  self.data += text % self.config.l1Xml.__dict__
480 
481  def runL1EmulatorGT(self):
482  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
483  if not self.config.emulator:
484  return
485 
486  if self.config.emulator != 'gt':
487  # only the GT emulator is currently supported
488  return
489 
490  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
491  text = """
492 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
493 """
494  if self.config.fragment:
495  # FIXME in a cff, should also update the HLTSchedule
496  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
497  else:
498  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
499 
500  if not 'hltBoolFalse' in self.data:
501  # add hltBoolFalse
502  text += """
503 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
504  result = cms.bool( False )
505 )
506 """
507  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
508 
509  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
510 
511 
512  def runL1Emulator(self):
513  # if requested, run (part of) the L1 emulator
514  if self.config.emulator:
515  # FIXME this fragment used "process" explicitly
516  emulator = {
517  'RawToDigi': '',
518  'CustomL1T': '',
519  'CustomHLT': ''
520  }
521 
522  if self.config.data:
523  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
524  else:
525  emulator['RawToDigi'] = 'RawToDigi_cff'
526 
527  if self.config.emulator == 'gt':
528  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
529  emulator['CustomHLT'] = 'switchToSimGtDigis'
530  elif self.config.emulator == 'gct,gt':
531  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
532  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
533  elif self.config.emulator == 'gmt,gt':
534  # XXX currently unsupported
535  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
536  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
537  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
538  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
539  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
540  elif self.config.emulator in ('stage1,gt'):
541  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
542  emulator['CustomHLT'] = 'switchToSimStage1Digis'
543  else:
544  # unsupported argument, default to running the whole emulator
545  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
546  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
547 
548  self.data += """
549 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
550 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
551 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
552 import L1Trigger.Configuration.L1Trigger_custom
553 #
554 """ % emulator
555 
556  if (self.config.emulator).find("stage1")>-1:
557  self.data += """
558 # 2015 Run2 emulator
559 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
560 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
561 """ % emulator
562  else:
563  self.data += """
564 # Run1 Emulator
565 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
566 """ % emulator
567 
568  self.data += """
569 #
570 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
571 # customize the HLT to use the emulated results
572 import HLTrigger.Configuration.customizeHLTforL1Emulator
573 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
574 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
575 """ % emulator
576 
577  def switchToNewL1Skim(self):
578  # add snippet to switch to new L1 skim files
579  if self.config.l1skim:
580  self.data += """
581 # Customize the menu to use information from new L1 emulator in the L1 skim files
582 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
583 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
584 for module in process.__dict__.itervalues():
585  if isinstance(module, cms._Module):
586  for parameter in module.__dict__.itervalues():
587  if isinstance(parameter, cms.InputTag):
588  if parameter.moduleLabel == 'hltGtDigis':
589  parameter.moduleLabel = "gtDigisFromSkim"
590  elif parameter.moduleLabel == 'hltL1GtObjectMap':
591  parameter.moduleLabel = "gtDigisFromSkim"
592  elif parameter.moduleLabel == 'hltGctDigis':
593  parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
594 """
595 
596  def overrideOutput(self):
597  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
598  self.data = re.sub(
599  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
600  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 ),',
601  self.data
602  )
603 
604  if not self.config.fragment and self.config.output == 'full':
605  # add a single "keep *" output
606  self.data += """
607 # add a single "keep *" output
608 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
609  fileName = cms.untracked.string( "outputFULL.root" ),
610  fastCloning = cms.untracked.bool( False ),
611  dataset = cms.untracked.PSet(
612  dataTier = cms.untracked.string( 'RECO' ),
613  filterName = cms.untracked.string( '' )
614  ),
615  outputCommands = cms.untracked.vstring( 'keep *' )
616 )
617 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
618 """
619 
620 
621  # override the process name and adapt the relevant filters
623  if self.config.name is None:
624  return
625 
626  # sanitise process name
627  self.config.name = self.config.name.replace("_","")
628  # override the process name
629  quote = '[\'\"]'
630  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)
631 
632  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
633  self.data += """
634 # adapt HLT modules to the correct process name
635 if 'hltTrigReport' in %%(dict)s:
636  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
637 
638 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
639  %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
640 
641 if 'hltPreExpressOutputSmart' in %%(dict)s:
642  %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
643 
644 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
645  %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
646 
647 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
648  %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
649 
650 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
651  %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
652 
653 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
654  %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
655 
656 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
657  %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
658 
659 if 'hltDQMHLTScalers' in %%(dict)s:
660  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
661  %%(process)shltDQMHLTScalers.processname = '%(name)s'
662 
663 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
664  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
665 """ % self.config.__dict__
666 
667 
669  # request summary informations from the MessageLogger
670  self.data += """
671 if 'MessageLogger' in %(dict)s:
672  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
673  %(process)sMessageLogger.categories.append('L1GtTrigReport')
674  %(process)sMessageLogger.categories.append('HLTrigReport')
675  %(process)sMessageLogger.categories.append('FastReport')
676 """
677 
678 
679  def loadAdditionalConditions(self, comment, *conditions):
680  # load additional conditions
681  self.data += """
682 # %s
683 if 'GlobalTag' in %%(dict)s:
684 """ % comment
685  for condition in conditions:
686  self.data += """ %%(process)sGlobalTag.toGet.append(
687  cms.PSet(
688  record = cms.string( '%(record)s' ),
689  tag = cms.string( '%(tag)s' ),
690  label = cms.untracked.string( '%(label)s' ),
691  connect = cms.untracked.string( '%(connect)s' )
692  )
693  )
694 """ % condition
695 
696 
697  def loadCffCommand(self, module):
698  # load a cfi or cff module
699  if self.config.fragment:
700  return 'from %s import *\n' % module
701  else:
702  return 'process.load( "%s" )\n' % module
703 
704  def loadCff(self, module):
705  self.data += self.loadCffCommand(module)
706 
707 
708  def overrideParameters(self, module, parameters):
709  # override a module's parameter if the module is present in the configuration
710  self.data += "if '%s' in %%(dict)s:\n" % module
711  for (parameter, value) in parameters:
712  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
713  self.data += "\n"
714 
715 
716  def instrumentTiming(self):
717  if self.config.profiling:
718  # instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
719  text = ''
720 
721  if not 'hltGetRaw' in self.data:
722  # add hltGetRaw
723  text += """
724 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
725  RawDataCollection = cms.InputTag( "rawDataCollector" )
726 )
727 """
728 
729  if not 'hltGetConditions' in self.data:
730  # add hltGetConditions
731  text += """
732 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
733  verbose = cms.untracked.bool( False ),
734  toGet = cms.VPSet( )
735 )
736 """
737 
738  if not 'hltBoolFalse' in self.data:
739  # add hltBoolFalse
740  text += """
741 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
742  result = cms.bool( False )
743 )
744 """
745 
746  # add the definition of HLTriggerFirstPath
747  # FIXME in a cff, should also update the HLTSchedule
748  text += """
749 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
750 """
751  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
752 
753 
754  # instrument the menu with the Service, EDProducer and EndPath needed for timing studies
755  # FIXME in a cff, should also update the HLTSchedule
756  if self.config.timing:
757  self.data += """
758 # instrument the menu with the modules and EndPath needed for timing studies
759 """
760 
761  if not 'FastTimerService' in self.data:
762  self.data += '\n# configure the FastTimerService\n'
763  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
764  else:
765  self.data += '\n# configure the FastTimerService\n'
766 
767  self.data += """# this is currently ignored in CMSSW 7.x, always using the real time clock
768 %(process)sFastTimerService.useRealTimeClock = True
769 # enable specific features
770 %(process)sFastTimerService.enableTimingPaths = True
771 %(process)sFastTimerService.enableTimingModules = True
772 %(process)sFastTimerService.enableTimingExclusive = True
773 # print a text summary at the end of the job
774 %(process)sFastTimerService.enableTimingSummary = True
775 # skip the first path (disregard the time spent loading event and conditions data)
776 %(process)sFastTimerService.skipFirstPath = True
777 # enable DQM plots
778 %(process)sFastTimerService.enableDQM = True
779 # enable most per-path DQM plots
780 %(process)sFastTimerService.enableDQMbyPathActive = True
781 %(process)sFastTimerService.enableDQMbyPathTotal = True
782 %(process)sFastTimerService.enableDQMbyPathOverhead = False
783 %(process)sFastTimerService.enableDQMbyPathDetails = True
784 %(process)sFastTimerService.enableDQMbyPathCounters = True
785 %(process)sFastTimerService.enableDQMbyPathExclusive = True
786 # disable per-module DQM plots
787 %(process)sFastTimerService.enableDQMbyModule = False
788 %(process)sFastTimerService.enableDQMbyModuleType = False
789 # enable per-event DQM sumary plots
790 %(process)sFastTimerService.enableDQMSummary = True
791 # enable per-event DQM plots by lumisection
792 %(process)sFastTimerService.enableDQMbyLumiSection = True
793 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
794 # set the time resolution of the DQM plots
795 %(process)sFastTimerService.dqmTimeRange = 1000.
796 %(process)sFastTimerService.dqmTimeResolution = 5.
797 %(process)sFastTimerService.dqmPathTimeRange = 100.
798 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
799 %(process)sFastTimerService.dqmModuleTimeRange = 40.
800 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
801 # set the base DQM folder for the plots
802 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
803 %(process)sFastTimerService.enableDQMbyProcesses = True
804 """
805 
806 
807  def instrumentDQM(self):
808  if not self.config.hilton:
809  # remove any reference to the hltDQMFileSaver
810  if 'hltDQMFileSaver' in self.data:
811  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
812  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
813  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
814 
815  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
816  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
817  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
818  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
819  dqmstore += """
820 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
821  fileName = cms.untracked.string("DQMIO.root")
822 )
823 """
824 
825  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
826  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
827  if empty_path.search(self.data):
828  # replace an empty DQMOutput path
829  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
830  elif other_path.search(self.data):
831  # prepend the dqmOutput to the DQMOutput path
832  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
833  else:
834  # ceate a new DQMOutput path with the dqmOutput module
835  self.data += dqmstore
836  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
837 
838 
839  @staticmethod
840  def dumppaths(paths):
841  sys.stderr.write('Path selection:\n')
842  for path in paths:
843  sys.stderr.write('\t%s\n' % path)
844  sys.stderr.write('\n\n')
845 
846  def buildPathList(self):
847  self.all_paths = self.getPathList()
848 
849  if self.config.paths:
850  # no path list was requested, dump the full table, minus unsupported / unwanted paths
851  paths = self.config.paths.split(',')
852  else:
853  # dump only the requested paths, plus the eventual output endpaths
854  paths = []
855 
856  if self.config.fragment or self.config.output in ('none', 'full'):
857  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
858  if self.config.paths:
859  # paths are removed by default
860  pass
861  else:
862  # drop all output endpaths
863  paths.append( "-*Output" )
864  elif self.config.output == 'minimal':
865  # drop all output endpaths but HLTDQMResultsOutput
866  if self.config.paths:
867  paths.append( "HLTDQMResultsOutput" )
868  else:
869  paths.append( "-*Output" )
870  paths.append( "HLTDQMResultsOutput" )
871  else:
872  # keep / add back all output endpaths
873  if self.config.paths:
874  paths.append( "*Output" )
875  else:
876  pass # paths are kepy by default
877 
878  # drop unwanted paths for profiling (and timing studies)
879  if self.config.profiling:
880  paths.append( "-HLTriggerFirstPath" )
881  paths.append( "-HLTAnalyzerEndpath" )
882 
883  # this should never be in any dump (nor online menu)
884  paths.append( "-OfflineOutput" )
885 
886  # expand all wildcards
887  paths = self.expandWildcards(paths, self.all_paths)
888 
889  if self.config.paths:
890  # do an "additive" consolidation
891  self.options['paths'] = self.consolidatePositiveList(paths)
892  if not self.options['paths']:
893  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
894  else:
895  # do a "subtractive" consolidation
896  self.options['paths'] = self.consolidateNegativeList(paths)
897 
898 
899  def buildOptions(self):
900  # common configuration for all scenarios
901  self.options['services'].append( "-DQM" )
902  self.options['services'].append( "-FUShmDQMOutputService" )
903  self.options['services'].append( "-MicroStateService" )
904  self.options['services'].append( "-ModuleWebRegistry" )
905  self.options['services'].append( "-TimeProfilerService" )
906 
907  # remove the DAQ modules and the online definition of the DQMStore and DQMFileSaver
908  # unless a hilton-like configuration has been requested
909  if not self.config.hilton:
910  self.options['services'].append( "-EvFDaqDirector" )
911  self.options['services'].append( "-FastMonitoringService" )
912  self.options['services'].append( "-DQMStore" )
913  self.options['modules'].append( "-hltDQMFileSaver" )
914 
915  if self.config.fragment:
916  # extract a configuration file fragment
917  self.options['essources'].append( "-GlobalTag" )
918  self.options['essources'].append( "-HepPDTESSource" )
919  self.options['essources'].append( "-XMLIdealGeometryESSource" )
920  self.options['essources'].append( "-eegeom" )
921  self.options['essources'].append( "-es_hardcode" )
922  self.options['essources'].append( "-magfield" )
923 
924  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
925  self.options['esmodules'].append( "-SlaveField0" )
926  self.options['esmodules'].append( "-SlaveField20" )
927  self.options['esmodules'].append( "-SlaveField30" )
928  self.options['esmodules'].append( "-SlaveField35" )
929  self.options['esmodules'].append( "-SlaveField38" )
930  self.options['esmodules'].append( "-SlaveField40" )
931  self.options['esmodules'].append( "-VBF0" )
932  self.options['esmodules'].append( "-VBF20" )
933  self.options['esmodules'].append( "-VBF30" )
934  self.options['esmodules'].append( "-VBF35" )
935  self.options['esmodules'].append( "-VBF38" )
936  self.options['esmodules'].append( "-VBF40" )
937  self.options['esmodules'].append( "-CSCGeometryESModule" )
938  self.options['esmodules'].append( "-CaloGeometryBuilder" )
939  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
940  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
941  self.options['esmodules'].append( "-DTGeometryESModule" )
942  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
943  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
944  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
945  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
946  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
947  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
948  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
949  self.options['esmodules'].append( "-MuonNumberingInitialization" )
950  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
951  self.options['esmodules'].append( "-RPCGeometryESModule" )
952  self.options['esmodules'].append( "-SiStripGainESProducer" )
953  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
954  self.options['esmodules'].append( "-SiStripQualityESProducer" )
955  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
956  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
957  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
958  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
959  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
960  self.options['esmodules'].append( "-hcal_db_producer" )
961  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
962  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
963  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
964  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
965  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
966  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
967  self.options['esmodules'].append( "-trackerTopology" )
968 
969  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
970  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
971  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
972  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
973  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
974  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
975  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
976  self.options['esmodules'].append( "-XMLFromDBSource" )
977  self.options['esmodules'].append( "-sistripconn" )
978 
979  self.options['services'].append( "-MessageLogger" )
980 
981  self.options['psets'].append( "-maxEvents" )
982  self.options['psets'].append( "-options" )
983 
984  if self.config.fragment or (self.config.prescale and (self.config.prescale.lower() == 'none')):
985  self.options['services'].append( "-PrescaleService" )
986 
987  if self.config.fragment or self.config.timing:
988  self.options['services'].append( "-FastTimerService" )
989 
990 
991  def append_filenames(self, name, filenames):
992  if len(filenames) > 255:
993  token_open = "( *("
994  token_close = ") )"
995  else:
996  token_open = "("
997  token_close = ")"
998 
999  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
1000  for line in filenames:
1001  self.data += " '%s',\n" % line
1002  self.data += " %s,\n" % (token_close)
1003 
1004 
1005  def expand_filenames(self, input):
1006  # check if the input is a dataset or a list of files
1007  if input[0:8] == 'dataset:':
1008  from dasFileQuery import dasFileQuery
1009  # extract the dataset name, and use DAS to fine the list of LFNs
1010  dataset = input[8:]
1011  files = dasFileQuery(dataset)
1012  else:
1013  # assume a comma-separated list of input files
1014  files = self.config.input.split(',')
1015  return files
1016 
1017  def build_source(self):
1018  if self.config.input:
1019  # if a dataset or a list of input files was given, use it
1020  self.source = self.expand_filenames(self.config.input)
1021  elif self.config.online:
1022  # online we always run on data
1023  self.source = [ "file:/tmp/InputCollection.root" ]
1024  elif self.config.data:
1025  # offline we can run on data...
1026  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1027  else:
1028  # ...or on mc
1029  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1030 
1031  if self.config.parent:
1032  # if a dataset or a list of input files was given for the parent data, use it
1033  self.parent = self.expand_filenames(self.config.parent)
1034 
1035  self.data += """
1036 %(process)ssource = cms.Source( "PoolSource",
1037 """
1038  self.append_filenames("fileNames", self.source)
1039  if (self.parent):
1040  self.append_filenames("secondaryFileNames", self.parent)
1041  self.data += """\
1042  inputCommands = cms.untracked.vstring(
1043  'keep *'
1044  )
1045 )
1046 """
def _fix_parameter
Definition: confdb.py:343
def build_source
Definition: confdb.py:1017
def loadAdditionalConditions
Definition: confdb.py:679
def loadCff
Definition: confdb.py:704
def buildPathList
Definition: confdb.py:846
def instrumentTiming
Definition: confdb.py:716
def runL1Emulator
Definition: confdb.py:512
def instrumentErrorEventType
Definition: confdb.py:400
def switchToNewL1Skim
Definition: confdb.py:577
def expand_filenames
Definition: confdb.py:1005
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:807
def splitter
Definition: confdb.py:11
def overrideGlobalTag
Definition: confdb.py:408
def fixPrescales
Definition: confdb.py:362
def specificCustomize
Definition: confdb.py:162
def consolidateNegativeList
Definition: confdb.py:128
def dumppaths
Definition: confdb.py:840
def loadCffCommand
Definition: confdb.py:697
def runL1EmulatorGT
Definition: confdb.py:481
def consolidatePositiveList
Definition: confdb.py:140
def expandWildcards
Definition: confdb.py:112
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:65
list object
Definition: dbtoconf.py:77
def buildOptions
Definition: confdb.py:899
def overrideProcessName
Definition: confdb.py:622
def overrideL1MenuXml
Definition: confdb.py:462
def append_filenames
Definition: confdb.py:991
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:325
def instrumentOpenMode
Definition: confdb.py:386
def overrideOutput
Definition: confdb.py:596
def overrideParameters
Definition: confdb.py:708
def updateMessageLogger
Definition: confdb.py:668
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