CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions
confdb.HLTProcess Class Reference
Inheritance diagram for confdb.HLTProcess:

Public Member Functions

def __init__ (self, configuration)
 
def addEras (self)
 
def addGlobalOptions (self)
 
def append_filenames (self, name, filenames)
 
def build_source (self)
 
def buildOptions (self)
 
def buildPathList (self)
 
def customize (self)
 
def dump (self)
 
def expand_filenames (self, input)
 
def fixPrescales (self)
 
def getPathList (self)
 
def getRawConfigurationFromDB (self)
 
def getSetupConfigurationFromDB (self)
 
def instrumentDQM (self)
 
def instrumentErrorEventType (self)
 
def instrumentOpenMode (self)
 
def instrumentTiming (self)
 
def loadAdditionalConditions (self, comment, conditions)
 
def loadCff (self, module)
 
def loadCffCommand (self, module)
 
def loadSetupCff (self)
 
def overrideGlobalTag (self)
 
def overrideL1MenuXml (self)
 
def overrideOutput (self)
 
def overrideParameters (self, module, parameters)
 
def overrideProcessName (self)
 
def runL1Emulator (self)
 
def specificCustomize (self)
 
def updateMessageLogger (self)
 

Static Public Member Functions

def consolidateNegativeList (elements)
 
def consolidatePositiveList (elements)
 
def dumppaths (paths)
 
def expandWildcards (globs, collection)
 

Public Attributes

 all_paths
 
 config
 
 converter
 
 data
 
 labels
 
 options
 
 parent
 
 source
 

Private Member Functions

def _fix_parameter (self, args)
 

Detailed Description

Definition at line 21 of file confdb.py.

Constructor & Destructor Documentation

def confdb.HLTProcess.__init__ (   self,
  configuration 
)

Definition at line 23 of file confdb.py.

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.prescale and (self.config.prescale.lower() != 'none'):
49  self.labels['prescale'] = self.config.prescale
50 
51  # get the configuration from ConfdB
52  from confdbOfflineConverter import OfflineConverter
53  self.converter = OfflineConverter(version = self.config.menu.version, database = self.config.menu.database)
54  self.buildPathList()
55  self.buildOptions()
58  self.customize()
59 
def __init__(self, configuration)
Definition: confdb.py:23
def getSetupConfigurationFromDB(self)
Definition: confdb.py:60
def buildOptions(self)
Definition: confdb.py:692
def customize(self)
Definition: confdb.py:232
def getRawConfigurationFromDB(self)
Definition: confdb.py:82
def buildPathList(self)
Definition: confdb.py:636

Member Function Documentation

def confdb.HLTProcess._fix_parameter (   self,
  args 
)
private
arguments:
name:     parameter name (optional)
type:     parameter type (look for tracked and untracked variants)
value:    original value
replace:  replacement value

Definition at line 321 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize(), and confdb.HLTProcess.instrumentErrorEventType().

321  def _fix_parameter(self, **args):
322  """arguments:
323  name: parameter name (optional)
324  type: parameter type (look for tracked and untracked variants)
325  value: original value
326  replace: replacement value
327  """
328  if 'name' in args:
329  self.data = re.sub(
330  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
331  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
332  self.data)
333  else:
334  self.data = re.sub(
335  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
336  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
337  self.data)
338 
339 
def _fix_parameter(self, args)
Definition: confdb.py:321
def confdb.HLTProcess.addEras (   self)
def confdb.HLTProcess.addGlobalOptions (   self)

Definition at line 302 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

302  def addGlobalOptions(self):
303  # add global options
304  self.data += """
305 # limit the number of events to be processed
306 %%(process)s.maxEvents = cms.untracked.PSet(
307  input = cms.untracked.int32( %d )
308 )
309 """ % self.config.events
310 
311  self.data += """
312 # enable TrigReport, TimeReport and MultiThreading
313 %(process)s.options = cms.untracked.PSet(
314  wantSummary = cms.untracked.bool( True ),
315  numberOfThreads = cms.untracked.uint32( 4 ),
316  numberOfStreams = cms.untracked.uint32( 0 ),
317  sizeOfStackForThreadsInKB = cms.untracked.uint32( 10*1024 )
318 )
319 """
320 
def addGlobalOptions(self)
Definition: confdb.py:302
def confdb.HLTProcess.append_filenames (   self,
  name,
  filenames 
)
def confdb.HLTProcess.build_source (   self)

Definition at line 810 of file confdb.py.

References confdb.HLTProcess.append_filenames(), CombinedSVCalibration.data, DOTExport.DotProducer.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, QGLikelihoodObject.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, confdb.HLTProcess.expand_filenames(), confdb.HLTProcess.parent, FWPSetTableManager::PSetData.parent, BeautifulSoup.PageElement.parent, confdb.HLTProcess.source, lhef::XMLDocument.source, DQMNet::Peer.source, Config.Process.source, gen::Hydjet2Hadronizer.source, and BeautifulSoup.ResultSet.source.

Referenced by confdb.HLTProcess.customize().

