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

◆ __init__()

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()
56  self.getSetupConfigurationFromDB()
57  self.getRawConfigurationFromDB()
58  self.customize()
59 

Member Function Documentation

◆ _fix_parameter()

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 337 of file confdb.py.

337  def _fix_parameter(self, **args):
338  """arguments:
339  name: parameter name (optional)
340  type: parameter type (look for tracked and untracked variants)
341  value: original value
342  replace: replacement value
343  """
344  if 'name' in args:
345  self.data = re.sub(
346  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
347  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
348  self.data)
349  else:
350  self.data = re.sub(
351  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
352  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
353  self.data)
354 
355 

References mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

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

◆ addEras()

def confdb.HLTProcess.addEras (   self)

Definition at line 510 of file confdb.py.

510  def addEras(self):
511  if self.config.eras is None:
512  return
513  from Configuration.StandardSequences.Eras import eras
514  erasSplit = self.config.eras.split(',')
515  self.data = re.sub(r'process = cms.Process\( *"\w+"', '\n'.join(eras.pythonCfgLines[era] for era in erasSplit)+'\n\g<0>, '+', '.join(era for era in erasSplit), self.data)
516 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, and join().

Referenced by confdb.HLTProcess.customize().

◆ addGlobalOptions()

def confdb.HLTProcess.addGlobalOptions (   self)

Definition at line 319 of file confdb.py.

319  def addGlobalOptions(self):
320  # add global options
321  self.data += """
322 # limit the number of events to be processed
323 %%(process)s.maxEvents = cms.untracked.PSet(
324  input = cms.untracked.int32( %d )
325 )
326 """ % self.config.events
327 
328  self.data += """
329 # enable TrigReport, TimeReport and MultiThreading
330 %(process)s.options = cms.untracked.PSet(
331  wantSummary = cms.untracked.bool( True ),
332  numberOfThreads = cms.untracked.uint32( 4 ),
333  numberOfStreams = cms.untracked.uint32( 0 ),
334 )
335 """
336 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ append_filenames()

def confdb.HLTProcess.append_filenames (   self,
  name,
  filenames 
)

Definition at line 835 of file confdb.py.

835  def append_filenames(self, name, filenames):
836  if len(filenames) > 255:
837  token_open = "( *("
838  token_close = ") )"
839  else:
840  token_open = "("
841  token_close = ")"
842 
843  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
844  for line in filenames:
845  self.data += " '%s',\n" % line
846  self.data += " %s,\n" % (token_close)
847 
848 

References mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.build_source().

◆ build_source()

def confdb.HLTProcess.build_source (   self)

Definition at line 861 of file confdb.py.

861  def build_source(self):
862  if self.config.hilton:
863  # use the DAQ source
864  return
865 
866  if self.config.input:
867  # if a dataset or a list of input files was given, use it
868  self.source = self.expand_filenames(self.config.input)
869  elif self.config.data:
870  # offline we can run on data...
871  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
872  else:
873  # ...or on mc
874  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
875 
876  if self.config.parent:
877  # if a dataset or a list of input files was given for the parent data, use it
878  self.parent = self.expand_filenames(self.config.parent)
879 
880  self.data += """
881 %(process)s.source = cms.Source( "PoolSource",
882 """
883  self.append_filenames("fileNames", self.source)
884  if (self.parent):
885  self.append_filenames("secondaryFileNames", self.parent)
886  self.data += """\
887  inputCommands = cms.untracked.vstring(
888  'keep *'
889  )
890 )
891 """

References confdb.HLTProcess.append_filenames(), geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, confdb.HLTProcess.expand_filenames(), confdb.HLTProcess.parent, FWPSetTableManager::PSetData.parent, SlimmedCount.parent, BeautifulSoup.PageElement.parent, dqm::implementation::IBooker::UseScope< SCOPE >.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().

◆ buildOptions()

def confdb.HLTProcess.buildOptions (   self)

Definition at line 739 of file confdb.py.

