CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def addGlobalOptions
 
def build_source
 
def buildOptions
 
def customize
 
def dump
 
def expandWildcardOptions
 
def fixForFastSim
 
def fixForMC
 
def getPathList
 
def getRawConfigurationFromDB
 
def instrumentOpenMode
 
def instrumentTiming
 
def loadAdditionalConditions
 
def overrideGlobalTag
 
def overrideL1Menu
 
def overrideOutput
 
def overrideProcessName
 
def unprescale
 
def updateMessageLogger
 

Static Public Member Functions

def expandWildcards
 

Public Attributes

 config
 
 data
 
 labels
 
 options
 
 source
 

Private Member Functions

def _build_cmdline
 
def _build_options
 
def _build_query
 
def _build_source
 
def _fix_parameter
 

Detailed Description

Definition at line 9 of file confdb.py.

Constructor & Destructor Documentation

def confdb.HLTProcess.__init__ (   self,
  configuration 
)

Definition at line 10 of file confdb.py.

10 
11  def __init__(self, configuration):
12  self.config = configuration
13  self.data = None
14  self.source = None
15 
16  self.options = {
17  'essources' : [],
18  'esmodules' : [],
19  'modules' : [],
20  'sequences' : [],
21  'services' : [],
22  'paths' : [],
23  'psets' : [],
24  'blocks' : [],
25  }
26 
27  self.labels = {}
28  if self.config.fragment:
29  self.labels['process'] = ''
30  self.labels['dict'] = 'locals()'
31  else:
32  self.labels['process'] = 'process.'
33  self.labels['dict'] = 'process.__dict__'
34 
35  if self.config.online:
36  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
37  else:
38  self.labels['connect'] = 'frontier://FrontierProd'
39 
40  # get the configuration from ConfdB
41  self.buildOptions()
44  self.customize()
45 
def expandWildcardOptions
Definition: confdb.py:86
def getRawConfigurationFromDB
Definition: confdb.py:68

Member Function Documentation

def confdb.HLTProcess._build_cmdline (   self)
private

Definition at line 61 of file confdb.py.

References confdb.HLTProcess._build_options(), confdb.HLTProcess._build_query(), and confdb.HLTProcess._build_source().

Referenced by confdb.HLTProcess.getRawConfigurationFromDB().

61 
62  def _build_cmdline(self):
63  if not self.config.fragment:
64  return 'edmConfigFromDB %s %s %s' % (self._build_query(), self._build_source(), self._build_options())
65  else:
66  return 'edmConfigFromDB --cff %s %s %s' % (self._build_query(), self._build_source(), self._build_options())
67 
def _build_cmdline
Definition: confdb.py:61
def _build_source
Definition: confdb.py:52
def _build_options
Definition: confdb.py:58
def _build_query
Definition: confdb.py:46
def confdb.HLTProcess._build_options (   self)
private

Definition at line 58 of file confdb.py.

References join().

Referenced by confdb.HLTProcess._build_cmdline().

58 
59  def _build_options(self):
60  return ' '.join(['--%s %s' % (key, ','.join(vals)) for key, vals in self.options.iteritems() if vals])
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def _build_options
Definition: confdb.py:58
def confdb.HLTProcess._build_query (   self)
private

Definition at line 46 of file confdb.py.

Referenced by confdb.HLTProcess._build_cmdline(), and confdb.HLTProcess.getPathList().

46 
47  def _build_query(self):
48  if self.config.menu.run:
49  return '--runNumber %s' % self.config.menu.run
50  else:
51  return '--%s --configName %s' % (self.config.menu.db, self.config.menu.name)
def _build_query
Definition: confdb.py:46
def confdb.HLTProcess._build_source (   self)
private

Definition at line 52 of file confdb.py.

References confdb.HLTProcess.source, lhef::XMLDocument.source, DQMNet::Peer.source, and Config.Process.source.

Referenced by confdb.HLTProcess._build_cmdline().

52 
53  def _build_source(self):
54  if self.source is None:
55  return '--noedsources'
56  else:
57  return '--input ' + self.source
def _build_source
Definition: confdb.py:52
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 208 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.fixForFastSim(), and confdb.HLTProcess.fixForMC().

209  def _fix_parameter(self, **args):
210  """arguments:
211  name: parameter name (optional)
212  type: parameter type (look for tracked and untracked variants)
213  value: original value
214  replace: replacement value
215  """
216  if 'name' in args:
217  self.data = re.sub(
218  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
219  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
220  self.data)
221  else:
222  self.data = re.sub(
223  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
224  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
225  self.data)
226 
def _fix_parameter
Definition: confdb.py:208
def confdb.HLTProcess.addGlobalOptions (   self)

Definition at line 195 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

196  def addGlobalOptions(self):
197  # add global options
198  self.data += """
199 # add global options
200 %(process)smaxEvents = cms.untracked.PSet(
201  input = cms.untracked.int32( 100 )
202 )
203 %(process)soptions = cms.untracked.PSet(
204  wantSummary = cms.untracked.bool( True )
205 )
206 """
207 
def addGlobalOptions
Definition: confdb.py:195
def confdb.HLTProcess.build_source (   self)

Definition at line 810 of file confdb.py.

References confdb.HLTProcess.source, lhef::XMLDocument.source, DQMNet::Peer.source, and Config.Process.source.

Referenced by confdb.HLTProcess.buildOptions().

811  def build_source(self):
812  if self.config.online:
813  # online we always run on data
814  self.source = "file:/tmp/InputCollection.root"
815  elif self.config.data:
816  # offline we can run on data...
817  self.source = "/store/data/Run2011A/MinimumBias/RAW/v1/000/161/312/FEE65985-EF55-E011-A137-001617E30F50.root"
818  else:
819  # ...or on mc
820  self.source = "file:RelVal_DigiL1Raw_%s.root" % self.config.type
821 
def confdb.HLTProcess.buildOptions (   self)

Definition at line 492 of file confdb.py.

References python.multivaluedict.append(), confdb.HLTProcess.build_source(), python.FileExportPlugin.FileExportPlugin.options, confdb.HLTProcess.options, and python.DOTExport.DotProducer.options.