810  def build_source(self):
811  if self.config.input:
812  # if a dataset or a list of input files was given, use it
813  self.source = self.expand_filenames(self.config.input)
814  elif self.config.data:
815  # offline we can run on data...
816  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
817  else:
818  # ...or on mc
819  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
820 
821  if self.config.parent:
822  # if a dataset or a list of input files was given for the parent data, use it
823  self.parent = self.expand_filenames(self.config.parent)
824 
825  self.data += """
826 %(process)s.source = cms.Source( "PoolSource",
827 """
828  self.append_filenames("fileNames", self.source)
829  if (self.parent):
830  self.append_filenames("secondaryFileNames", self.parent)
831  self.data += """\
832  inputCommands = cms.untracked.vstring(
833  'keep *'
834  )
835 )
836 """
837 
def expand_filenames(self, input)
Definition: confdb.py:798
def build_source(self)
Definition: confdb.py:810
def append_filenames(self, name, filenames)
Definition: confdb.py:784
def confdb.HLTProcess.buildOptions (   self)

Definition at line 692 of file confdb.py.

References mps_alisetup.append, FileExportPlugin.FileExportPlugin.options, DOTExport.DotProducer.options, and confdb.HLTProcess.options.

692  def buildOptions(self):
693  # common configuration for all scenarios
694  self.options['services'].append( "-DQM" )
695  self.options['services'].append( "-FUShmDQMOutputService" )
696  self.options['services'].append( "-MicroStateService" )
697  self.options['services'].append( "-ModuleWebRegistry" )
698  self.options['services'].append( "-TimeProfilerService" )
699 
700  # remove the DAQ modules and the online definition of the DQMStore and DQMFileSaver
701  # unless a hilton-like configuration has been requested
702  if not self.config.hilton:
703  self.options['services'].append( "-EvFDaqDirector" )
704  self.options['services'].append( "-FastMonitoringService" )
705  self.options['services'].append( "-DQMStore" )
706  self.options['modules'].append( "-hltDQMFileSaver" )
707 
708  if self.config.fragment:
709  # extract a configuration file fragment
710  self.options['essources'].append( "-GlobalTag" )
711  self.options['essources'].append( "-HepPDTESSource" )
712  self.options['essources'].append( "-XMLIdealGeometryESSource" )
713  self.options['essources'].append( "-eegeom" )
714  self.options['essources'].append( "-es_hardcode" )
715  self.options['essources'].append( "-magfield" )
716 
717  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
718  self.options['esmodules'].append( "-SlaveField0" )
719  self.options['esmodules'].append( "-SlaveField20" )
720  self.options['esmodules'].append( "-SlaveField30" )
721  self.options['esmodules'].append( "-SlaveField35" )
722  self.options['esmodules'].append( "-SlaveField38" )
723  self.options['esmodules'].append( "-SlaveField40" )
724  self.options['esmodules'].append( "-VBF0" )
725  self.options['esmodules'].append( "-VBF20" )
726  self.options['esmodules'].append( "-VBF30" )
727  self.options['esmodules'].append( "-VBF35" )
728  self.options['esmodules'].append( "-VBF38" )
729  self.options['esmodules'].append( "-VBF40" )
730  self.options['esmodules'].append( "-CSCGeometryESModule" )
731  self.options['esmodules'].append( "-CaloGeometryBuilder" )
732  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
733  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
734  self.options['esmodules'].append( "-DTGeometryESModule" )
735  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
736  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
737  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
738  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
739  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
740  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
741  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
742  self.options['esmodules'].append( "-MuonNumberingInitialization" )
743  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
744  self.options['esmodules'].append( "-RPCGeometryESModule" )
745  self.options['esmodules'].append( "-SiStripGainESProducer" )
746  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
747  self.options['esmodules'].append( "-SiStripQualityESProducer" )
748  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
749  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
750  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
751  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
752  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
753  self.options['esmodules'].append( "-hcal_db_producer" )
754  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
755  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
756  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
757  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
758  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
759  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
760  self.options['esmodules'].append( "-trackerTopology" )
761 
762  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
763  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
764  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
765  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
766  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
767  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
768  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
769  self.options['esmodules'].append( "-XMLFromDBSource" )
770  self.options['esmodules'].append( "-sistripconn" )
771 
772  self.options['services'].append( "-MessageLogger" )
773 
774  self.options['psets'].append( "-maxEvents" )
775  self.options['psets'].append( "-options" )
776 
777  if self.config.fragment or (self.config.prescale and (self.config.prescale.lower() == 'none')):
778  self.options['services'].append( "-PrescaleService" )
779 
780  if self.config.fragment or self.config.timing:
781  self.options['services'].append( "-FastTimerService" )
782 
783 
def buildOptions(self)
Definition: confdb.py:692
def confdb.HLTProcess.buildPathList (   self)

Definition at line 636 of file confdb.py.