739  def buildOptions(self):
740  # common configuration for all scenarios
741  self.options['services'].append( "-DQM" )
742  self.options['services'].append( "-FUShmDQMOutputService" )
743  self.options['services'].append( "-MicroStateService" )
744  self.options['services'].append( "-ModuleWebRegistry" )
745  self.options['services'].append( "-TimeProfilerService" )
746 
747  # remove the DAQ modules and the online definition of the DQMStore and DQMFileSaver
748  # unless a hilton-like configuration has been requested
749  if not self.config.hilton:
750  self.options['services'].append( "-EvFDaqDirector" )
751  self.options['services'].append( "-FastMonitoringService" )
752  self.options['services'].append( "-DQMStore" )
753  self.options['modules'].append( "-hltDQMFileSaver" )
754 
755  if self.config.fragment:
756  # extract a configuration file fragment
757  self.options['essources'].append( "-GlobalTag" )
758  self.options['essources'].append( "-HepPDTESSource" )
759  self.options['essources'].append( "-XMLIdealGeometryESSource" )
760  self.options['essources'].append( "-eegeom" )
761  self.options['essources'].append( "-es_hardcode" )
762  self.options['essources'].append( "-magfield" )
763 
764  self.options['esmodules'].append( "-SlaveField0" )
765  self.options['esmodules'].append( "-SlaveField20" )
766  self.options['esmodules'].append( "-SlaveField30" )
767  self.options['esmodules'].append( "-SlaveField35" )
768  self.options['esmodules'].append( "-SlaveField38" )
769  self.options['esmodules'].append( "-SlaveField40" )
770  self.options['esmodules'].append( "-VBF0" )
771  self.options['esmodules'].append( "-VBF20" )
772  self.options['esmodules'].append( "-VBF30" )
773  self.options['esmodules'].append( "-VBF35" )
774  self.options['esmodules'].append( "-VBF38" )
775  self.options['esmodules'].append( "-VBF40" )
776  self.options['esmodules'].append( "-CSCGeometryESModule" )
777  self.options['esmodules'].append( "-CaloGeometryBuilder" )
778  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
779  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
780  self.options['esmodules'].append( "-DTGeometryESModule" )
781  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
782  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
783  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
784  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
785  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
786  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
787  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
788  self.options['esmodules'].append( "-MuonNumberingInitialization" )
789  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
790  self.options['esmodules'].append( "-RPCGeometryESModule" )
791  self.options['esmodules'].append( "-SiStripGainESProducer" )
792  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
793  self.options['esmodules'].append( "-SiStripQualityESProducer" )
794  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
795  self.options['esmodules'].append( "-TrackerAdditionalParametersPerDetESModule" )
796  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
797  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
798  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
799  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
800  self.options['esmodules'].append( "-hcal_db_producer" )
801  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
802  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
803  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
804  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
805  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
806  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
807  self.options['esmodules'].append( "-trackerTopology" )
808 
809  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
810  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
811  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
812  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
813  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
814  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
815  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
816  self.options['esmodules'].append( "-XMLFromDBSource" )
817  self.options['esmodules'].append( "-sistripconn" )
818 
819  self.options['services'].append( "-MessageLogger" )
820 
821  self.options['psets'].append( "-maxEvents" )
822  self.options['psets'].append( "-options" )
823 
824  # remove Scouting OutputModules even though the EndPaths are kept
825  self.options['modules'].append( "-hltOutputScoutingCaloMuon" )
826  self.options['modules'].append( "-hltOutputScoutingPF" )
827 
828  if self.config.fragment or (self.config.prescale and (self.config.prescale.lower() == 'none')):
829  self.options['services'].append( "-PrescaleService" )
830 
831  if self.config.fragment or self.config.timing:
832  self.options['services'].append( "-FastTimerService" )
833 
834 

References mps_setup.append, geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, TestProcess.TestProcess.options, confdb.HLTProcess.options, Config.Process.options, and validateAlignments.ValidationJobMultiIOV.options.

◆ buildPathList()

def confdb.HLTProcess.buildPathList (   self)

Definition at line 674 of file confdb.py.

674  def buildPathList(self):
675  self.all_paths = self.getPathList()
676 
677  if self.config.paths:
678  # no path list was requested, dump the full table, minus unsupported / unwanted paths
679  paths = self.config.paths.split(',')
680  else:
681  # dump only the requested paths, plus the eventual output endpaths
682  paths = []
683 
684  # 'none' should remove all outputs
685  # 'dqm' should remove all outputs but DQMHistograms
686  # 'minimal' should remove all outputs but DQMHistograms, and add a single output module to keep the TriggerResults and TriggerEvent
687  # 'full' should remove all outputs but DQMHistograms, and add a single output module to "keep *"
688  # See also the `overrideOutput` method
689  if self.config.fragment or self.config.output in ('none', ):
690  if self.config.paths:
691  # keep only the Paths and EndPaths requested explicitly
692  pass
693  else:
694  # drop all output EndPaths but the Scouting ones, and drop the RatesMonitoring and DQMHistograms
695  paths.append( "-*Output" )
696  paths.append( "-RatesMonitoring")
697  paths.append( "-DQMHistograms")
698  if self.config.fragment: paths.append( "Scouting*Output" )
699 
700  elif self.config.output in ('dqm', 'minimal', 'full'):
701  if self.config.paths:
702  # keep only the Paths and EndPaths requested explicitly, and the DQMHistograms
703  paths.append( "DQMHistograms" )
704  else:
705  # drop all output EndPaths but the Scouting ones, and drop the RatesMonitoring
706  paths.append( "-*Output" )
707  paths.append( "-RatesMonitoring")
708  if self.config.fragment: paths.append( "Scouting*Output" )
709 
710  else:
711  if self.config.paths:
712  # keep all output EndPaths, including the DQMHistograms
713  paths.append( "*Output" )
714  paths.append( "DQMHistograms" )
715  else:
716  # keep all Paths and EndPaths
717  pass
718 
719  # drop unwanted paths for profiling (and timing studies)
720  if self.config.profiling:
721  paths.append( "-HLTAnalyzerEndpath" )
722 
723  # this should never be in any dump (nor online menu)
724  paths.append( "-OfflineOutput" )
725 
726  # expand all wildcards
727  paths = self.expandWildcards(paths, self.all_paths)
728 
729  if self.config.paths:
730  # do an "additive" consolidation
731  paths = self.consolidatePositiveList(paths)
732  if not paths:
733  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
734  else:
735  # do a "subtractive" consolidation
736  paths = self.consolidateNegativeList(paths)
737  self.options['paths'] = paths
738 