493  def buildOptions(self):
494  # common configuration for all scenarios
495  self.options['services'].append( "-FUShmDQMOutputService" )
496  self.options['paths'].append( "-OfflineOutput" )
497 
498  # adapt source and options to the current scenario
499  if not self.config.fragment:
500  self.build_source()
501 
502  if self.config.fragment:
503  # extract a configuration file fragment
504  self.options['essources'].append( "-GlobalTag" )
505  self.options['essources'].append( "-HepPDTESSource" )
506  self.options['essources'].append( "-XMLIdealGeometryESSource" )
507  self.options['essources'].append( "-eegeom" )
508  self.options['essources'].append( "-es_hardcode" )
509  self.options['essources'].append( "-magfield" )
510 
511  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
512  self.options['esmodules'].append( "-SlaveField0" )
513  self.options['esmodules'].append( "-SlaveField20" )
514  self.options['esmodules'].append( "-SlaveField30" )
515  self.options['esmodules'].append( "-SlaveField35" )
516  self.options['esmodules'].append( "-SlaveField38" )
517  self.options['esmodules'].append( "-SlaveField40" )
518  self.options['esmodules'].append( "-VBF0" )
519  self.options['esmodules'].append( "-VBF20" )
520  self.options['esmodules'].append( "-VBF30" )
521  self.options['esmodules'].append( "-VBF35" )
522  self.options['esmodules'].append( "-VBF38" )
523  self.options['esmodules'].append( "-VBF40" )
524  self.options['esmodules'].append( "-CSCGeometryESModule" )
525  self.options['esmodules'].append( "-CaloGeometryBuilder" )
526  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
527  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
528  self.options['esmodules'].append( "-DTGeometryESModule" )
529  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
530  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
531  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
532  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
533  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
534  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
535  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
536  self.options['esmodules'].append( "-MuonNumberingInitialization" )
537  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
538  self.options['esmodules'].append( "-RPCGeometryESModule" )
539  self.options['esmodules'].append( "-SiStripGainESProducer" )
540  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
541  self.options['esmodules'].append( "-SiStripQualityESProducer" )
542  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
543  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
544  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
545  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
546  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
547  self.options['esmodules'].append( "-hcal_db_producer" )
548  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
549  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
550  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
551  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
552  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
553  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
554  if not self.config.fastsim:
555  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
556  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
557  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
558  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
559  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
560  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
561  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
562  self.options['esmodules'].append( "-XMLFromDBSource" )
563  self.options['esmodules'].append( "-sistripconn" )
564 
565  self.options['services'].append( "-PrescaleService" )
566  self.options['services'].append( "-MessageLogger" )
567  self.options['services'].append( "-DQM" )
568  self.options['services'].append( "-MicroStateService" )
569  self.options['services'].append( "-ModuleWebRegistry" )
570  self.options['services'].append( "-TimeProfilerService" )
571  if not self.config.fastsim:
572  self.options['services'].append( "-DQMStore" )
573 
574  self.options['paths'].append( "-*Output" )
575 
576  self.options['psets'].append( "-maxEvents" )
577  self.options['psets'].append( "-options" )
578 
579  if self.config.fastsim:
580  # remove components not supported or needed by fastsim
581  self.options['essources'].append( "-BTagRecord" )
582 
583  self.options['esmodules'].append( "-SiPixelTemplateDBObjectESProducer" )
584  self.options['esmodules'].append( "-TTRHBuilderPixelOnly" )
585  self.options['esmodules'].append( "-WithTrackAngle" )
586  self.options['esmodules'].append( "-trajectoryCleanerBySharedHits" )
587  self.options['esmodules'].append( "-trackCounting3D2nd" )
588  self.options['esmodules'].append( "-navigationSchoolESProducer" )
589  self.options['esmodules'].append( "-muonCkfTrajectoryFilter" )
590  self.options['esmodules'].append( "-ckfBaseTrajectoryFilter" )
591  self.options['esmodules'].append( "-TransientTrackBuilderESProducer" )
592  self.options['esmodules'].append( "-TrackerRecoGeometryESProducer" )
593  self.options['esmodules'].append( "-SteppingHelixPropagatorOpposite" )
594  self.options['esmodules'].append( "-SteppingHelixPropagatorAny" )
595  self.options['esmodules'].append( "-SteppingHelixPropagatorAlong" )
596  self.options['esmodules'].append( "-SmootherRK" )
597  self.options['esmodules'].append( "-SmartPropagatorRK" )
598  self.options['esmodules'].append( "-SmartPropagatorOpposite" )
599  self.options['esmodules'].append( "-SmartPropagatorAnyRK" )
600  self.options['esmodules'].append( "-SmartPropagatorAnyOpposite" )
601  self.options['esmodules'].append( "-SmartPropagatorAny" )
602  self.options['esmodules'].append( "-SmartPropagator" )
603  self.options['esmodules'].append( "-RungeKuttaTrackerPropagator" )
604  self.options['esmodules'].append( "-OppositeMaterialPropagator" )
605  self.options['esmodules'].append( "-MuonTransientTrackingRecHitBuilderESProducer" )
606  self.options['esmodules'].append( "-MuonDetLayerGeometryESProducer" )
607  self.options['esmodules'].append( "-MuonCkfTrajectoryBuilder" )
608  self.options['esmodules'].append( "-hltMeasurementTracker" )
609  self.options['esmodules'].append( "-MaterialPropagator" )
610  self.options['esmodules'].append( "-L3MuKFFitter" )
611  self.options['esmodules'].append( "-KFUpdatorESProducer" )
612  self.options['esmodules'].append( "-KFSmootherForRefitInsideOut" )
613  self.options['esmodules'].append( "-KFSmootherForMuonTrackLoader" )
614  self.options['esmodules'].append( "-KFFitterForRefitInsideOut" )
615  self.options['esmodules'].append( "-GroupedCkfTrajectoryBuilder" )
616  self.options['esmodules'].append( "-GlobalTrackingGeometryESProducer" )
617  self.options['esmodules'].append( "-FittingSmootherRK" )
618  self.options['esmodules'].append( "-FitterRK" )
619  self.options['esmodules'].append( "-hltCkfTrajectoryBuilder" )
620  self.options['esmodules'].append( "-Chi2MeasurementEstimator" )
621  self.options['esmodules'].append( "-Chi2EstimatorForRefit" )
622  self.options['esmodules'].append( "-CaloTowerConstituentsMapBuilder" )
623  self.options['esmodules'].append( "-CaloTopologyBuilder" )
624 
625  self.options['services'].append( "-UpdaterService" )
626 
627  self.options['blocks'].append( "hltL1NonIsoLargeWindowElectronPixelSeeds::SeedConfiguration" )
628  self.options['blocks'].append( "hltL1IsoLargeWindowElectronPixelSeeds::SeedConfiguration" )
629  self.options['blocks'].append( "hltL1NonIsoStartUpElectronPixelSeeds::SeedConfiguration" )
630  self.options['blocks'].append( "hltL1IsoStartUpElectronPixelSeeds::SeedConfiguration" )
631 
632  self.options['modules'].append( "hltL3MuonIsolations" )
633  self.options['modules'].append( "hltPixelVertices" )
634  self.options['modules'].append( "-hltCkfL1IsoTrackCandidates" )
635  self.options['modules'].append( "-hltCtfL1IsoWithMaterialTracks" )
636  self.options['modules'].append( "-hltCkfL1NonIsoTrackCandidates" )
637  self.options['modules'].append( "-hltCtfL1NonIsoWithMaterialTracks" )
638  self.options['modules'].append( "hltPixelMatchLargeWindowElectronsL1Iso" )
639  self.options['modules'].append( "hltPixelMatchLargeWindowElectronsL1NonIso" )
640  self.options['modules'].append( "-hltESRegionalEgammaRecHit" )
641  self.options['modules'].append( "-hltEcalRegionalJetsFEDs" )
642  self.options['modules'].append( "-hltEcalRegionalJetsRecHitTmp" )
643  self.options['modules'].append( "-hltEcalRegionalMuonsFEDs" )
644  self.options['modules'].append( "-hltEcalRegionalMuonsRecHitTmp" )
645  self.options['modules'].append( "-hltEcalRegionalEgammaFEDs" )
646  self.options['modules'].append( "-hltEcalRegionalEgammaRecHitTmp" )
647  self.options['modules'].append( "-hltFEDSelector" )
648  self.options['modules'].append( "-hltL3TrajSeedOIHit" )
649  self.options['modules'].append( "-hltL3TrajSeedIOHit" )
650  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIState" )
651  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIHit" )
652  self.options['modules'].append( "-hltL3TrackCandidateFromL2IOHit" )
653  self.options['modules'].append( "-hltL3TrackCandidateFromL2NoVtx" )
654  self.options['modules'].append( "-hltHcalDigis" )
655  self.options['modules'].append( "-hltHoreco" )
656  self.options['modules'].append( "-hltHfreco" )
657  self.options['modules'].append( "-hltHbhereco" )
658  self.options['modules'].append( "-hltEcalRegionalRestFEDs" )
659  self.options['modules'].append( "-hltEcalRegionalESRestFEDs" )
660  self.options['modules'].append( "-hltEcalRawToRecHitFacility" )
661  self.options['modules'].append( "-hltESRawToRecHitFacility" )
662  self.options['modules'].append( "-hltEcalRegionalJetsRecHit" )
663  self.options['modules'].append( "-hltEcalRegionalMuonsRecHit" )
664  self.options['modules'].append( "-hltEcalRegionalEgammaRecHit" )
665  self.options['modules'].append( "-hltEcalRecHitAll" )
666  self.options['modules'].append( "-hltESRecHitAll" )
667  #self.options['modules'].append( "-hltL3TauPixelSeeds" )
668  #self.options['modules'].append( "-hltL3TauHighPtPixelSeeds" )
669  #self.options['modules'].append( "-hltL3TauCkfTrackCandidates" )
670  #self.options['modules'].append( "-hltL3TauCkfHighPtTrackCandidates" )
671  #self.options['modules'].append( "-hltL3TauCtfWithMaterialTracks" )
672  #self.options['modules'].append( "-hltL25TauPixelSeeds" )
673  #self.options['modules'].append( "-hltL25TauCkfTrackCandidates" )
674  #self.options['modules'].append( "-hltL25TauCtfWithMaterialTracks" )
675  #self.options['modules'].append( "-hltL3TauSingleTrack15CtfWithMaterialTracks" )
676  # === hltPF
677  self.options['modules'].append( "-hltPFJetPixelSeeds" )
678  self.options['modules'].append( "-hltPFJetCkfTrackCandidates" )
679  self.options['modules'].append( "-hltPFJetCtfWithMaterialTracks" )
680  self.options['modules'].append( "-hltPFlowTrackSelectionHighPurity" )
681  # === hltBLifetimeRegional
682  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGenerator" )
683  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidates" )
684  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracks" )
685  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorSingleTop" )
686  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksSingleTop" )
687  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesSingleTop" )
688  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorEleJetSingleTop" )
689  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesEleJetSingleTop" )
690  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksEleJetSingleTop" )
691 
692  self.options['modules'].append( "-hltPixelTracksForMinBias" )
693  self.options['modules'].append( "-hltPixelTracksForHighMult" )
694 
695  self.options['modules'].append( "-hltMuonCSCDigis" )
696  self.options['modules'].append( "-hltMuonDTDigis" )
697  self.options['modules'].append( "-hltMuonRPCDigis" )
698  self.options['modules'].append( "-hltGtDigis" )
699  self.options['modules'].append( "-hltL1GtTrigReport" )
700  self.options['modules'].append( "hltCsc2DRecHits" )
701  self.options['modules'].append( "hltDt1DRecHits" )
702  self.options['modules'].append( "hltRpcRecHits" )
703 
704  self.options['sequences'].append( "-HLTL1IsoEgammaRegionalRecoTrackerSequence" )
705  self.options['sequences'].append( "-HLTL1NonIsoEgammaRegionalRecoTrackerSequence" )
706  self.options['sequences'].append( "-HLTEcalActivityEgammaRegionalRecoTrackerSequence" )
707  self.options['sequences'].append( "-HLTPixelMatchElectronActivityTrackingSequence" )
708  self.options['sequences'].append( "-HLTL1IsoElectronsRegionalRecoTrackerSequence" )
709  self.options['sequences'].append( "-HLTL1NonIsoElectronsRegionalRecoTrackerSequence" )
710  self.options['sequences'].append( "-HLTPixelMatchLargeWindowElectronL1IsoTrackingSequence" )
711  self.options['sequences'].append( "-HLTPixelMatchLargeWindowElectronL1NonIsoTrackingSequence" )
712  self.options['sequences'].append( "-HLTPixelTrackingForMinBiasSequence" )
713  self.options['sequences'].append( "-HLTDoLocalStripSequence" )
714  self.options['sequences'].append( "-HLTDoLocalPixelSequence" )
715  self.options['sequences'].append( "-hltSiPixelDigis" )
716  self.options['sequences'].append( "-hltSiPixelClusters" )
717  self.options['sequences'].append( "-hltSiPixelRecHits" )
718  self.options['sequences'].append( "-HLTRecopixelvertexingSequence" )
719  #self.options['sequences'].append( "-HLTL3TauTrackReconstructionSequence" )
720  #self.options['sequences'].append( "-HLTL3TauHighPtTrackReconstructionSequence" )
721  #self.options['sequences'].append( "-HLTL25TauTrackReconstructionSequence" )
722  #self.options['sequences'].append( "-HLTL3TauSingleTrack15ReconstructionSequence" )
723  #self.options['sequences'].append( "-HLTTrackReconstructionForJets" )
724  self.options['sequences'].append( "-HLTEndSequence" )
725  self.options['sequences'].append( "-HLTBeginSequence" )
726  self.options['sequences'].append( "-HLTBeginSequenceNZS" )
727  self.options['sequences'].append( "-HLTBeginSequenceBPTX" )
728  self.options['sequences'].append( "-HLTBeginSequenceAntiBPTX" )
729  self.options['sequences'].append( "-HLTL2HcalIsolTrackSequence" )
730  self.options['sequences'].append( "-HLTL2HcalIsolTrackSequenceHB" )
731  self.options['sequences'].append( "-HLTL2HcalIsolTrackSequenceHE" )
732  self.options['sequences'].append( "-HLTL3HcalIsolTrackSequence" )
733 
734  # remove unsupported paths
735  self.options['paths'].append( "-AlCa_EcalEta_v*" )
736  self.options['paths'].append( "-AlCa_EcalPhiSym_v*" )
737  self.options['paths'].append( "-AlCa_EcalPi0_v*" )
738  self.options['paths'].append( "-AlCa_RPCMuonNoHits_v*" )
739  self.options['paths'].append( "-AlCa_RPCMuonNoTriggers_v*" )
740  self.options['paths'].append( "-AlCa_RPCMuonNormalisation_v*" )
741  self.options['paths'].append( "-DQM_FEDIntegrity_v*" )
742  #self.options['paths'].append( "-HLT_Activity_DT" )
743  #self.options['paths'].append( "-HLT_Activity_DT_Tuned" )
744  #self.options['paths'].append( "-HLT_Activity_Ecal" )
745  #self.options['paths'].append( "-HLT_Activity_EcalREM" )
746  #self.options['paths'].append( "-HLT_Activity_Ecal_SC15" )
747  #self.options['paths'].append( "-HLT_Activity_Ecal_SC17" )
748  #self.options['paths'].append( "-HLT_Activity_Ecal_SC7" )
749  #self.options['paths'].append( "-HLT_Activity_L1A" )
750  #self.options['paths'].append( "-HLT_Activity_PixelClusters" )
751  #self.options['paths'].append( "-HLT_DTErrors" )
752  #self.options['paths'].append( "-HLT_DoubleEle4_SW_eeRes_L1R" )
753  #self.options['paths'].append( "-HLT_DoubleEle4_SW_eeRes_L1R_v*" )
754  #self.options['paths'].append( "-HLT_DoubleEle5_SW_Upsilon_L1R_v*" )
755  #self.options['paths'].append( "-HLT_DoublePhoton4_Jpsi_L1R" )
756  #self.options['paths'].append( "-HLT_DoublePhoton4_Upsilon_L1R" )
757  #self.options['paths'].append( "-HLT_DoublePhoton4_eeRes_L1R" )
758  #self.options['paths'].append( "-HLT_EgammaSuperClusterOnly_L1R" )
759  #self.options['paths'].append( "-HLT_Ele15_SiStrip_L1R" )
760  #self.options['paths'].append( "-HLT_Ele20_SiStrip_L1R" )
761  #self.options['paths'].append( "-HLT_HFThreshold10" )
762  #self.options['paths'].append( "-HLT_HFThreshold3" )
763  self.options['paths'].append( "-HLT_Calibration_v*" )
764  self.options['paths'].append( "-HLT_EcalCalibration_v*" )
765  self.options['paths'].append( "-HLT_HcalCalibration_v*" )
766  self.options['paths'].append( "-HLT_TrackerCalibration_v*" )
767  self.options['paths'].append( "-HLT_HcalNZS_v*" )
768  self.options['paths'].append( "-HLT_HcalPhiSym_v*" )
769  self.options['paths'].append( "-HLT_IsoTrackHB_v*" )
770  self.options['paths'].append( "-HLT_IsoTrackHE_v*" )
771  #self.options['paths'].append( "-HLT_Jet15U_HcalNoiseFiltered" )
772  #self.options['paths'].append( "-HLT_Jet15U_HcalNoiseFiltered_v*" )
773  #self.options['paths'].append( "-HLT_L1DoubleMuOpen_Tight" )
774  #self.options['paths'].append( "-HLT_L1MuOpen_AntiBPTX" )
775  self.options['paths'].append( "-HLT_L1SingleMuOpen_AntiBPTX_v*" )
776  self.options['paths'].append( "-HLT_JetE30_NoBPTX*_v*" )
777  #self.options['paths'].append( "-HLT_Mu0_TkMu0_OST_Jpsi" )
778  #self.options['paths'].append( "-HLT_Mu0_TkMu0_OST_Jpsi_Tight_v*" )
779  #self.options['paths'].append( "-HLT_Mu0_Track0_Jpsi" )
780  #self.options['paths'].append( "-HLT_Mu3_TkMu0_OST_Jpsi" )
781  #self.options['paths'].append( "-HLT_Mu3_TkMu0_OST_Jpsi_Tight_v*" )
782  #self.options['paths'].append( "-HLT_Mu3_Track0_Jpsi" )
783  #self.options['paths'].append( "-HLT_Mu3_Track3_Jpsi" )
784  self.options['paths'].append( "-HLT_Mu3_Track3_Jpsi_v*" )
785  #self.options['paths'].append( "-HLT_Mu3_Track5_Jpsi_v*" )
786  #self.options['paths'].append( "-HLT_Mu5_TkMu0_OST_Jpsi_Tight_v*" )
787  #self.options['paths'].append( "-HLT_Mu5_Track0_Jpsi_v*" )
788  self.options['paths'].append( "-HLT_Mu5_TkMu0_OST_Jpsi_Tight_B5Q7_v*" )
789  self.options['paths'].append( "-HLT_Mu5_Track0_Jpsi_B5Q7_v*" )
790  self.options['paths'].append( "-HLT_Random_v*" )
791  self.options['paths'].append( "-HLT_Mu5_Track2_Jpsi_v*" )
792  self.options['paths'].append( "-HLT_Mu5_Track5_Jpsi_v*" )
793  self.options['paths'].append( "-HLT_Mu7_Track5_Jpsi_v*" )
794  self.options['paths'].append( "-HLT_Mu7_Track7_Jpsi_v*" )
795  #self.options['paths'].append( "-HLT_SelectEcalSpikesHighEt_L1R" )
796  #self.options['paths'].append( "-HLT_SelectEcalSpikes_L1R" )
797 
798  self.options['paths'].append( "-HLT_DTErrors_v*" )
799 
800  # TODO: 5E32 paths for which a recovery should be attempted:
801  self.options['paths'].append( "-HLT_Mu3_Ele8_CaloIdL_TrkIdVL_HT160_v*" )
802  self.options['paths'].append( "-HLT_Mu3_Ele8_CaloIdT_TrkIdVL_HT160_v*" )
803  self.options['paths'].append( "-HLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_v*")
804  self.options['paths'].append( "-HLT_HT250_DoubleDisplacedJet60_v*" )
805 
806  # remove HLTAnalyzerEndpath from fastsim cff's
807  if self.config.fragment:
808  self.options['paths'].append( "-HLTAnalyzerEndpath" )
809 
def confdb.HLTProcess.customize (   self)