636  def buildPathList(self):
637  self.all_paths = self.getPathList()
638 
639  if self.config.paths:
640  # no path list was requested, dump the full table, minus unsupported / unwanted paths
641  paths = self.config.paths.split(',')
642  else:
643  # dump only the requested paths, plus the eventual output endpaths
644  paths = []
645 
646  if self.config.fragment or self.config.output in ('none', 'full'):
647  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
648  if self.config.paths:
649  # paths are removed by default
650  pass
651  else:
652  # drop all output endpaths
653  paths.append( "-*Output" )
654  paths.append( "-RatesMonitoring")
655  paths.append( "-DQMHistograms")
656  elif self.config.output == 'minimal':
657  # drop all output endpaths but HLTDQMResultsOutput
658  if self.config.paths:
659  paths.append( "HLTDQMResultsOutput" )
660  else:
661  paths.append( "-*Output" )
662  paths.append( "-RatesMonitoring")
663  paths.append( "-DQMHistograms")
664  paths.append( "HLTDQMResultsOutput" )
665  else:
666  # keep / add back all output endpaths
667  if self.config.paths:
668  paths.append( "*Output" )
669  else:
670  pass # paths are kepy by default
671 
672  # drop unwanted paths for profiling (and timing studies)
673  if self.config.profiling:
674  paths.append( "-HLTAnalyzerEndpath" )
675 
676  # this should never be in any dump (nor online menu)
677  paths.append( "-OfflineOutput" )
678 
679  # expand all wildcards
680  paths = self.expandWildcards(paths, self.all_paths)
681 
682  if self.config.paths:
683  # do an "additive" consolidation
684  self.options['paths'] = self.consolidatePositiveList(paths)
685  if not self.options['paths']:
686  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
687  else:
688  # do a "subtractive" consolidation
689  self.options['paths'] = self.consolidateNegativeList(paths)
690 
691 
def getPathList(self)
Definition: confdb.py:99
def consolidatePositiveList(elements)
Definition: confdb.py:152
def buildPathList(self)
Definition: confdb.py:636
def consolidateNegativeList(elements)
Definition: confdb.py:140
def expandWildcards(globs, collection)
Definition: confdb.py:124
def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 140 of file confdb.py.

140  def consolidateNegativeList(elements):
141  # consolidate a list of path exclusions and re-inclusions
142  # the result is the list of paths to be removed from the dump
143  result = set()
144  for element in elements:
145  if element[0] == '-':
146  result.add( element )
147  else:
148  result.discard( '-' + element )
149  return sorted( element for element in result )
150 
def consolidateNegativeList(elements)
Definition: confdb.py:140
def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 152 of file confdb.py.

152  def consolidatePositiveList(elements):
153  # consolidate a list of path selection and re-exclusions
154  # the result is the list of paths to be included in the dump
155  result = set()
156  for element in elements:
157  if element[0] == '-':
158  result.discard( element[1:] )
159  else:
160  result.add( element )
161  return sorted( element for element in result )
162 
163 
def consolidatePositiveList(elements)
Definition: confdb.py:152
def confdb.HLTProcess.customize (   self)

Definition at line 232 of file confdb.py.

References confdb.HLTProcess._fix_parameter(), confdb.HLTProcess.addEras(), confdb.HLTProcess.addGlobalOptions(), confdb.HLTProcess.build_source(), DOTExport.DotProducer.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, QGLikelihoodObject.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, confdb.HLTProcess.fixPrescales(), confdb.HLTProcess.instrumentDQM(), confdb.HLTProcess.instrumentErrorEventType(), confdb.HLTProcess.instrumentOpenMode(), confdb.HLTProcess.instrumentTiming(), confdb.HLTProcess.loadSetupCff(), confdb.HLTProcess.overrideGlobalTag(), confdb.HLTProcess.overrideL1MenuXml(), confdb.HLTProcess.overrideOutput(), confdb.HLTProcess.overrideProcessName(), confdb.HLTProcess.runL1Emulator(), confdb.HLTProcess.specificCustomize(), and confdb.HLTProcess.updateMessageLogger().