◆ consolidateNegativeList()

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 143 of file confdb.py.

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

◆ consolidatePositiveList()

def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 155 of file confdb.py.

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

◆ customize()

def confdb.HLTProcess.customize (   self)

Definition at line 241 of file confdb.py.

241  def customize(self):
242 
243  # adapt the source to the current scenario
244  if not self.config.fragment:
245  self.build_source()
246 
247  # manual override some parameters
248  if self.config.type in ('HIon', ):
249  if self.config.data:
250  if not self.config.fragment:
251  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
252 
253  # if requested, remove the HLT prescales
254  self.fixPrescales()
255 
256  # if requested, override all ED/HLTfilters to always pass ("open" mode)
257  self.instrumentOpenMode()
258 
259  # if requested, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
260  self.instrumentErrorEventType()
261 
262  # if requested, instrument the self with the modules and EndPath needed for timing studies
263  self.instrumentTiming()
264 
265  # if requested, override the L1 self from the GlobalTag (Xml)
266  self.overrideL1MenuXml()
267 
268  # if requested, run the L1 emulator
269  self.runL1Emulator()
270 
271  # add process.load("setup_cff")
272  self.loadSetupCff()
273 
274  if self.config.fragment:
275  self.data += """
276 # dummify hltGetConditions in cff's
277 if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
278  %(process)s.hltDummyConditions = cms.EDFilter( "HLTBool",
279  result = cms.bool( True )
280  )
281  %(process)s.HLTriggerFirstPath.replace(%(process)s.hltGetConditions,%(process)s.hltDummyConditions)
282 """
283 
284  # fix the Scouting EndPaths
285  for path in self.all_paths:
286  match = re.match(r'(Scouting\w+)Output$', path)
287  if match:
288  module = 'hltOutput' + match.group(1)
289  self.data = self.data.replace(path+' = cms.EndPath', path+' = cms.Path')
290  self.data = self.data.replace(' + process.'+module, '')
291 
292  else:
293 
294  # override the process name and adapt the relevant filters
295  self.overrideProcessName()
296 
297  # select specific Eras
298  self.addEras()
299 
300  # override the output modules to output root files
301  self.overrideOutput()
302 
303  # add global options
304  self.addGlobalOptions()
305 
306  # if requested or necessary, override the GlobalTag and connection strings (incl. L1!)
307  self.overrideGlobalTag()
308 
309  # request summary informations from the MessageLogger
310  self.updateMessageLogger()
311 
312  # replace DQMStore and DQMRootOutputModule with a configuration suitable for running offline
313  self.instrumentDQM()
314 
315  # add specific customisations
316  self.specificCustomize()
317 
318 

References confdb.HLTProcess._fix_parameter(), confdb.HLTProcess.addEras(), confdb.HLTProcess.addGlobalOptions(), confdb.HLTProcess.all_paths, confdb.HLTProcess.build_source(), geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.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(), python.rootplot.root2matplotlib.replace(), confdb.HLTProcess.runL1Emulator(), confdb.HLTProcess.specificCustomize(), and confdb.HLTProcess.updateMessageLogger().

◆ dump()

def confdb.HLTProcess.dump (   self)

Definition at line 168 of file confdb.py.