Definition at line 113 of file confdb.py.

References confdb.HLTProcess.addGlobalOptions(), confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, confdb.HLTProcess.fixForFastSim(), confdb.HLTProcess.fixForMC(), confdb.HLTProcess.instrumentOpenMode(), confdb.HLTProcess.instrumentTiming(), confdb.HLTProcess.overrideGlobalTag(), confdb.HLTProcess.overrideL1Menu(), confdb.HLTProcess.overrideOutput(), confdb.HLTProcess.overrideProcessName(), options.HLTProcessOptions.unprescale, confdb.HLTProcess.unprescale(), and confdb.HLTProcess.updateMessageLogger().

114  def customize(self):
115  self.data += """
116 # Extra customisation for CMSSW 42X+ only
117 %(process)secalSeverityLevel = cms.ESProducer( "EcalSeverityLevelESProducer",
118  appendToDataLabel = cms.string( "" ),
119  flagMask = cms.vuint32( 1, 34, 896, 4, 49152, 6232 ),
120  dbstatusMask = cms.vuint32( 1, 2046, 0, 0, 0, 64512 ),
121  timeThresh = cms.double( 2.0 )
122 )
123 """
124  if not(self.config.type in ('HIon', )):
125  self.data += """
126 if 'hltParticleFlowRecHitHCAL' in %(dict)s:
127  %(process)shltParticleFlowRecHitHCAL.HCAL_Calib = True
128  %(process)shltParticleFlowRecHitHCAL.HF_Calib = True
129 if 'hltParticleFlow' in %(dict)s:
130  %(process)shltParticleFlow.calibPFSCEle_barrel = [1.004, -1.536, 22.88, -1.467, 0.3555, 0.6227, 14.65, 2051, 25, 0.9932, -0.5444, 0, 0.5438, 0.7109, 7.645, 0.2904, 0]
131  %(process)shltParticleFlow.calibPFSCEle_endcap = [1.153, -16.5975, 5.668, -0.1772, 16.22, 7.326, 0.0483, -4.068, 9.406]
132 """
133 
134  if self.config.fragment:
135  # if running on MC, adapt the configuration accordingly
136  self.fixForMC()
137 
138  # if requested, adapt the configuration for FastSim
139  self.fixForFastSim()
140 
141  # if requested, remove the HLT prescales
142  self.unprescale()
143 
144  # if requested, override all ED/HLTfilters to always pass ("open" mode)
145  self.instrumentOpenMode()
146 
147  # if requested, instrument the self with the modules and EndPath needed for timing studies
148  self.instrumentTiming()
149 
150  else:
151  # if running on MC, adapt the configuration accordingly
152  self.fixForMC()
153 
154  # override the process name and adapt the relevant filters
155  self.overrideProcessName()
156 
157  # if required, remove the HLT prescales
158  self.unprescale()
159 
160  # if requested, override all ED/HLTfilters to always pass ("open" mode)
161  self.instrumentOpenMode()
162 
163  # manual override some Heavy Ion parameters
164  if self.config.type in ('HIon', ):
165  self.data += """
166 # HIon paths in smart prescalers
167 if 'hltPreDQMOutputSmart' in %(dict)s:
168  %(process)shltPreDQMOutputSmart.throw = cms.bool( False )
169 if 'hltPreExpressOutputSmart' in %(dict)s:
170  %(process)shltPreExpressOutputSmart.throw = cms.bool( False )
171 if 'hltPreHLTDQMOutputSmart' in %(dict)s:
172  %(process)shltPreHLTDQMOutputSmart.throw = cms.bool( False )
173 if 'hltPreHLTMONOutputSmart' in %(dict)s:
174  %(process)shltPreHLTMONOutputSmart.throw = cms.bool( False )
175 """
176 
177  # override the output modules to output root files
178  self.overrideOutput()
179 
180  # add global options
181  self.addGlobalOptions()
182 
183  # if requested or necessary, override the GlobalTag and connection strings
184  self.overrideGlobalTag()
185 
186  # if requested, override the L1 self from the GlobalTag (using the same connect as the GlobalTag itself)
187  self.overrideL1Menu()
188 
189  # request summary informations from the MessageLogger
190  self.updateMessageLogger()
191 
192  # if requested, instrument the self with the modules and EndPath needed for timing studies
193  self.instrumentTiming()
194 
def addGlobalOptions
Definition: confdb.py:195
def overrideOutput
Definition: confdb.py:347
def overrideProcessName
Definition: confdb.py:370
def overrideGlobalTag
Definition: confdb.py:285
def instrumentTiming
Definition: confdb.py:425
def instrumentOpenMode
Definition: confdb.py:275
def updateMessageLogger
Definition: confdb.py:398
def overrideL1Menu
Definition: confdb.py:336
def confdb.HLTProcess.dump (   self)