232  def customize(self):
233 
234  # adapt the source to the current scenario
235  if not self.config.fragment:
236  self.build_source()
237 
238  # manual override some parameters
239  if self.config.type in ('HIon', ):
240  if self.config.data:
241  if not self.config.fragment:
242  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
243 
244  # if requested, remove the HLT prescales
245  self.fixPrescales()
246 
247  # if requested, override all ED/HLTfilters to always pass ("open" mode)
248  self.instrumentOpenMode()
249 
250  # if requested, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
252 
253  # if requested, instrument the self with the modules and EndPath needed for timing studies
254  self.instrumentTiming()
255 
256  # if requested, override the L1 self from the GlobalTag (Xml)
257  self.overrideL1MenuXml()
258 
259  # if requested, run the L1 emulator
260  self.runL1Emulator()
261 
262  # add process.load("setup_cff")
263  self.loadSetupCff()
264 
265  if self.config.fragment:
266  self.data += """
267 # dummyfy hltGetConditions in cff's
268 if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
269  %(process)s.hltDummyConditions = cms.EDFilter( "HLTBool",
270  result = cms.bool( True )
271  )
272  %(process)s.HLTriggerFirstPath.replace(%(process)s.hltGetConditions,%(process)s.hltDummyConditions)
273 """
274 
275  else:
276 
277  # override the process name and adapt the relevant filters
278  self.overrideProcessName()
279 
280  # select specific Eras
281  self.addEras()
282 
283  # override the output modules to output root files
284  self.overrideOutput()
285 
286  # add global options
287  self.addGlobalOptions()
288 
289  # if requested or necessary, override the GlobalTag and connection strings (incl. L1!)
290  self.overrideGlobalTag()
291 
292  # request summary informations from the MessageLogger
293  self.updateMessageLogger()
294 
295  # replace DQMStore and DQMRootOutputModule with a configuration suitable for running offline
296  self.instrumentDQM()
297 
298  # add specific customisations
299  self.specificCustomize()
300 
301 
def loadSetupCff(self)
Definition: confdb.py:480
def addGlobalOptions(self)
Definition: confdb.py:302
def overrideProcessName(self)
Definition: confdb.py:487
def runL1Emulator(self)
Definition: confdb.py:440
def instrumentErrorEventType(self)
Definition: confdb.py:378
def overrideOutput(self)
Definition: confdb.py:450
def customize(self)
Definition: confdb.py:232
def addEras(self)
Definition: confdb.py:474
def updateMessageLogger(self)
Definition: confdb.py:507
def overrideL1MenuXml(self)
Definition: confdb.py:430
def overrideGlobalTag(self)
Definition: confdb.py:386
def specificCustomize(self)
Definition: confdb.py:174
def instrumentOpenMode(self)
Definition: confdb.py:364
def build_source(self)
Definition: confdb.py:810
def instrumentDQM(self)
Definition: confdb.py:597
def fixPrescales(self)
Definition: confdb.py:340
def instrumentTiming(self)
Definition: confdb.py:555
def _fix_parameter(self, args)
Definition: confdb.py:321
def confdb.HLTProcess.dumppaths (   paths)
static

Definition at line 630 of file confdb.py.

630  def dumppaths(paths):
631  sys.stderr.write('Path selection:\n')
632  for path in paths:
633  sys.stderr.write('\t%s\n' % path)
634  sys.stderr.write('\n\n')
635 
def dumppaths(paths)
Definition: confdb.py:630
def confdb.HLTProcess.expand_filenames (   self,
  input 
)

Definition at line 798 of file confdb.py.

Referenced by confdb.HLTProcess.build_source().

798  def expand_filenames(self, input):
799  # check if the input is a dataset or a list of files
800  if input[0:8] == 'dataset:':
801  from dasFileQuery import dasFileQuery
802  # extract the dataset name, and use DAS to fine the list of LFNs
803  dataset = input[8:]
804  files = dasFileQuery(dataset)
805  else:
806  # assume a comma-separated list of input files
807  files = input.split(',')
808  return files
809 
def expand_filenames(self, input)
Definition: confdb.py:798
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 124 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

124  def expandWildcards(globs, collection):
125  # expand a list of unix-style wildcards matching a given collection
126  # wildcards with no matches are silently discarded
127  matches = []
128  for glob in globs:
129  negate = ''
130  if glob[0] == '-':
131  negate = '-'
132  glob = glob[1:]
133  # translate a unix-style glob expression into a regular expression
134  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
135  matches.extend( negate + element for element in collection if filter.match(element) )
136  return matches
137 
138 
def replace(string, replacements)
def expandWildcards(globs, collection)
Definition: confdb.py:124
def confdb.HLTProcess.fixPrescales (   self)

Definition at line 340 of file confdb.py.

References confdb.HLTProcess.all_paths, CombinedTauTagCalibration.data, CombinedSVCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, FileExportPlugin.FileExportPlugin.options, DOTExport.DotProducer.options, and confdb.HLTProcess.options.

Referenced by confdb.HLTProcess.customize().

340  def fixPrescales(self):
341  # update the PrescaleService to match the new list of paths
342  if self.options['paths']:
343  if self.options['paths'][0][0] == '-':
344  # drop requested paths
345  for minuspath in self.options['paths']:
346  path = minuspath[1:]
347  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
348  else:
349  # keep requested paths
350  for path in self.all_paths:
351  if path not in self.options['paths']:
352  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
353 
354  if self.config.prescale and (self.config.prescale.lower() != 'none'):
355  # TO DO: check that the requested prescale column is valid
356  self.data += """
357 # force the use of a specific HLT prescale column
358 if 'PrescaleService' in %(dict)s:
359  %(process)s.PrescaleService.forceDefault = True
360  %(process)s.PrescaleService.lvl1DefaultLabel = '%(prescale)s'
361 """
362 
363 
def fixPrescales(self)
Definition: confdb.py:340
def confdb.HLTProcess.getPathList (   self)

Definition at line 99 of file confdb.py.