168  def dump(self):
169  self.data = self.data % self.labels
170  if self.config.fragment:
171  self.data = re.sub( r'\bprocess\b', 'fragment', self.data )
172  self.data = re.sub( r'\bProcess\b', 'ProcessFragment', self.data )
173  return self.data
174 
175 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, confdb.HLTProcess.labels, ecaldqm::binning::AxisSpecs.labels, uploads.output.labels, and svgfig.Ticks.labels.

◆ dumppaths()

def confdb.HLTProcess.dumppaths (   paths)
static

Definition at line 668 of file confdb.py.

668  def dumppaths(paths):
669  sys.stderr.write('Path selection:\n')
670  for path in paths:
671  sys.stderr.write('\t%s\n' % path)
672  sys.stderr.write('\n\n')
673 

◆ expand_filenames()

def confdb.HLTProcess.expand_filenames (   self,
  input 
)

Definition at line 849 of file confdb.py.

849  def expand_filenames(self, input):
850  # check if the input is a dataset or a list of files
851  if input[0:8] == 'dataset:':
852  from .dasFileQuery import dasFileQuery
853  # extract the dataset name, and use DAS to fine the list of LFNs
854  dataset = input[8:]
855  files = dasFileQuery(dataset)
856  else:
857  # assume a comma-separated list of input files
858  files = input.split(',')
859  return files
860 

Referenced by confdb.HLTProcess.build_source().

◆ expandWildcards()

def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 127 of file confdb.py.

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

References python.rootplot.root2matplotlib.replace().

◆ fixPrescales()

def confdb.HLTProcess.fixPrescales (   self)

Definition at line 356 of file confdb.py.

356  def fixPrescales(self):
357  # update the PrescaleService to match the new list of paths
358  if self.options['paths']:
359  if self.options['paths'][0][0] == '-':
360  # drop requested paths
361  for minuspath in self.options['paths']:
362  path = minuspath[1:]
363  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
364  else:
365  # keep requested paths
366  for path in self.all_paths:
367  if path not in self.options['paths']:
368  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
369 
370  if self.config.prescale and (self.config.prescale.lower() != 'none'):
371  # TO DO: check that the requested prescale column is valid
372  self.data += """
373 # force the use of a specific HLT prescale column
374 if 'PrescaleService' in %(dict)s:
375  %(process)s.PrescaleService.forceDefault = True
376  %(process)s.PrescaleService.lvl1DefaultLabel = '%(prescale)s'
377 """
378 
379 

References confdb.HLTProcess.all_paths, geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, TestProcess.TestProcess.options, confdb.HLTProcess.options, Config.Process.options, and validateAlignments.ValidationJobMultiIOV.options.

Referenced by confdb.HLTProcess.customize().

◆ getPathList()

def confdb.HLTProcess.getPathList (   self)

Definition at line 102 of file confdb.py.

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

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, and confdb.HLTProcess.converter.

◆ getRawConfigurationFromDB()

def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 83 of file confdb.py.