Definition at line 108 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, confdb.HLTProcess.labels, and svgfig.Ticks.labels.

109  def dump(self):
110  return self.data % self.labels
111 
def confdb.HLTProcess.expandWildcardOptions (   self)

Definition at line 86 of file confdb.py.

References confdb.HLTProcess.expandWildcards(), confdb.HLTProcess.getPathList(), python.FileExportPlugin.FileExportPlugin.options, confdb.HLTProcess.options, and python.DOTExport.DotProducer.options.

86 
87  def expandWildcardOptions(self):
88  # for the time being, this is limited only to the --paths option
89  self.options['paths'] = self.expandWildcards(self.options['paths'], self.getPathList())
90 
def expandWildcardOptions
Definition: confdb.py:86
def expandWildcards
Definition: confdb.py:92
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 92 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

Referenced by confdb.HLTProcess.expandWildcardOptions().

92 
93  def expandWildcards(globs, collection):
94  # expand a list of unix-style wildcards matching a given collection
95  # wildcards with no matches are silently discarded
96  matches = []
97  for glob in globs:
98  negate = ''
99  if glob[0] == '-':
100  negate = '-'
101  glob = glob[1:]
102  # translate a unix-style glob expression into a regular expression
103  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
104  matches.extend( negate + element for element in collection if filter.match(element) )
105  return matches
106 
def expandWildcards
Definition: confdb.py:92
def confdb.HLTProcess.fixForFastSim (   self)