99  def getPathList(self):
100  if self.config.menu.run:
101  args = ['--runNumber', self.config.menu.run]
102  else:
103  args = ['--configName', self.config.menu.name]
104  args.extend( (
105  '--cff',
106  '--noedsources',
107  '--noes',
108  '--noservices',
109  '--nosequences',
110  '--nomodules'
111  ) )
112 
113  data, err = self.converter.query( *args )
114  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
115  sys.stderr.write("%s: error while retrieving the list of paths from the HLT menu\n\n" % os.path.basename(sys.argv[0]))
116  sys.stderr.write(err + "\n\n")
117  sys.exit(1)
118  filter = re.compile(r' *= *cms.(End)?Path.*')
119  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
120  return paths
121 
122 
def getPathList(self)
Definition: confdb.py:99
def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 82 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, and join().

83  if self.config.menu.run:
84  args = ['--runNumber', self.config.menu.run]
85  else:
86  args = ['--configName', self.config.menu.name ]
87  args.append('--noedsources')
88  for key, vals in self.options.iteritems():
89  if vals:
90  args.extend(('--'+key, ','.join(vals)))
91 
92  data, err = self.converter.query( *args )
93  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
94  sys.stderr.write("%s: error while retrieving the HLT menu\n\n" % os.path.basename(sys.argv[0]))
95  sys.stderr.write(err + "\n\n")
96  sys.exit(1)
97  self.data = data
98 
def getRawConfigurationFromDB(self)
Definition: confdb.py:82
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def confdb.HLTProcess.getSetupConfigurationFromDB (   self)

Definition at line 60 of file confdb.py.

References FrontierConditions_GlobalTag_cff.file, join(), python.rootplot.root2matplotlib.replace(), and TriggerAnalyzer.write().

61  if not self.config.setup:
62  return
63  ## if --setup is a python file, use directly that file as setup_cff.py
64  if ".py" in self.config.setup:
65  self.config.setupFile = self.config.setup.split(".py")[0]
66  return
67  args = ['--configName', self.config.setup ]
68  args.append('--noedsources')
69  args.append('--nopaths')
70  for key, vals in self.options.iteritems():
71  if vals:
72  args.extend(('--'+key, ','.join(vals)))
73  args.append('--cff')
74  data, err = self.converter.query( *args )
75  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
76  sys.stderr.write("%s: error while retrieving the HLT setup menu\n\n" % os.path.basename(sys.argv[0]))
77  sys.stderr.write(err + "\n\n")
78  sys.exit(1)
79  self.config.setupFile = "setup_"+self.config.setup[1:].replace("/","_")+"_cff"
80  file(self.config.setupFile+".py","w+").write("# This file is automatically generated by hltGetConfiguration.\n" + data)
81 
def getSetupConfigurationFromDB(self)
Definition: confdb.py:60
def replace(string, replacements)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def write(self, setup)
def confdb.HLTProcess.instrumentDQM (   self)

Definition at line 597 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, and confdb.HLTProcess.loadCffCommand().

Referenced by confdb.HLTProcess.customize().

597  def instrumentDQM(self):
598  if not self.config.hilton:
599  # remove any reference to the hltDQMFileSaver
600  if 'hltDQMFileSaver' in self.data:
601  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
602  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
603  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
604 
605  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
606  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
607  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
608  dqmstore += "%(process)s.DQMStore.enableMultiThread = True\n"
609  dqmstore += """
610 %(process)s.dqmOutput = cms.OutputModule("DQMRootOutputModule",
611  fileName = cms.untracked.string("DQMIO.root")
612 )
613 """
614 
615  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
616  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
617  if empty_path.search(self.data):
618  # replace an empty DQMOutput path
619  self.data = empty_path.sub(dqmstore + '\n%(process)s.DQMOutput = cms.EndPath( %(process)s.dqmOutput )\n', self.data)
620  elif other_path.search(self.data):
621  # prepend the dqmOutput to the DQMOutput path
622  self.data = other_path.sub(dqmstore + r'\g<1> %(process)s.dqmOutput +\g<3>', self.data)
623  else:
624  # ceate a new DQMOutput path with the dqmOutput module
625  self.data += dqmstore
626  self.data += '\n%(process)s.DQMOutput = cms.EndPath( %(process)s.dqmOutput )\n'
627 
628 
def loadCffCommand(self, module)
Definition: confdb.py:536
def instrumentDQM(self)
Definition: confdb.py:597
def confdb.HLTProcess.instrumentErrorEventType (   self)

Definition at line 378 of file confdb.py.

References confdb.HLTProcess._fix_parameter().

Referenced by confdb.HLTProcess.customize().

379  if self.config.errortype:
380  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
381  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
382  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
383  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
384 
385 
def instrumentErrorEventType(self)
Definition: confdb.py:378
def _fix_parameter(self, args)
Definition: confdb.py:321
def confdb.HLTProcess.instrumentOpenMode (   self)

Definition at line 364 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, and join().

Referenced by confdb.HLTProcess.customize().

365  if self.config.open:
366  # find all EDfilters
367  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
368  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
369  # remove existing 'cms.ignore' and '~' modifiers
370  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
371  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
372  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
373  for some in splitter(filters, 1000):
374  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
375  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
376 
377 
def instrumentOpenMode(self)
Definition: confdb.py:364
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def confdb.HLTProcess.instrumentTiming (   self)

