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