Definition at line 234 of file confdb.py.

References confdb.HLTProcess._fix_parameter(), confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

235  def fixForFastSim(self):
236  if self.config.fastsim:
237  # adapt the hle configuration (fragment) to run under fastsim
238  self.data = re.sub( r'import FWCore.ParameterSet.Config as cms', r'\g<0>\nfrom FastSimulation.HighLevelTrigger.HLTSetup_cff import *', self.data)
239 
240  # remove the definition of streams and datasets
241  self.data = re.compile( r'^streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
242  self.data = re.compile( r'^datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
243 
244  # fix the definition of module
245  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
246  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'gmtDigis')
247  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'gtDigis')
248  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'gtDigis')
249  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
250  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
251  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
252  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
253  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
254  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
255  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
256 
257  # fix the definition of sequences and paths
258  self.data = re.sub( r'hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
259  self.data = re.sub( r'hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
260  self.data = re.sub( r'hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
261  self.data = re.sub( r'HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
262  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
263 
def _fix_parameter
Definition: confdb.py:208
def confdb.HLTProcess.fixForMC (   self)

Definition at line 227 of file confdb.py.

References confdb.HLTProcess._fix_parameter().

Referenced by confdb.HLTProcess.customize().

228  def fixForMC(self):
229  if not self.config.data:
230  # override the raw data collection label
231  self._fix_parameter(type = 'InputTag', value = 'source', replace = 'rawDataCollector')
232  self._fix_parameter(type = 'string', value = 'source', replace = 'rawDataCollector')
233 
def _fix_parameter
Definition: confdb.py:208
def confdb.HLTProcess.getPathList (   self)

Definition at line 76 of file confdb.py.

References confdb.HLTProcess._build_query().

Referenced by confdb.HLTProcess.expandWildcardOptions().

76 
77  def getPathList(self):
78  cmdline = 'edmConfigFromDB --cff %s --noedsources --noes --noservices --nosequences --nomodules' % self._build_query()
79  data = _pipe(cmdline)
80  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
81  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
82  filter = re.compile(r' *= *cms.(End)?Path.*')
83  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
84  return paths
85 
def _build_query
Definition: confdb.py:46
def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 68 of file confdb.py.

References confdb.HLTProcess._build_cmdline(), confdb.HLTProcess.data, CombinedTauTagCalibration.data, CombinedSVCalibration.data, TrackProbabilityCalibration.data, python.multivaluedict.MyUserList.data, ElectronLikelihoodCalibration.data, python.DOTExport.DotProducer.data, CSCTMBScope.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

68 
69  def getRawConfigurationFromDB(self):
70  cmdline = self._build_cmdline()
71  data = _pipe(cmdline)
72  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
73  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
74  self.data = data
75 
def _build_cmdline
Definition: confdb.py:61
def getRawConfigurationFromDB
Definition: confdb.py:68
def confdb.HLTProcess.instrumentOpenMode (   self)

Definition at line 275 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, and join().

Referenced by confdb.HLTProcess.customize().

276  def instrumentOpenMode(self):
277  if self.config.open:
278  # find all EDfilters
279  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
280  # wrap all EDfilters with "cms.ignore( ... )"
281  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(filters) + r'))\b' )
282  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
283  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
284 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:275
def confdb.HLTProcess.instrumentTiming (   self)

Definition at line 425 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, and confdb.HLTProcess.loadAdditionalConditions().

Referenced by confdb.HLTProcess.customize().

426  def instrumentTiming(self):
427  if self.config.timing:
428  # instrument the menu with the modules and EndPath needed for timing studies
429  text = ''
430 
431  if 'HLTriggerFirstPath' in self.data:
432  # remove HLTriggerFirstPath
433  self.data = re.sub(r'.*\bHLTriggerFirstPath\s*=.*\n', '', self.data)
434 
435  if not 'hltGetRaw' in self.data:
436  # add hltGetRaw
437  text += """
438 %%(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
439  RawDataCollection = cms.InputTag( "%s" )
440 )
441 """ % ( self.config.data and 'source' or 'rawDataCollector' )
442 
443  if not 'hltGetConditions' in self.data:
444  # add hltGetConditions
445  text += """
446 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
447  verbose = cms.untracked.bool( False ),
448  toGet = cms.VPSet( )
449 )
450 """
451 
452  # add the definition of HLTriggerFirstPath
453  text += """
454 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
455 """
456  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
457 
458  self.data += """
459 # instrument the menu with the modules and EndPath needed for timing studies
460 %(process)sPathTimerService = cms.Service( "PathTimerService",
461 )
462 %(process)shltTimer = cms.EDProducer( "PathTimerInserter",
463 )
464 %(process)shltOutputTiming = cms.OutputModule( "PoolOutputModule",
465  fileName = cms.untracked.string( "outputTiming.root" ),
466  fastCloning = cms.untracked.bool( False ),
467  splitLevel = cms.untracked.int32( 0 ),
468  dataset = cms.untracked.PSet(
469  dataTier = cms.untracked.string( 'RECO' ),
470  filterName = cms.untracked.string( '' )
471  ),
472  outputCommands = cms.untracked.vstring( 'drop *',
473  'keep HLTPerformanceInfo_*_*_*' )
474 )
475 
476 %(process)sTimingOutput = cms.EndPath( %(process)shltTimer + %(process)shltOutputTiming )
477 """
478  self.loadAdditionalConditions('add XML geometry to keep hltGetConditions happy',
479  {
480  'record' : 'GeometryFileRcd',
481  'tag' : 'XMLFILE_Geometry_380V3_Ideal_mc',
482  'label' : 'Ideal',
483  'connect' : '%(connect)s/CMS_COND_34X_GEOMETRY'
484  }, {
485  'record' : 'GeometryFileRcd',
486  'tag' : 'XMLFILE_Geometry_380V3_Extended_mc',
487  'label' : 'Extended',
488  'connect' : '%(connect)s/CMS_COND_34X_GEOMETRY'
489  }
490  )
491 
def instrumentTiming
Definition: confdb.py:425
def loadAdditionalConditions
Definition: confdb.py:408
def confdb.HLTProcess.loadAdditionalConditions (   self,
  comment,
  conditions 
)

Definition at line 408 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.instrumentTiming(), and confdb.HLTProcess.overrideL1Menu().

409  def loadAdditionalConditions(self, comment, *conditions):
410  # load additional conditions
411  self.data += """
412 # %s
413 if 'GlobalTag' in %%(dict)s:
414 """ % comment
415  for condition in conditions:
416  self.data += """ %%(process)sGlobalTag.toGet.append(
417  cms.PSet(
418  record = cms.string( '%(record)s' ),
419  tag = cms.string( '%(tag)s' ),
420  label = cms.untracked.string( '%(label)s' ),
421  connect = cms.untracked.string( '%(connect)s' )
422  )
423  )
424 """ % condition
def loadAdditionalConditions
Definition: confdb.py:408
def confdb.HLTProcess.overrideGlobalTag (   self)

Definition at line 285 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

286  def overrideGlobalTag(self):
287  # overwrite GlobalTag
288  # the logic is:
289  # - for running online, do nothing, unless a globaltag has been specified on the command line
290  # - for running offline on data, only add the pfnPrefix
291  # - for running offline on mc, take the GT from the command line of the configuration.type
292  # - if the GT is "auto:...", insert the code to read it from Configuration.PyReleaseValidation.autoCond
293  text = ''
294  if self.config.online:
295  if self.config.globaltag:
296  # override the GlobalTag
297  text += """
298 # override the GlobalTag
299 if 'GlobalTag' in %%(dict)s:
300  %%(process)sGlobalTag.globaltag = '%(globaltag)s'
301 """
302 
303  else:
304  # override the GlobalTag connection string and pfnPrefix
305  text += """
306 # override the GlobalTag, connection string and pfnPrefix
307 if 'GlobalTag' in %%(dict)s:
308  %%(process)sGlobalTag.connect = '%%(connect)s/CMS_COND_31X_GLOBALTAG'
309  %%(process)sGlobalTag.pfnPrefix = cms.untracked.string('%%(connect)s/')
310 """
311 
312  if self.config.data:
313  # do not override the GlobalTag unless one was specified on the command line
314  pass
315  else:
316  # check if a specific GlobalTag was specified on the command line, or choose one from the configuration.type
317  if not self.config.globaltag:
318  if self.config.type in globalTag:
319  self.config.globaltag = globalTag[self.config.type]
320  else:
321  self.config.globaltag = globalTag['GRun']
322 
323  # check if the GlobalTag is an autoCond or an explicit tag
324  if not self.config.globaltag:
325  # when running on data, do not override the GlobalTag unless one was specified on the command line
326  pass
327  elif self.config.globaltag.startswith('auto:'):
328  self.config.menuGlobalTagAuto = self.config.globaltag[5:]
329  text += " from Configuration.PyReleaseValidation.autoCond import autoCond\n"
330  text += " %%(process)sGlobalTag.globaltag = autoCond['%(menuGlobalTagAuto)s']\n"
331  else:
332  text += " %%(process)sGlobalTag.globaltag = '%(globaltag)s'\n"
333 
334  self.data += text % self.config.__dict__
335 
def overrideGlobalTag
Definition: confdb.py:285
def confdb.HLTProcess.overrideL1Menu (   self)

Definition at line 336 of file confdb.py.

References confdb.HLTProcess.loadAdditionalConditions().

Referenced by confdb.HLTProcess.customize().

337  def overrideL1Menu(self):
338  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
339  if self.config.l1.override:
340  self.config.l1.record = 'L1GtTriggerMenuRcd'
341  self.config.l1.label = ''
342  self.config.l1.tag = self.config.l1.override
343  if not self.config.l1.connect:
344  self.config.l1.connect = '%(connect)s/CMS_COND_31X_L1T'
345  self.loadAdditionalConditions( 'override the L1 menu', self.config.l1.__dict__ )
346 
def overrideL1Menu
Definition: confdb.py:336
def loadAdditionalConditions
Definition: confdb.py:408
def confdb.HLTProcess.overrideOutput (   self)

Definition at line 347 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

348  def overrideOutput(self):
349  reOutputModuleDef = re.compile(r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\(.*\n([^)].*\n)*\) *\n')
350  reOutputModuleRef = re.compile(r' *[+*]? *\b(process\.)?hltOutput(\w+)') # FIXME this does not cover "hltOutputX + something"
351  if self.config.output == 'none':
352  # drop all output modules
353  self.data = reOutputModuleDef.sub('', self.data)
354  self.data = reOutputModuleRef.sub('', self.data)
355 
356  elif self.config.output == 'minimal':
357  # drop all output modules except "HLTDQMResults"
358  repl = lambda match: (match.group(2) == 'HLTDQMResults') and match.group() or ''
359  self.data = reOutputModuleDef.sub(repl, self.data)
360  self.data = reOutputModuleRef.sub(repl, self.data)
361 
362  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
363  self.data = re.sub(
364  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
365  r'%(process)shltOutput\2 = cms.OutputModule( "PoolOutputModule",\n fileName = cms.untracked.string( "output\2.root" ),\n fastCloning = cms.untracked.bool( False ),',
366  self.data
367  )
368 
def overrideOutput
Definition: confdb.py:347
def confdb.HLTProcess.overrideProcessName (   self)

Definition at line 370 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

371  def overrideProcessName(self):
372  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
373  self.data += """
374 # override the process name
375 %%(process)ssetName_('%(name)s')
376 
377 # adapt HLT modules to the correct process name
378 if 'hltTrigReport' in %%(dict)s:
379  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
380 
381 if 'hltPreExpressSmart' in %%(dict)s:
382  %%(process)shltPreExpressSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
383 
384 if 'hltPreHLTMONSmart' in %%(dict)s:
385  %%(process)shltPreHLTMONSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
386 
387 if 'hltPreDQMSmart' in %%(dict)s:
388  %%(process)shltPreDQMSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
389 
390 if 'hltDQMHLTScalers' in %%(dict)s:
391  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
392  %%(process)shltDQMHLTScalers.processname = '%(name)s'
393 
394 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
395  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
396 """ % self.config.__dict__
397 
def overrideProcessName
Definition: confdb.py:370
def confdb.HLTProcess.unprescale (   self)

Definition at line 264 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

265  def unprescale(self):
266  if self.config.unprescale:
267  self.data += """
268 # remove the HLT prescales
269 if 'PrescaleService' in %(dict)s:
270  %(process)sPrescaleService.lvl1DefaultLabel = cms.untracked.string( '0' )
271  %(process)sPrescaleService.lvl1Labels = cms.vstring( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' )
272  %(process)sPrescaleService.prescaleTable = cms.VPSet( )
273 """
274 
def confdb.HLTProcess.updateMessageLogger (   self)

Definition at line 398 of file confdb.py.

References confdb.HLTProcess.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, python.multivaluedict.MyUserList.data, CSCTMBScope.data, python.DOTExport.DotProducer.data, CondIter< DataT >.data, dqmTnP::AbstractFitter.data, comparisonPlots.data, LASModuleProfile.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, and python.DBCopy.DBCopy.data.

Referenced by confdb.HLTProcess.customize().

399  def updateMessageLogger(self):
400  # request summary informations from the MessageLogger
401  self.data += """
402 if 'MessageLogger' in %(dict)s:
403  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
404  %(process)sMessageLogger.categories.append('L1GtTrigReport')
405  %(process)sMessageLogger.categories.append('HLTrigReport')
406 """
407 
def updateMessageLogger
Definition: confdb.py:398

Member Data Documentation

confdb.HLTProcess.config

Definition at line 11 of file confdb.py.

confdb.HLTProcess.data

Definition at line 12 of file confdb.py.

Referenced by confdb.HLTProcess._fix_parameter(), confdb.HLTProcess.addGlobalOptions(), confdb.HLTProcess.customize(), confdb.HLTProcess.dump(), confdb.HLTProcess.fixForFastSim(), confdb.HLTProcess.getRawConfigurationFromDB(), confdb.HLTProcess.instrumentOpenMode(), confdb.HLTProcess.instrumentTiming(), confdb.HLTProcess.loadAdditionalConditions(), confdb.HLTProcess.overrideGlobalTag(), confdb.HLTProcess.overrideOutput(), confdb.HLTProcess.overrideProcessName(), confdb.HLTProcess.unprescale(), and confdb.HLTProcess.updateMessageLogger().

confdb.HLTProcess.labels

Definition at line 26 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

Definition at line 15 of file confdb.py.

Referenced by confdb.HLTProcess.buildOptions(), confdb.HLTProcess.expandWildcardOptions(), python.DOTExport.DotExport.export(), and python.DOTExport.DotExport.write_output().

confdb.HLTProcess.source

Definition at line 13 of file confdb.py.

Referenced by confdb.HLTProcess._build_source(), and confdb.HLTProcess.build_source().