Definition at line 555 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, and confdb.HLTProcess.loadCff().

Referenced by confdb.HLTProcess.customize().

555  def instrumentTiming(self):
556 
557  if self.config.timing:
558  self.data += """
559 # instrument the menu with the modules and EndPath needed for timing studies
560 """
561 
562  self.data += '\n# configure the FastTimerService\n'
563  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
564 
565  self.data += """# print a text summary at the end of the job
566 %(process)s.FastTimerService.printEventSummary = False
567 %(process)s.FastTimerService.printRunSummary = False
568 %(process)s.FastTimerService.printJobSummary = True
569 
570 # enable DQM plots
571 %(process)s.FastTimerService.enableDQM = True
572 
573 # enable per-path DQM plots (starting with CMSSW 9.2.3-patch2)
574 %(process)s.FastTimerService.enableDQMbyPath = True
575 
576 # enable per-module DQM plots
577 %(process)s.FastTimerService.enableDQMbyModule = True
578 
579 # enable per-event DQM plots vs lumisection
580 %(process)s.FastTimerService.enableDQMbyLumiSection = True
581 %(process)s.FastTimerService.dqmLumiSectionsRange = 2500
582 
583 # set the time resolution of the DQM plots
584 %(process)s.FastTimerService.dqmTimeRange = 2000.
585 %(process)s.FastTimerService.dqmTimeResolution = 10.
586 %(process)s.FastTimerService.dqmPathTimeRange = 1000.
587 %(process)s.FastTimerService.dqmPathTimeResolution = 5.
588 %(process)s.FastTimerService.dqmModuleTimeRange = 200.
589 %(process)s.FastTimerService.dqmModuleTimeResolution = 1.
590 
591 # set the base DQM folder for the plots
592 %(process)s.FastTimerService.dqmPath = 'HLT/TimerService'
593 %(process)s.FastTimerService.enableDQMbyProcesses = False
594 """
595 
596 
def loadCff(self, module)
Definition: confdb.py:543
def instrumentTiming(self)
Definition: confdb.py:555
def confdb.HLTProcess.loadAdditionalConditions (   self,
  comment,
  conditions 
)

Definition at line 519 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

519  def loadAdditionalConditions(self, comment, *conditions):
520  # load additional conditions
521  self.data += """
522 # %s
523 if 'GlobalTag' in %%(dict)s:
524 """ % comment
525  for condition in conditions:
526  self.data += """ %%(process)s.GlobalTag.toGet.append(
527  cms.PSet(
528  record = cms.string( '%(record)s' ),
529  tag = cms.string( '%(tag)s' ),
530  label = cms.untracked.string( '%(label)s' ),
531  )
532  )
533 """ % condition
534 
535 
def loadAdditionalConditions(self, comment, conditions)
Definition: confdb.py:519
def confdb.HLTProcess.loadCffCommand (   self,
  module 
)

Definition at line 536 of file confdb.py.

Referenced by confdb.HLTProcess.instrumentDQM(), and confdb.HLTProcess.loadCff().

536  def loadCffCommand(self, module):
537  # load a cfi or cff module
538  if self.config.fragment:
539  return 'from %s import *\n' % module
540  else:
541  return 'process.load( "%s" )\n' % module
542 
def loadCffCommand(self, module)
Definition: confdb.py:536
def confdb.HLTProcess.overrideGlobalTag (   self)

Definition at line 386 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

386  def overrideGlobalTag(self):
387  # overwrite GlobalTag
388  # the logic is:
389  # - if a GlobalTag is specified on the command line:
390  # - override the global tag
391  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
392  # - if a GlobalTag is NOT specified on the command line:
393  # - when running on data, do nothing, and keep the global tag in the menu
394  # - when running on mc, take the GT from the configuration.type
395 
396  # override the GlobalTag connection string and pfnPrefix
397 
398  # when running on MC, override the global tag even if not specified on the command line
399  if not self.config.data and not self.config.globaltag:
400  if self.config.type in globalTag:
401  self.config.globaltag = globalTag[self.config.type]
402  else:
403  self.config.globaltag = globalTag['GRun']
404 
405  # if requested, override the L1 menu from the GlobalTag
406  if self.config.l1.override:
407  self.config.l1.tag = self.config.l1.override
408  self.config.l1.record = 'L1TUtmTriggerMenuRcd'
409  self.config.l1.connect = ''
410  self.config.l1.label = ''
411  if not self.config.l1.snapshotTime:
412  self.config.l1.snapshotTime = '9999-12-31 23:59:59.000'
413  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s,%(label)s,%(snapshotTime)s' % self.config.l1.__dict__
414  else:
415  self.config.l1cond = None
416 
417  if self.config.globaltag or self.config.l1cond:
418  text = """
419 # override the GlobalTag, connection string and pfnPrefix
420 if 'GlobalTag' in %(dict)s:
421  from Configuration.AlCa.GlobalTag import GlobalTag as customiseGlobalTag
422  %(process)s.GlobalTag = customiseGlobalTag(%(process)s.GlobalTag"""
423  if self.config.globaltag:
424  text += ", globaltag = %s" % repr(self.config.globaltag)
425  if self.config.l1cond:
426  text += ", conditions = %s" % repr(self.config.l1cond)
427  text += ")\n"
428  self.data += text
429 
def overrideGlobalTag(self)
Definition: confdb.py:386
def confdb.HLTProcess.overrideL1MenuXml (   self)
def confdb.HLTProcess.overrideOutput (   self)