83  def getRawConfigurationFromDB(self):
84  if self.config.menu.run:
85  args = ['--runNumber', self.config.menu.run]
86  else:
87  args = ['--configName', self.config.menu.name ]
88  if not self.config.hilton:
89  # keep the original Source when running on Hilton
90  args.append('--noedsources')
91  for key, vals in self.options.items():
92  if vals:
93  args.extend(('--'+key, ','.join(vals)))
94 
95  data, err = self.converter.query( *args )
96  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
97  sys.stderr.write("%s: error while retrieving the HLT menu\n\n" % os.path.basename(sys.argv[0]))
98  sys.stderr.write(err + "\n\n")
99  sys.exit(1)
100  self.data = data
101 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, confdb.HLTProcess.converter, mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, mps_monitormerge.items, join(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, TestProcess.TestProcess.options, confdb.HLTProcess.options, Config.Process.options, and validateAlignments.ValidationJobMultiIOV.options.

◆ getSetupConfigurationFromDB()

def confdb.HLTProcess.getSetupConfigurationFromDB (   self)

Definition at line 60 of file confdb.py.

60  def getSetupConfigurationFromDB(self):
61  if not self.config.setup:
62  return
63 
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.items():
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  outfile = open(self.config.setupFile+".py","w+")
81  outfile.write("# This file is automatically generated by hltGetConfiguration.\n" + data)
82 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, confdb.HLTProcess.converter, mps_monitormerge.items, join(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, TestProcess.TestProcess.options, confdb.HLTProcess.options, Config.Process.options, validateAlignments.ValidationJobMultiIOV.options, and python.rootplot.root2matplotlib.replace().

◆ instrumentDQM()

def confdb.HLTProcess.instrumentDQM (   self)

Definition at line 636 of file confdb.py.

636  def instrumentDQM(self):
637  if not self.config.hilton:
638  # remove any reference to the hltDQMFileSaver
639  if 'hltDQMFileSaver' in self.data:
640  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
641  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
642  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
643 
644  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
645  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
646  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
647  dqmstore += """
648 %(process)s.dqmOutput = cms.OutputModule("DQMRootOutputModule",
649  fileName = cms.untracked.string("DQMIO.root")
650 )
651 """
652 
653  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
654  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
655  if empty_path.search(self.data):
656  # replace an empty DQMOutput path
657  self.data = empty_path.sub(dqmstore + '\n%(process)s.DQMOutput = cms.EndPath( %(process)s.dqmOutput )\n', self.data)
658  elif other_path.search(self.data):
659  # prepend the dqmOutput to the DQMOutput path
660  self.data = other_path.sub(dqmstore + r'\g<1> %(process)s.dqmOutput +\g<3>', self.data)
661  else:
662  # ceate a new DQMOutput path with the dqmOutput module
663  self.data += dqmstore
664  self.data += '\n%(process)s.DQMOutput = cms.EndPath( %(process)s.dqmOutput )\n'
665 
666 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, and confdb.HLTProcess.loadCffCommand().

Referenced by confdb.HLTProcess.customize().

◆ instrumentErrorEventType()

def confdb.HLTProcess.instrumentErrorEventType (   self)

Definition at line 394 of file confdb.py.

394  def instrumentErrorEventType(self):
395  if self.config.errortype:
396  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
397  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
398  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
399  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
400 
401 

References confdb.HLTProcess._fix_parameter(), geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, and validateAlignments.ValidationJobMultiIOV.config.

Referenced by confdb.HLTProcess.customize().

◆ instrumentOpenMode()

def confdb.HLTProcess.instrumentOpenMode (   self)

Definition at line 380 of file confdb.py.

380  def instrumentOpenMode(self):
381  if self.config.open:
382  # find all EDfilters
383  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
384  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
385  # remove existing 'cms.ignore' and '~' modifiers
386  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
387  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
388  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
389  for some in splitter(filters, 1000):
390  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
391  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
392 
393 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, and join().

Referenced by confdb.HLTProcess.customize().

◆ instrumentTiming()

def confdb.HLTProcess.instrumentTiming (   self)

Definition at line 594 of file confdb.py.

594  def instrumentTiming(self):
595 
596  if self.config.timing:
597  self.data += """
598 # instrument the menu with the modules and EndPath needed for timing studies
599 """
600 
601  self.data += '\n# configure the FastTimerService\n'
602  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
603 
604  self.data += """# print a text summary at the end of the job
605 %(process)s.FastTimerService.printEventSummary = False
606 %(process)s.FastTimerService.printRunSummary = False
607 %(process)s.FastTimerService.printJobSummary = True
608 
609 # enable DQM plots
610 %(process)s.FastTimerService.enableDQM = True
611 
612 # enable per-path DQM plots (starting with CMSSW 9.2.3-patch2)
613 %(process)s.FastTimerService.enableDQMbyPath = True
614 
615 # enable per-module DQM plots
616 %(process)s.FastTimerService.enableDQMbyModule = True
617 
618 # enable per-event DQM plots vs lumisection
619 %(process)s.FastTimerService.enableDQMbyLumiSection = True
620 %(process)s.FastTimerService.dqmLumiSectionsRange = 2500
621 
622 # set the time resolution of the DQM plots
623 %(process)s.FastTimerService.dqmTimeRange = 2000.
624 %(process)s.FastTimerService.dqmTimeResolution = 10.
625 %(process)s.FastTimerService.dqmPathTimeRange = 1000.
626 %(process)s.FastTimerService.dqmPathTimeResolution = 5.
627 %(process)s.FastTimerService.dqmModuleTimeRange = 200.
628 %(process)s.FastTimerService.dqmModuleTimeResolution = 1.
629 
630 # set the base DQM folder for the plots
631 %(process)s.FastTimerService.dqmPath = 'HLT/TimerService'
632 %(process)s.FastTimerService.enableDQMbyProcesses = False
633 """
634 
635 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, and confdb.HLTProcess.loadCff().

Referenced by confdb.HLTProcess.customize().

◆ loadAdditionalConditions()

def confdb.HLTProcess.loadAdditionalConditions (   self,
  comment,
conditions 
)

Definition at line 558 of file confdb.py.

558  def loadAdditionalConditions(self, comment, *conditions):
559  # load additional conditions
560  self.data += """
561 # %s
562 if 'GlobalTag' in %%(dict)s:
563 """ % comment
564  for condition in conditions:
565  self.data += """ %%(process)s.GlobalTag.toGet.append(
566  cms.PSet(
567  record = cms.string( '%(record)s' ),
568  tag = cms.string( '%(tag)s' ),
569  label = cms.untracked.string( '%(label)s' ),
570  )
571  )
572 """ % condition
573 
574 

References mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

◆ loadCff()

def confdb.HLTProcess.loadCff (   self,
  module 
)

◆ loadCffCommand()

def confdb.HLTProcess.loadCffCommand (   self,
  module 
)

◆ loadSetupCff()

def confdb.HLTProcess.loadSetupCff (   self)

Definition at line 518 of file confdb.py.

518  def loadSetupCff(self):
519  if self.config.setup is None:
520  return
521  processLine = self.data.find("\n",self.data.find("cms.Process"))
522  self.data = self.data[:processLine]+'\nprocess.load("%s")'%self.config.setupFile+self.data[processLine:]
523 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, KDTreeNodeInfo< DATA, DIM >.data, calo::multifit::MapSymM< T, Stride, Order >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, edmStreamStallGrapher.Stack.data, and spr.find().

Referenced by confdb.HLTProcess.customize().

◆ overrideGlobalTag()

def confdb.HLTProcess.overrideGlobalTag (   self)

Definition at line 402 of file confdb.py.

402  def overrideGlobalTag(self):
403  # overwrite GlobalTag
404  # the logic is:
405  # - if a GlobalTag is specified on the command line:
406  # - override the global tag
407  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
408  # - if a GlobalTag is NOT specified on the command line:
409  # - when running on data, do nothing, and keep the global tag in the menu
410  # - when running on mc, take the GT from the configuration.type
411 
412  # override the GlobalTag connection string and pfnPrefix
413 
414  # when running on MC, override the global tag even if not specified on the command line
415  if not self.config.data and not self.config.globaltag:
416  if self.config.type in globalTag:
417  self.config.globaltag = globalTag[self.config.type]
418  else:
419  self.config.globaltag = globalTag['GRun']
420 
421  # if requested, override the L1 menu from the GlobalTag
422  if self.config.l1.override:
423  self.config.l1.tag = self.config.l1.override
424  self.config.l1.record = 'L1TUtmTriggerMenuRcd'
425  self.config.l1.connect = ''
426  self.config.l1.label = ''
427  if not self.config.l1.snapshotTime:
428  self.config.l1.snapshotTime = '9999-12-31 23:59:59.000'
429  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s,%(label)s,%(snapshotTime)s' % self.config.l1.__dict__
430  else:
431  self.config.l1cond = None
432 
433  if self.config.globaltag or self.config.l1cond:
434  text = """
435 # override the GlobalTag, connection string and pfnPrefix
436 if 'GlobalTag' in %(dict)s:
437  from Configuration.AlCa.GlobalTag import GlobalTag as customiseGlobalTag
438  %(process)s.GlobalTag = customiseGlobalTag(%(process)s.GlobalTag"""
439  if self.config.globaltag:
440  text += ", globaltag = %s" % repr(self.config.globaltag)
441  if self.config.l1cond:
442  text += ", conditions = %s" % repr(self.config.l1cond)
443  text += ")\n"
444  self.data += text
445 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ overrideL1MenuXml()

def confdb.HLTProcess.overrideL1MenuXml (   self)

Definition at line 446 of file confdb.py.

446  def overrideL1MenuXml(self):
447  # if requested, override the GlobalTag's L1T menu from an Xml file
448  if self.config.l1Xml.XmlFile:
449  text = """
450 # override the GlobalTag's L1T menu from an Xml file
451 from HLTrigger.Configuration.CustomConfigs import L1XML
452 %%(process)s = L1XML(%%(process)s,"%s")
453 """ % (self.config.l1Xml.XmlFile)
454  self.data += text
455 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ overrideOutput()

def confdb.HLTProcess.overrideOutput (   self)

Definition at line 466 of file confdb.py.

466  def overrideOutput(self):
467  # if not runnign on Hilton, override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
468  if not self.config.hilton:
469  self.data = re.sub(
470  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
471  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 ),',
472  self.data
473  )
474 
475  if not self.config.fragment and self.config.output == 'minimal':
476  # add a single output to keep the TriggerResults and TriggerEvent
477  self.data += """
478 # add a single "keep *" output
479 %(process)s.hltOutputMinimal = cms.OutputModule( "PoolOutputModule",
480  fileName = cms.untracked.string( "output.root" ),
481  fastCloning = cms.untracked.bool( False ),
482  dataset = cms.untracked.PSet(
483  dataTier = cms.untracked.string( 'AOD' ),
484  filterName = cms.untracked.string( '' )
485  ),
486  outputCommands = cms.untracked.vstring( 'drop *',
487  'keep edmTriggerResults_*_*_*',
488  'keep triggerTriggerEvent_*_*_*'
489  )
490 )
491 %(process)s.MinimalOutput = cms.EndPath( %(process)s.hltOutputMinimal )
492 """
493  elif not self.config.fragment and self.config.output == 'full':
494  # add a single "keep *" output
495  self.data += """
496 # add a single "keep *" output
497 %(process)s.hltOutputFull = cms.OutputModule( "PoolOutputModule",
498  fileName = cms.untracked.string( "output.root" ),
499  fastCloning = cms.untracked.bool( False ),
500  dataset = cms.untracked.PSet(
501  dataTier = cms.untracked.string( 'RECO' ),
502  filterName = cms.untracked.string( '' )
503  ),
504  outputCommands = cms.untracked.vstring( 'keep *' )
505 )
506 %(process)s.FullOutput = cms.EndPath( %(process)s.hltOutputFull )
507 """
508 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ overrideParameters()

def confdb.HLTProcess.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 586 of file confdb.py.

586  def overrideParameters(self, module, parameters):
587  # override a module's parameter if the module is present in the configuration
588  self.data += "if '%s' in %%(dict)s:\n" % module
589  for (parameter, value) in parameters:
590  self.data += " %%(process)s.%s.%s = %s\n" % (module, parameter, value)
591  self.data += "\n"
592 
593 

References mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

◆ overrideProcessName()

def confdb.HLTProcess.overrideProcessName (   self)

Definition at line 525 of file confdb.py.

525  def overrideProcessName(self):
526  if self.config.name is None:
527  return
528 
529  # sanitise process name
530  self.config.name = self.config.name.replace("_","")
531  # override the process name
532  quote = '[\'\"]'
533  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)
534 
535  # when --setup option is used, remove possible errors from PrescaleService due to missing HLT paths.
536  if self.config.setup: self.data += """
537 # avoid PrescaleService error due to missing HLT paths
538 if 'PrescaleService' in process.__dict__:
539  for pset in reversed(process.PrescaleService.prescaleTable):
540  if not hasattr(process,pset.pathName.value()):
541  process.PrescaleService.prescaleTable.remove(pset)
542 """
543 
544 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ runL1Emulator()