Definition at line 450 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

450  def overrideOutput(self):
451  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
452  self.data = re.sub(
453  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
454  r'%(process)s.hltOutput\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 ),',
455  self.data
456  )
457 
458  if not self.config.fragment and self.config.output == 'full':
459  # add a single "keep *" output
460  self.data += """
461 # add a single "keep *" output
462 %(process)s.hltOutputFULL = cms.OutputModule( "PoolOutputModule",
463  fileName = cms.untracked.string( "outputFULL.root" ),
464  fastCloning = cms.untracked.bool( False ),
465  dataset = cms.untracked.PSet(
466  dataTier = cms.untracked.string( 'RECO' ),
467  filterName = cms.untracked.string( '' )
468  ),
469  outputCommands = cms.untracked.vstring( 'keep *' )
470 )
471 %(process)s.FULLOutput = cms.EndPath( %(process)s.hltOutputFULL )
472 """
def overrideOutput(self)
Definition: confdb.py:450
def confdb.HLTProcess.overrideParameters (   self,
  module,
  parameters 
)
def confdb.HLTProcess.overrideProcessName (   self)

Definition at line 487 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

488  if self.config.name is None:
489  return
490 
491  # sanitise process name
492  self.config.name = self.config.name.replace("_","")
493  # override the process name
494  quote = '[\'\"]'
495  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)
496 
497  # when --setup option is used, remove possible errors from PrescaleService due to missing HLT paths.
498  if self.config.setup: self.data += """
499 # avoid PrescaleService error due to missing HLT paths
500 if 'PrescaleService' in process.__dict__:
501  for pset in reversed(process.PrescaleService.prescaleTable):
502  if not hasattr(process,pset.pathName.value()):
503  process.PrescaleService.prescaleTable.remove(pset)
504 """
505 
506 
def overrideProcessName(self)
Definition: confdb.py:487
def confdb.HLTProcess.runL1Emulator (   self)

Definition at line 440 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

440  def runL1Emulator(self):
441  # if requested, run the Full L1T emulator, then repack the data into a new RAW collection, to be used by the HLT
442  if self.config.emulator:
443  text = """
444 # run the Full L1T emulator, then repack the data into a new RAW collection, to be used by the HLT
445 from HLTrigger.Configuration.CustomConfigs import L1REPACK
446 %%(process)s = L1REPACK(%%(process)s,"%s")
447 """ % (self.config.emulator)
448  self.data += text
449 
def runL1Emulator(self)
Definition: confdb.py:440
def confdb.HLTProcess.specificCustomize (   self)

Definition at line 174 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, edmStreamStallGrapher.Stack.data, python.rootplot.root2matplotlib.replace(), confdb.HLTProcess.source, lhef::XMLDocument.source, DQMNet::Peer.source, Config.Process.source, gen::Hydjet2Hadronizer.source, and BeautifulSoup.ResultSet.source.

Referenced by confdb.HLTProcess.customize().

174  def specificCustomize(self):
175  # specific customizations now live in HLTrigger.Configuration.customizeHLTforALL.customizeHLTforAll(.,.)
176  if self.config.fragment:
177  self.data += """
178 # add specific customizations
179 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
180 fragment = customizeHLTforAll(fragment,"%s")
181 """ % (self.config.type)
182  else:
183  if self.config.type=="Fake":
184  prefix = "run1"
185  else:
186  prefix = "run2"
187  _gtData = "auto:"+prefix+"_hlt_"+self.config.type
188  _gtMc = "auto:"+prefix+"_mc_" +self.config.type
189  self.data += """
190 # add specific customizations
191 _customInfo = {}
192 _customInfo['menuType' ]= "%s"
193 _customInfo['globalTags']= {}
194 _customInfo['globalTags'][True ] = "%s"
195 _customInfo['globalTags'][False] = "%s"
196 _customInfo['inputFiles']={}
197 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
198 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
199 _customInfo['maxEvents' ]= %s
200 _customInfo['globalTag' ]= "%s"
201 _customInfo['inputFile' ]= %s
202 _customInfo['realData' ]= %s
203 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
204 %%(process)s = customizeHLTforAll(%%(process)s,"%s",_customInfo)
205 """ % (self.config.type,_gtData,_gtMc,self.config.type,self.config.type,self.config.events,self.config.globaltag,self.source,self.config.data,self.config.type)
206 
207  self.data += """
208 from HLTrigger.Configuration.customizeHLTforCMSSW import customizeHLTforCMSSW
209 %%(process)s = customizeHLTforCMSSW(%%(process)s,"%s")
210 """ % (self.config.type)
211 
212  # Eras-based customisations
213  self.data += """
214 # Eras-based customisations
215 from HLTrigger.Configuration.Eras import modifyHLTforEras
216 modifyHLTforEras(%(process)s)
217 """
218  # add the user-defined customization functions, if any
219  if self.config.customise:
220  self.data += "\n"
221  self.data += "#User-defined customization functions\n"
222  for customise in self.config.customise.split(","):
223  customiseValues = customise.split(".")
224  if len(customiseValues)>=3: raise Exception("--customise option cannot contain more than one dot.")
225  if len(customiseValues)==1:
226  customiseValues.append("customise")
227  customiseValues[0] = customiseValues[0].replace("/",".")
228  self.data += "from "+customiseValues[0]+" import "+customiseValues[1]+"\n"
229  self.data += "process = "+customiseValues[1]+"(process)\n"
230 
def replace(string, replacements)
def specificCustomize(self)
Definition: confdb.py:174
def confdb.HLTProcess.updateMessageLogger (   self)