def confdb.HLTProcess.runL1Emulator (   self)

Definition at line 456 of file confdb.py.

456  def runL1Emulator(self):
457  # if requested, run the Full L1T emulator, then repack the data into a new RAW collection, to be used by the HLT
458  if self.config.emulator:
459  text = """
460 # run the Full L1T emulator, then repack the data into a new RAW collection, to be used by the HLT
461 from HLTrigger.Configuration.CustomConfigs import L1REPACK
462 %%(process)s = L1REPACK(%%(process)s,"%s")
463 """ % (self.config.emulator)
464  self.data += text
465 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

◆ specificCustomize()

def confdb.HLTProcess.specificCustomize (   self)

Definition at line 177 of file confdb.py.

177  def specificCustomize(self):
178  # specific customizations now live in HLTrigger.Configuration.customizeHLTforALL.customizeHLTforAll(.,.)
179  if self.config.fragment:
180  self.data += """
181 # add specific customizations
182 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
183 fragment = customizeHLTforAll(fragment,"%s")
184 """ % (self.config.type)
185  elif self.config.hilton:
186  # do not apply the STORM-specific customisation
187  pass
188  else:
189  if self.config.type=="Fake":
190  prefix = "run1"
191  elif self.config.type in ("Fake1","Fake2","2018"):
192  prefix = "run2"
193  else:
194  prefix = "run3"
195  _gtData = "auto:"+prefix+"_hlt_"+self.config.type
196  _gtMc = "auto:"+prefix+"_mc_" +self.config.type
197  self.data += """
198 # add specific customizations
199 _customInfo = {}
200 _customInfo['menuType' ]= "%s"
201 _customInfo['globalTags']= {}
202 _customInfo['globalTags'][True ] = "%s"
203 _customInfo['globalTags'][False] = "%s"
204 _customInfo['inputFiles']={}
205 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
206 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
207 _customInfo['maxEvents' ]= %s
208 _customInfo['globalTag' ]= "%s"
209 _customInfo['inputFile' ]= %s
210 _customInfo['realData' ]= %s
211 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
212 %%(process)s = customizeHLTforAll(%%(process)s,"%s",_customInfo)
213 """ % (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)
214 
215  self.data += """
216 from HLTrigger.Configuration.customizeHLTforCMSSW import customizeHLTforCMSSW
217 %%(process)s = customizeHLTforCMSSW(%%(process)s,"%s")
218 """ % (self.config.type)
219 
220  # Eras-based customisations
221  self.data += """
222 # Eras-based customisations
223 from HLTrigger.Configuration.Eras import modifyHLTforEras
224 modifyHLTforEras(%(process)s)
225 """
226  # add the user-defined customization functions, if any
227  if self.config.customise:
228  self.data += "\n"
229  self.data += "#User-defined customization functions\n"
230  for customise in self.config.customise.split(","):
231  customiseValues = customise.split(".")
232  if len(customiseValues)>=3: raise Exception("--customise option cannot contain more than one dot.")
233  if len(customiseValues)==1:
234  customiseValues.append("customise")
235  customiseValues[0] = customiseValues[0].replace("/",".")
236  self.data += "from "+customiseValues[0]+" import "+customiseValues[1]+"\n"
237  self.data += "process = "+customiseValues[1]+"(process)\n"
238 
239 

References geometry.Alignables.config, confdb.HLTProcess.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, pkg.AbstractPkg.config, cscdqm::EventProcessorMutex.config, genericValidation.GenericValidation.config, CSCOfflineClient.config, validateAlignments.ValidationBase.config, CSCMonitorModule.config, cscdqm::Collection.config, cscdqm::Dispatcher.config, cscdqm::EventProcessor.config, validateAlignments.ValidationJobMultiIOV.config, mat4.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ecal::DigisCollection< StoragePolicy >.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, GeometryComparisonPlotter.data, calo::multifit::MapMForPM< T >.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, data, EcalShowerContainmentCorrections::Coefficients.data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.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().

◆ updateMessageLogger()

def confdb.HLTProcess.updateMessageLogger (   self)

Definition at line 545 of file confdb.py.

545  def updateMessageLogger(self):
546  # request summary informations from the MessageLogger
547  self.data += """
548 if 'MessageLogger' in %(dict)s:
549  %(process)s.MessageLogger.TriggerSummaryProducerAOD = cms.untracked.PSet()
550  %(process)s.MessageLogger.L1GtTrigReport = cms.untracked.PSet()
551  %(process)s.MessageLogger.L1TGlobalSummary = cms.untracked.PSet()
552  %(process)s.MessageLogger.HLTrigReport = cms.untracked.PSet()
553  %(process)s.MessageLogger.FastReport = cms.untracked.PSet()
554  %(process)s.MessageLogger.ThroughputService = cms.untracked.PSet()
555 """
556 
557 