Definition at line 507 of file confdb.py.

References CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, GeometryComparisonPlotter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, VFATFrame.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

508  # request summary informations from the MessageLogger
509  self.data += """
510 if 'MessageLogger' in %(dict)s:
511  %(process)s.MessageLogger.categories.append('TriggerSummaryProducerAOD')
512  %(process)s.MessageLogger.categories.append('L1GtTrigReport')
513  %(process)s.MessageLogger.categories.append('L1TGlobalSummary')
514  %(process)s.MessageLogger.categories.append('HLTrigReport')
515  %(process)s.MessageLogger.categories.append('FastReport')
516 """
517 
518 
def updateMessageLogger(self)
Definition: confdb.py:507

Member Data Documentation

confdb.HLTProcess.all_paths

Definition at line 637 of file confdb.py.

Referenced by confdb.HLTProcess.fixPrescales().

confdb.HLTProcess.config

Definition at line 24 of file confdb.py.

confdb.HLTProcess.converter

Definition at line 53 of file confdb.py.

confdb.HLTProcess.labels

Definition at line 40 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.parent

Definition at line 27 of file confdb.py.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.addMenuEntry(), Vispa.Views.LineDecayView.LineDecayContainer.applyFilter(), Vispa.Views.BoxDecayView.BoxDecayContainer.arrangeUsingRelations(), Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.autosizeScrollArea(), Vispa.Views.BoxDecayView.BoxDecayContainer.autosizeScrollArea(), confdb.HLTProcess.build_source(), Vispa.Gui.PortWidget.PortWidget.connectionPoint(), Vispa.Main.StartupScreen.StartupScreen.createDescriptionWidget(), Vispa.Views.BoxDecayView.BoxDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.DecayLine.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.delete(), Vispa.Views.LineDecayView.DecayNode.delete(), Vispa.Views.LineDecayView.DecayLine.delete(), Vispa.Gui.VispaWidget.VispaWidget.delete(), Vispa.Gui.VispaWidget.VispaWidget.dragWidget(), Vispa.Share.ImageExporter.ImageExporter.exportImageDialog(), Vispa.Views.LineDecayView.DecayLine.extendedSize(), argparse.HelpFormatter._Section.format_help(), python.rootplot.argparse.HelpFormatter._Section.format_help(), edmIntegrityCheck.PublishToFileSystem.get(), Vispa.Gui.VispaWidget.VispaWidget.keyPressEvent(), Vispa.Gui.MenuWidget.MenuWidget.leaveEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.leaveEvent(), Vispa.Gui.PortWidget.PortWidget.moduleParent(), Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent(), Vispa.Gui.VispaWidget.VispaWidget.mouseDoubleClickEvent(), Vispa.Gui.PortConnection.PointToPointConnection.mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget.mousePressEvent(), Vispa.Views.LineDecayView.ParticleWidget.mousePressEvent(), Vispa.Views.LineDecayView.DecayNode.move(), Vispa.Views.LineDecayView.LineDecayContainer.noDecorationsMode(), Vispa.Views.LineDecayView.LineDecayContainer.operationId(), Vispa.Views.LineDecayView.DecayLine.paint(), Vispa.Gui.VispaWidget.VispaWidget.paintEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), edmIntegrityCheck.PublishToFileSystem.publish(), Vispa.Views.LineDecayView.DecayLine.qtLineStyle(), Vispa.Views.WidgetView.WidgetView.restoreSelection(), Vispa.Views.WidgetView.WidgetView.select(), Vispa.Gui.PortConnection.PointToPointConnection.select(), Vispa.Gui.VispaWidget.VispaWidget.select(), Vispa.Views.LineDecayView.LineDecayContainer.select(), Vispa.Views.LineDecayView.LineDecayContainer.sizeHint(), Vispa.Views.LineDecayView.LineDecayContainer.tabController(), Vispa.Views.BoxDecayView.BoxDecayContainer.toggleCollapsed(), Vispa.Views.LineDecayView.DecayNode.unite(), Vispa.Views.PropertyView.PropertyView.valueChanged(), Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDoubleClicked(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

confdb.HLTProcess.source