References mat4.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, ecal::DigisCollection< StoragePolicy >.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, ecal::raw::InputDataCPU.data, confdb.HLTProcess.data, SimpleVFATFrameCollection.data, classes.PlotData.data, dqm::DQMFileSaverOnline::SnapshotFiles.data, QGLikelihoodObject.data, calo::multifit::MapSymM< T, Stride, Order >.data, KDTreeNodeInfo< DATA, DIM >.data, hcal::raw::InputDataCPU.data, LASModuleProfile.data, dqmTnP::AbstractFitter.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, KDTreeNodes< DATA, DIM >.data, ecal::raw::InputDataGPU.data, calo::multifit::MapMForPM< T >.data, GeometryComparisonPlotter.data, edm::MapOfVectors< K, T >::Iter.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, hcal::raw::InputDataGPU.data, EcalShowerContainmentCorrections::Coefficients.data, data, edm::DetSet< T >.data, CTPPSCompositeESSource::BinData< T >.data, cscdqm::Cache.data, DQMNet::Bucket.data, hcal::DigiCollectionBase< StoragePolicy >.data, VFATFrame.data, submitPVValidationJobs.Job.data, and edmStreamStallGrapher.Stack.data.

Referenced by confdb.HLTProcess.customize().

Member Data Documentation

◆ all_paths

confdb.HLTProcess.all_paths

Definition at line 675 of file confdb.py.

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

◆ config

confdb.HLTProcess.config

◆ converter

confdb.HLTProcess.converter

◆ data

confdb.HLTProcess.data

◆ labels

confdb.HLTProcess.labels

Definition at line 40 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

◆ options

confdb.HLTProcess.options

◆ parent

confdb.HLTProcess.parent

◆ source

confdb.HLTProcess.source
splitter
Definition: splitter.py:1
submitPVValidationJobs.dump
dump
Definition: submitPVValidationJobs.py:55
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
query
Definition: query.py:1
UserOptions_cff.overrideGlobalTag
overrideGlobalTag
Definition: UserOptions_cff.py:78
Exception
mps_setup.append
append
Definition: mps_setup.py:85
dasFileQuery
Definition: dasFileQuery.py:1
customizeDeltaBetaWeights_cfi.customize
def customize(process)
Definition: customizeDeltaBetaWeights_cfi.py:7
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444