CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
confdb Namespace Reference

Classes

class  HLTProcess
 

Functions

def _fix_parameter
 
def addGlobalOptions
 Disable HF Noise filters in HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( False ) """ else: self.data += """ Enable HF Noise filters in non-HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( True ) """. More...
 
def append_filenames
 
def build_source
 
def buildOptions
 
def buildPathList
 
def dumppaths
 
def expand_filenames
 
def fixForFastSim
 
def fixForMC
 
def fixPrescales
 
def instrumentDQM
 
def instrumentErrorEventType
 
def instrumentOpenMode
 
def instrumentTiming
 
def loadAdditionalConditions
 
def loadCff
 
def loadCffCommand
 
def overrideGlobalTag
 
def overrideL1MenuXml
 
def overrideOutput
 
def overrideParameters
 
def overrideProcessName
 
def runL1Emulator
 
def runL1EmulatorGT
 
def splitter
 
def switchToNewL1Skim
 
def updateMessageLogger
 

Variables

 all_paths
 
 data
 
 parent
 
 source
 

Function Documentation

def confdb._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 371 of file confdb.py.

372  def _fix_parameter(self, **args):
373  """arguments:
374  name: parameter name (optional)
375  type: parameter type (look for tracked and untracked variants)
376  value: original value
377  replace: replacement value
378  """
379  if 'name' in args:
380  self.data = re.sub(
381  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
382  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
383  self.data)
384  else:
385  self.data = re.sub(
386  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
387  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
388  self.data)
389 
def _fix_parameter
Definition: confdb.py:371
def confdb.addGlobalOptions (   self)

Disable HF Noise filters in HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( False ) """ else: self.data += """ Enable HF Noise filters in non-HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( True ) """.

untracked parameters with NO default in the code if 'hltHcalDataIntegrityMonitor' in %(dict)s: %(process)shltHcalDataIntegrityMonitor.RawDataLabel = cms.untracked.InputTag("rawDataCollector") if 'hltDt4DSegments' in %(dict)s: %(process)shltDt4DSegments.debug = cms.untracked.bool( False ) """

Definition at line 353 of file confdb.py.

354  def addGlobalOptions(self):
355  # add global options
356  self.data += """
357 # limit the number of events to be processed
358 %%(process)smaxEvents = cms.untracked.PSet(
359  input = cms.untracked.int32( %d )
360 )
361 """ % self.config.events
362 
363  if not self.config.profiling:
364  self.data += """
365 # enable the TrigReport and TimeReport
366 %(process)soptions = cms.untracked.PSet(
367  wantSummary = cms.untracked.bool( True )
368 )
369 """
370 
def addGlobalOptions
Disable HF Noise filters in HIon menu if &#39;hltHfreco&#39; in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( False ) &quot;&quot;" else: self.data += &quot;&quot;" Enable HF Noise filters in non-HIon menu if &#39;hltHfreco&#39; in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( True ) &quot;&quot;".
Definition: confdb.py:353
def confdb.append_filenames (   self,
  name,
  filenames 
)

Definition at line 1270 of file confdb.py.

1271  def append_filenames(self, name, filenames):
1272  if len(filenames) > 255:
1273  token_open = "( *("
1274  token_close = ") )"
1275  else:
1276  token_open = "("
1277  token_close = ")"
1278 
1279  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
1280  for line in filenames:
1281  self.data += " '%s',\n" % line
1282  self.data += " %s,\n" % (token_close)
1283 
def append_filenames
Definition: confdb.py:1270
def confdb.build_source (   self)

Definition at line 1296 of file confdb.py.

1297  def build_source(self):
1298  if self.config.input:
1299  # if a dataset or a list of input files was given, use it
1300  self.source = self.expand_filenames(self.config.input)
1301  elif self.config.online:
1302  # online we always run on data
1303  self.source = [ "file:/tmp/InputCollection.root" ]
1304  elif self.config.data:
1305  # offline we can run on data...
1306  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1307  else:
1308  # ...or on mc
1309  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1310 
1311  if self.config.parent:
1312  # if a dataset or a list of input files was given for the parent data, use it
1313  self.parent = self.expand_filenames(self.config.parent)
1314 
1315  self.data += """
1316 %(process)ssource = cms.Source( "PoolSource",
1317 """
1318  self.append_filenames("fileNames", self.source)
1319  if (self.parent):
1320  self.append_filenames("secondaryFileNames", self.parent)
1321  self.data += """\
1322  inputCommands = cms.untracked.vstring(
1323  'keep *'
1324  )
1325 )
1326 """
def build_source
Definition: confdb.py:1296
def confdb.buildOptions (   self)

Definition at line 979 of file confdb.py.

References python.multivaluedict.append().

980  def buildOptions(self):
981  # common configuration for all scenarios
982  self.options['services'].append( "-DQM" )
983  self.options['services'].append( "-FUShmDQMOutputService" )
984  self.options['services'].append( "-MicroStateService" )
985  self.options['services'].append( "-ModuleWebRegistry" )
986  self.options['services'].append( "-TimeProfilerService" )
987 
988  # remove the DAQ modules and the online definition of the DQMStore and DQMFileSaver
989  # unless a hilton-like configuration has been requested
990  if not self.config.hilton:
991  self.options['services'].append( "-EvFDaqDirector" )
992  self.options['services'].append( "-FastMonitoringService" )
993  self.options['services'].append( "-DQMStore" )
994  self.options['modules'].append( "-hltDQMFileSaver" )
995 
996  if self.config.fragment:
997  # extract a configuration file fragment
998  self.options['essources'].append( "-GlobalTag" )
999  self.options['essources'].append( "-HepPDTESSource" )
1000  self.options['essources'].append( "-XMLIdealGeometryESSource" )
1001  self.options['essources'].append( "-eegeom" )
1002  self.options['essources'].append( "-es_hardcode" )
1003  self.options['essources'].append( "-magfield" )
1004 
1005  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
1006  self.options['esmodules'].append( "-SlaveField0" )
1007  self.options['esmodules'].append( "-SlaveField20" )
1008  self.options['esmodules'].append( "-SlaveField30" )
1009  self.options['esmodules'].append( "-SlaveField35" )
1010  self.options['esmodules'].append( "-SlaveField38" )
1011  self.options['esmodules'].append( "-SlaveField40" )
1012  self.options['esmodules'].append( "-VBF0" )
1013  self.options['esmodules'].append( "-VBF20" )
1014  self.options['esmodules'].append( "-VBF30" )
1015  self.options['esmodules'].append( "-VBF35" )
1016  self.options['esmodules'].append( "-VBF38" )
1017  self.options['esmodules'].append( "-VBF40" )
1018  self.options['esmodules'].append( "-CSCGeometryESModule" )
1019  self.options['esmodules'].append( "-CaloGeometryBuilder" )
1020  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
1021  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
1022  self.options['esmodules'].append( "-DTGeometryESModule" )
1023  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
1024  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
1025  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
1026  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
1027  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
1028  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
1029  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
1030  self.options['esmodules'].append( "-MuonNumberingInitialization" )
1031  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
1032  self.options['esmodules'].append( "-RPCGeometryESModule" )
1033  self.options['esmodules'].append( "-SiStripGainESProducer" )
1034  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
1035  self.options['esmodules'].append( "-SiStripQualityESProducer" )
1036  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
1037  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
1038  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
1039  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
1040  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
1041  self.options['esmodules'].append( "-hcal_db_producer" )
1042  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
1043  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
1044  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
1045  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
1046  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
1047  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
1048  self.options['esmodules'].append( "-trackerTopology" )
1049 
1050  if not self.config.fastsim:
1051  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
1052  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
1053  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
1054  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
1055  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
1056  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
1057  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
1058  self.options['esmodules'].append( "-XMLFromDBSource" )
1059  self.options['esmodules'].append( "-sistripconn" )
1060 
1061  self.options['services'].append( "-MessageLogger" )
1062 
1063  self.options['psets'].append( "-maxEvents" )
1064  self.options['psets'].append( "-options" )
1065 
1066  if self.config.fragment or (self.config.prescale and (self.config.prescale.lower() == 'none')):
1067  self.options['services'].append( "-PrescaleService" )
1068 
1069  if self.config.fragment or self.config.timing:
1070  self.options['services'].append( "-FastTimerService" )
1071 
1072  if self.config.fastsim:
1073  # remove components not supported or needed by fastsim
1074  self.options['esmodules'].append( "-navigationSchoolESProducer" )
1075  self.options['esmodules'].append( "-TransientTrackBuilderESProducer" )
1076  self.options['esmodules'].append( "-SteppingHelixPropagatorAny" )
1077  self.options['esmodules'].append( "-OppositeMaterialPropagator" )
1078  self.options['esmodules'].append( "-MaterialPropagator" )
1079  self.options['esmodules'].append( "-CaloTowerConstituentsMapBuilder" )
1080  self.options['esmodules'].append( "-CaloTopologyBuilder" )
1081 
1082  self.options['modules'].append( "hltL3MuonIsolations" )
1083  self.options['modules'].append( "hltPixelVertices" )
1084  self.options['modules'].append( "-hltCkfL1SeededTrackCandidates" )
1085  self.options['modules'].append( "-hltCtfL1SeededithMaterialTracks" )
1086  self.options['modules'].append( "-hltCkf3HitL1SeededTrackCandidates" )
1087  self.options['modules'].append( "-hltCtf3HitL1SeededWithMaterialTracks" )
1088  self.options['modules'].append( "-hltCkf3HitActivityTrackCandidates" )
1089  self.options['modules'].append( "-hltCtf3HitActivityWithMaterialTracks" )
1090  self.options['modules'].append( "-hltActivityCkfTrackCandidatesForGSF" )
1091  self.options['modules'].append( "-hltL1SeededCkfTrackCandidatesForGSF" )
1092  self.options['modules'].append( "-hltMuCkfTrackCandidates" )
1093  self.options['modules'].append( "-hltMuCtfTracks" )
1094  self.options['modules'].append( "-hltTau3MuCkfTrackCandidates" )
1095  self.options['modules'].append( "-hltTau3MuCtfWithMaterialTracks" )
1096  self.options['modules'].append( "-hltMuTrackJpsiCkfTrackCandidates" )
1097  self.options['modules'].append( "-hltMuTrackJpsiCtfTracks" )
1098  self.options['modules'].append( "-hltMuTrackJpsiEffCkfTrackCandidates" )
1099  self.options['modules'].append( "-hltMuTrackJpsiEffCtfTracks" )
1100  self.options['modules'].append( "-hltJpsiTkPixelSeedFromL3Candidate" )
1101  self.options['modules'].append( "-hltCkfTrackCandidatesJpsiTk" )
1102  self.options['modules'].append( "-hltCtfWithMaterialTracksJpsiTk" )
1103  self.options['modules'].append( "-hltMuTrackCkfTrackCandidatesOnia" )
1104  self.options['modules'].append( "-hltMuTrackCtfTracksOnia" )
1105 
1106  self.options['modules'].append( "-hltFEDSelector" )
1107  self.options['modules'].append( "-hltL3TrajSeedOIHit" )
1108  self.options['modules'].append( "-hltL3TrajSeedIOHit" )
1109  self.options['modules'].append( "-hltL3NoFiltersTrajSeedOIHit" )
1110  self.options['modules'].append( "-hltL3NoFiltersTrajSeedIOHit" )
1111  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIState" )
1112  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIHit" )
1113  self.options['modules'].append( "-hltL3TrackCandidateFromL2IOHit" )
1114  self.options['modules'].append( "-hltL3TrackCandidateFromL2NoVtx" )
1115  self.options['modules'].append( "-hltHcalDigis" )
1116  self.options['modules'].append( "-hltHoreco" )
1117  self.options['modules'].append( "-hltHfreco" )
1118  self.options['modules'].append( "-hltHbhereco" )
1119  self.options['modules'].append( "-hltESRawToRecHitFacility" )
1120  self.options['modules'].append( "-hltEcalRecHitAll" )
1121  self.options['modules'].append( "-hltESRecHitAll" )
1122  # === eGamma
1123  self.options['modules'].append( "-hltEgammaCkfTrackCandidatesForGSF" )
1124  self.options['modules'].append( "-hltEgammaGsfTracks" )
1125  self.options['modules'].append( "-hltEgammaCkfTrackCandidatesForGSFUnseeded" )
1126  self.options['modules'].append( "-hltEgammaGsfTracksUnseeded" )
1127  # === hltPF
1128  self.options['modules'].append( "-hltPFJetCkfTrackCandidates" )
1129  self.options['modules'].append( "-hltPFJetCtfWithMaterialTracks" )
1130  self.options['modules'].append( "-hltPFlowTrackSelectionHighPurity" )
1131  # === hltFastJet
1132  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator" )
1133  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates" )
1134  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks" )
1135  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator" )
1136  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates" )
1137  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks" )
1138  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet" )
1139  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet" )
1140  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet" )
1141  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbbVBF" )
1142  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbbVBF" )
1143  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF" )
1144  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1145  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1146  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1147  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1148  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1149  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1150  # === hltBLifetimeRegional
1151  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbb" )
1152  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbb" )
1153  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbb" )
1154  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhi" )
1155  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhi" )
1156  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhi" )
1157  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1158  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1159  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1160  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1161  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1162  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1163  self.options['modules'].append( "-hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF" )
1164  self.options['modules'].append( "-hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF" )
1165  self.options['modules'].append( "-hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF" )
1166  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV" )
1167  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV" )
1168  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV" )
1169  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb" )
1170  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb" )
1171  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb" )
1172 
1173  self.options['modules'].append( "-hltPixelTracksForMinBias" )
1174  self.options['modules'].append( "-hltPixelTracksForHighMult" )
1175  self.options['modules'].append( "-hltRegionalPixelTracks" )
1176  self.options['modules'].append( "-hltPixelTracksReg" )
1177  self.options['modules'].append( "-hltPixelTracksL3Muon" )
1178  self.options['modules'].append( "-hltPixelTracksGlbTrkMuon" )
1179  self.options['modules'].append( "-hltPixelTracksHighPtTkMuIso" )
1180  self.options['modules'].append( "-hltPixelTracksHybrid" )
1181  self.options['modules'].append( "-hltPixelTracksForPhotons" )
1182  self.options['modules'].append( "-hltPixelTracksForEgamma" )
1183  self.options['modules'].append( "-hltPixelTracksElectrons" )
1184  self.options['modules'].append( "-hltPixelTracksForNoPU" )
1185 
1186  self.options['modules'].append( "-hltFastPixelHitsVertex" )
1187  self.options['modules'].append( "-hltFastPixelTracks")
1188  self.options['modules'].append( "-hltFastPixelTracksRecover")
1189 
1190  self.options['modules'].append( "-hltPixelLayerPairs" )
1191  self.options['modules'].append( "-hltPixelLayerTriplets" )
1192  self.options['modules'].append( "-hltPixelLayerTripletsReg" )
1193  self.options['modules'].append( "-hltPixelLayerTripletsHITHB" )
1194  self.options['modules'].append( "-hltPixelLayerTripletsHITHE" )
1195  self.options['modules'].append( "-hltMixedLayerPairs" )
1196 
1197  self.options['modules'].append( "-hltFastPrimaryVertexbbPhi")
1198  self.options['modules'].append( "-hltPixelTracksFastPVbbPhi")
1199  self.options['modules'].append( "-hltPixelTracksRecoverbbPhi" )
1200  self.options['modules'].append( "-hltFastPixelHitsVertexVHbb" )
1201  self.options['modules'].append( "-hltFastPixelTracksVHbb" )
1202  self.options['modules'].append( "-hltFastPixelTracksRecoverVHbb" )
1203 
1204  self.options['modules'].append( "-hltFastPrimaryVertex")
1205  self.options['modules'].append( "-hltFastPVPixelVertexFilter")
1206  self.options['modules'].append( "-hltFastPVPixelTracks")
1207  self.options['modules'].append( "-hltFastPVPixelTracksRecover" )
1208 
1209  self.options['modules'].append( "hltPixelMatchElectronsActivity" )
1210 
1211  self.options['modules'].append( "-hltMuonCSCDigis" )
1212  self.options['modules'].append( "-hltMuonDTDigis" )
1213  self.options['modules'].append( "-hltMuonRPCDigis" )
1214  self.options['modules'].append( "-hltGtDigis" )
1215  self.options['modules'].append( "-hltL1GtTrigReport" )
1216  self.options['modules'].append( "hltCsc2DRecHits" )
1217  self.options['modules'].append( "hltDt1DRecHits" )
1218  self.options['modules'].append( "hltRpcRecHits" )
1219  self.options['modules'].append( "-hltScalersRawToDigi" )
1220 
1221  self.options['sequences'].append( "-HLTL1SeededEgammaRegionalRecoTrackerSequence" )
1222  self.options['sequences'].append( "-HLTEcalActivityEgammaRegionalRecoTrackerSequence" )
1223  self.options['sequences'].append( "-HLTPixelMatchElectronActivityTrackingSequence" )
1224  self.options['sequences'].append( "-HLTDoLocalStripSequence" )
1225  self.options['sequences'].append( "-HLTDoLocalPixelSequence" )
1226  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegL2Tau" )
1227  self.options['sequences'].append( "-HLTDoLocalStripSequenceReg" )
1228  self.options['sequences'].append( "-HLTDoLocalPixelSequenceReg" )
1229  self.options['sequences'].append( "-HLTDoLocalStripSequenceRegForBTag" )
1230  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegForBTag" )
1231  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegForNoPU" )
1232  self.options['sequences'].append( "-hltSiPixelDigis" )
1233  self.options['sequences'].append( "-hltSiPixelClusters" )
1234  self.options['sequences'].append( "-hltSiPixelRecHits" )
1235  self.options['sequences'].append( "-HLTRecopixelvertexingSequence" )
1236  self.options['sequences'].append( "-HLTEndSequence" )
1237  self.options['sequences'].append( "-HLTBeginSequence" )
1238  self.options['sequences'].append( "-HLTBeginSequenceNZS" )
1239  self.options['sequences'].append( "-HLTBeginSequenceBPTX" )
1240  self.options['sequences'].append( "-HLTBeginSequenceAntiBPTX" )
1241  self.options['sequences'].append( "-HLTHBHENoiseSequence" )
1242  self.options['sequences'].append( "-HLTIterativeTrackingIter04" )
1243  self.options['sequences'].append( "-HLTIterativeTrackingIter02" )
1244  self.options['sequences'].append( "-HLTIterativeTracking" )
1245  self.options['sequences'].append( "-HLTIterativeTrackingTau3Mu" )
1246  self.options['sequences'].append( "-HLTIterativeTrackingReg" )
1247  self.options['sequences'].append( "-HLTIterativeTrackingForElectronIter02" )
1248  self.options['sequences'].append( "-HLTIterativeTrackingForPhotonsIter02" )
1249  self.options['sequences'].append( "-HLTIterativeTrackingL3MuonIter02" )
1250  self.options['sequences'].append( "-HLTIterativeTrackingGlbTrkMuonIter02" )
1251  self.options['sequences'].append( "-HLTIterativeTrackingL3MuonRegIter02" )
1252  self.options['sequences'].append( "-HLTIterativeTrackingHighPtTkMu" )
1253  self.options['sequences'].append( "-HLTIterativeTrackingHighPtTkMuIsoIter02" )
1254  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIter02" )
1255  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIter12" )
1256  self.options['sequences'].append( "-HLTIterativeTrackingForTauIter04" )
1257  self.options['sequences'].append( "-HLTIterativeTrackingForTauIter02" )
1258  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedJpsiIter02" )
1259  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedPsiPrimeIter02" )
1260  self.options['sequences'].append( "-HLTIterativeTrackingDisplacedNRMuMuIter02" )
1261  self.options['sequences'].append( "-HLTIterativeTrackingForBTagIteration0" )
1262  self.options['sequences'].append( "-HLTIterativeTrackingIteration4DisplacedJets" )
1263  self.options['sequences'].append( "-HLTRegionalCKFTracksForL3Isolation" )
1264  self.options['sequences'].append( "-HLTHBHENoiseCleanerSequence" )
1265 
1266  # remove HLTAnalyzerEndpath from fastsim cff's
1267  if self.config.fragment:
1268  self.options['paths'].append( "-HLTAnalyzerEndpath" )
1269 
def buildOptions
Definition: confdb.py:979
def confdb.buildPathList (   self)

Definition at line 922 of file confdb.py.

923  def buildPathList(self):
924  self.all_paths = self.getPathList()
925 
926  if self.config.paths:
927  # no path list was requested, dump the full table, minus unsupported / unwanted paths
928  paths = self.config.paths.split(',')
929  else:
930  # dump only the requested paths, plus the eventual output endpaths
931  paths = []
932 
933  if self.config.fragment or self.config.output in ('none', 'full'):
934  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
935  if self.config.paths:
936  # paths are removed by default
937  pass
938  else:
939  # drop all output endpaths
940  paths.append( "-*Output" )
941  elif self.config.output == 'minimal':
942  # drop all output endpaths but HLTDQMResultsOutput
943  if self.config.paths:
944  paths.append( "HLTDQMResultsOutput" )
945  else:
946  paths.append( "-*Output" )
947  paths.append( "HLTDQMResultsOutput" )
948  else:
949  # keep / add back all output endpaths
950  if self.config.paths:
951  paths.append( "*Output" )
952  else:
953  pass # paths are kepy by default
954 
955  # drop paths unsupported by fastsim
956  if self.config.fastsim:
957  paths.extend( "-%s" % path for path in self.fastsimUnsupportedPaths )
958 
959  # drop unwanted paths for profiling (and timing studies)
960  if self.config.profiling:
961  paths.append( "-HLTriggerFirstPath" )
962  paths.append( "-HLTAnalyzerEndpath" )
963 
964  # this should never be in any dump (nor online menu)
965  paths.append( "-OfflineOutput" )
966 
967  # expand all wildcards
968  paths = self.expandWildcards(paths, self.all_paths)
969 
970  if self.config.paths:
971  # do an "additive" consolidation
972  self.options['paths'] = self.consolidatePositiveList(paths)
973  if not self.options['paths']:
974  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
975  else:
976  # do a "subtractive" consolidation
977  self.options['paths'] = self.consolidateNegativeList(paths)
978 
def buildPathList
Definition: confdb.py:922
def confdb.dumppaths (   paths)
static

Definition at line 916 of file confdb.py.

917  def dumppaths(paths):
918  sys.stderr.write('Path selection:\n')
919  for path in paths:
920  sys.stderr.write('\t%s\n' % path)
921  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:916
def confdb.expand_filenames (   self,
  input 
)

Definition at line 1284 of file confdb.py.

1285  def expand_filenames(self, input):
1286  # check if the input is a dataset or a list of files
1287  if input[0:8] == 'dataset:':
1288  from dasFileQuery import dasFileQuery
1289  # extract the dataset name, and use DAS to fine the list of LFNs
1290  dataset = input[8:]
1291  files = dasFileQuery(dataset)
1292  else:
1293  # assume a comma-separated list of input files
1294  files = self.config.input.split(',')
1295  return files
def expand_filenames
Definition: confdb.py:1284
def confdb.fixForFastSim (   self)

Definition at line 401 of file confdb.py.

402  def fixForFastSim(self):
403  if self.config.fastsim:
404  # adapt the the configuration fragment to run under fastsim
405  self.data = re.compile( r'process = cms\.Process.*$', re.MULTILINE ).sub( r'\g<0>\n\nprocess.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )', self.data)
406 
407  # remove the definition of streams and datasets
408  self.data = re.compile( r'^process\.streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
409  self.data = re.compile( r'^process\.datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
410 
411  # fix the definition of some modules
412  # FIXME: this should be updated to take into accout the --l1-emulator option
413  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
414  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'simGmtDigis')
415  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'simGtDigis')
416  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'simGtDigis')
417  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
418  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
419  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
420  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
421  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
422  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
423  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
424  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
425  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
426  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
427 
428  # MeasurementTrackerEvent
429  self._fix_parameter( type = 'InputTag', value = 'hltSiStripClusters', replace = 'MeasurementTrackerEvent')
430 
431  # fix the definition of sequences and paths
432  self.data = re.sub( r'process.hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
433  self.data = re.sub( r'process.hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
434  self.data = re.sub( r'process.hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
435  self.data = re.sub( r'process.HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
436  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
437 
def fixForFastSim
Definition: confdb.py:401
def confdb.fixForMC (   self)

Definition at line 390 of file confdb.py.

391  def fixForMC(self):
392  if not self.config.data:
393  # customise the HLT menu for running on MC
394  if not self.config.fragment:
395  self.data += """
396 # customise the HLT menu for running on MC
397 from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
398 process = customizeHLTforMC(process)
399 """
400 
def fixForMC
Definition: confdb.py:390
def confdb.fixPrescales (   self)

Definition at line 438 of file confdb.py.

439  def fixPrescales(self):
440  # update the PrescaleService to match the new list of paths
441  if self.options['paths']:
442  if self.options['paths'][0][0] == '-':
443  # drop requested paths
444  for minuspath in self.options['paths']:
445  path = minuspath[1:]
446  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
447  else:
448  # keep requested paths
449  for path in self.all_paths:
450  if path not in self.options['paths']:
451  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
452 
453  if self.config.prescale and (self.config.prescale.lower() != 'none'):
454  # TO DO: check that the requested prescale column is valid
455  self.data += """
456 # force the use of a specific HLT prescale column
457 if 'PrescaleService' in %(dict)s:
458  %(process)sPrescaleService.forceDefault = True
459  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
460 """
461 
def fixPrescales
Definition: confdb.py:438
def confdb.instrumentDQM (   self)

Definition at line 883 of file confdb.py.

884  def instrumentDQM(self):
885  if not self.config.hilton:
886  # remove any reference to the hltDQMFileSaver
887  if 'hltDQMFileSaver' in self.data:
888  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
889  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
890  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
891 
892  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
893  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
894  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
895  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
896  dqmstore += """
897 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
898  fileName = cms.untracked.string("DQMIO.root")
899 )
900 """
901 
902  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
903  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
904  if empty_path.search(self.data):
905  # replace an empty DQMOutput path
906  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
907  elif other_path.search(self.data):
908  # prepend the dqmOutput to the DQMOutput path
909  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
910  else:
911  # ceate a new DQMOutput path with the dqmOutput module
912  self.data += dqmstore
913  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
914 
def instrumentDQM
Definition: confdb.py:883
def confdb.instrumentErrorEventType (   self)

Definition at line 476 of file confdb.py.

477  def instrumentErrorEventType(self):
478  if self.config.errortype:
479  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
480  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
481  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
482  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
483 
def instrumentErrorEventType
Definition: confdb.py:476
def confdb.instrumentOpenMode (   self)

Definition at line 462 of file confdb.py.

References join().

463  def instrumentOpenMode(self):
464  if self.config.open:
465  # find all EDfilters
466  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
467  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
468  # remove existing 'cms.ignore' and '~' modifiers
469  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
470  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
471  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
472  for some in splitter(filters, 1000):
473  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
474  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
475 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:462
def confdb.instrumentTiming (   self)

Definition at line 792 of file confdb.py.

793  def instrumentTiming(self):
794  if self.config.profiling:
795  # instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
796  text = ''
797 
798  if not 'hltGetRaw' in self.data:
799  # add hltGetRaw
800  text += """
801 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
802  RawDataCollection = cms.InputTag( "rawDataCollector" )
803 )
804 """
805 
806  if not 'hltGetConditions' in self.data:
807  # add hltGetConditions
808  text += """
809 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
810  verbose = cms.untracked.bool( False ),
811  toGet = cms.VPSet( )
812 )
813 """
814 
815  if not 'hltBoolFalse' in self.data:
816  # add hltBoolFalse
817  text += """
818 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
819  result = cms.bool( False )
820 )
821 """
822 
823  # add the definition of HLTriggerFirstPath
824  # FIXME in a cff, should also update the HLTSchedule
825  text += """
826 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
827 """
828  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
829 
830 
831  # instrument the menu with the Service, EDProducer and EndPath needed for timing studies
832  # FIXME in a cff, should also update the HLTSchedule
833  if self.config.timing:
834  self.data += """
835 # instrument the menu with the modules and EndPath needed for timing studies
836 """
837 
838  if not 'FastTimerService' in self.data:
839  self.data += '\n# configure the FastTimerService\n'
840  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
841  else:
842  self.data += '\n# configure the FastTimerService\n'
843 
844  self.data += """# this is currently ignored in CMSSW 7.x, always using the real time clock
845 %(process)sFastTimerService.useRealTimeClock = True
846 # enable specific features
847 %(process)sFastTimerService.enableTimingPaths = True
848 %(process)sFastTimerService.enableTimingModules = True
849 %(process)sFastTimerService.enableTimingExclusive = True
850 # print a text summary at the end of the job
851 %(process)sFastTimerService.enableTimingSummary = True
852 # skip the first path (disregard the time spent loading event and conditions data)
853 %(process)sFastTimerService.skipFirstPath = True
854 # enable DQM plots
855 %(process)sFastTimerService.enableDQM = True
856 # enable most per-path DQM plots
857 %(process)sFastTimerService.enableDQMbyPathActive = True
858 %(process)sFastTimerService.enableDQMbyPathTotal = True
859 %(process)sFastTimerService.enableDQMbyPathOverhead = False
860 %(process)sFastTimerService.enableDQMbyPathDetails = True
861 %(process)sFastTimerService.enableDQMbyPathCounters = True
862 %(process)sFastTimerService.enableDQMbyPathExclusive = True
863 # disable per-module DQM plots
864 %(process)sFastTimerService.enableDQMbyModule = False
865 %(process)sFastTimerService.enableDQMbyModuleType = False
866 # enable per-event DQM sumary plots
867 %(process)sFastTimerService.enableDQMSummary = True
868 # enable per-event DQM plots by lumisection
869 %(process)sFastTimerService.enableDQMbyLumiSection = True
870 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
871 # set the time resolution of the DQM plots
872 %(process)sFastTimerService.dqmTimeRange = 1000.
873 %(process)sFastTimerService.dqmTimeResolution = 5.
874 %(process)sFastTimerService.dqmPathTimeRange = 100.
875 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
876 %(process)sFastTimerService.dqmModuleTimeRange = 40.
877 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
878 # set the base DQM folder for the plots
879 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
880 %(process)sFastTimerService.enableDQMbyProcesses = True
881 """
882 
def instrumentTiming
Definition: confdb.py:792
def confdb.loadAdditionalConditions (   self,
  comment,
  conditions 
)

Definition at line 755 of file confdb.py.

756  def loadAdditionalConditions(self, comment, *conditions):
757  # load additional conditions
758  self.data += """
759 # %s
760 if 'GlobalTag' in %%(dict)s:
761 """ % comment
762  for condition in conditions:
763  self.data += """ %%(process)sGlobalTag.toGet.append(
764  cms.PSet(
765  record = cms.string( '%(record)s' ),
766  tag = cms.string( '%(tag)s' ),
767  label = cms.untracked.string( '%(label)s' ),
768  connect = cms.untracked.string( '%(connect)s' )
769  )
770  )
771 """ % condition
772 
def loadAdditionalConditions
Definition: confdb.py:755
def confdb.loadCff (   self,
  module 
)

Definition at line 780 of file confdb.py.

781  def loadCff(self, module):
782  self.data += self.loadCffCommand(module)
783 
def loadCff
Definition: confdb.py:780
def confdb.loadCffCommand (   self,
  module 
)

Definition at line 773 of file confdb.py.

774  def loadCffCommand(self, module):
775  # load a cfi or cff module
776  if self.config.fragment:
777  return 'from %s import *\n' % module
778  else:
779  return 'process.load( "%s" )\n' % module
def loadCffCommand
Definition: confdb.py:773
def confdb.overrideGlobalTag (   self)

Definition at line 484 of file confdb.py.

485  def overrideGlobalTag(self):
486  # overwrite GlobalTag
487  # the logic is:
488  # - always set the correct connection string and pfnPrefix
489  # - if a GlobalTag is specified on the command line:
490  # - override the global tag
491  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
492  # - if a GlobalTag is NOT specified on the command line:
493  # - when running on data, do nothing, and keep the global tag in the menu
494  # - when running on mc, take the GT from the configuration.type
495 
496  # override the GlobalTag connection string and pfnPrefix
497  text = """
498 # override the GlobalTag, connection string and pfnPrefix
499 if 'GlobalTag' in %(dict)s:
500 """
501 
502  # when running on MC, override the global tag even if not specified on the command line
503  if not self.config.data and not self.config.globaltag:
504  if self.config.type in globalTag:
505  self.config.globaltag = globalTag[self.config.type]
506  else:
507  self.config.globaltag = globalTag['GRun']
508 
509  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
510  if self.config.l1.override:
511  self.config.l1.record = 'L1GtTriggerMenuRcd'
512  self.config.l1.label = ''
513  self.config.l1.tag = self.config.l1.override
514  if not self.config.l1.connect:
515  self.config.l1.connect = '%(connect)s/CMS_CONDITIONS'
516  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
517  else:
518  self.config.l1cond = None
519 
520  if self.config.globaltag or self.config.l1cond:
521  text += " from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag as customiseGlobalTag\n"
522  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
523  if self.config.globaltag:
524  text += ", globaltag = %s" % repr(self.config.globaltag)
525  if self.config.l1cond:
526  text += ", conditions = %s" % repr(self.config.l1cond)
527  text += ")\n"
528 
529  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_CONDITIONS'
530  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
531  for pset in process.GlobalTag.toGet.value():
532  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
533  # fix for multi-run processing
534  %(process)sGlobalTag.RefreshEachRun = cms.untracked.bool( False )
535  %(process)sGlobalTag.ReconnectEachRun = cms.untracked.bool( False )
536 """
537  self.data += text
def overrideGlobalTag
Definition: confdb.py:484
def confdb.overrideL1MenuXml (   self)

Definition at line 538 of file confdb.py.

539  def overrideL1MenuXml(self):
540  # if requested, override the L1 menu from the GlobalTag (Xml file)
541  if self.config.l1Xml.XmlFile:
542  text = """
543 # override the L1 menu from an Xml file
544 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
545  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
546  DefXmlFile = cms.string('%(XmlFile)s'),
547  VmeXmlFile = cms.string('')
548 )
549 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
550  recordName = cms.string('L1GtTriggerMenuRcd'),
551  iovIsRunNotTime = cms.bool(True),
552  firstValid = cms.vuint32(1)
553 )
554 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
555 """
556  self.data += text % self.config.l1Xml.__dict__
def overrideL1MenuXml
Definition: confdb.py:538
def confdb.overrideOutput (   self)

Definition at line 672 of file confdb.py.

673  def overrideOutput(self):
674  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
675  self.data = re.sub(
676  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
677  r'%(process)shltOutput\2 = cms.OutputModule( "PoolOutputModule",\n fileName = cms.untracked.string( "output\2.root" ),\n fastCloning = cms.untracked.bool( False ),\n dataset = cms.untracked.PSet(\n filterName = cms.untracked.string( "" ),\n dataTier = cms.untracked.string( "RAW" )\n ),',
678  self.data
679  )
680 
681  if not self.config.fragment and self.config.output == 'full':
682  # add a single "keep *" output
683  self.data += """
684 # add a single "keep *" output
685 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
686  fileName = cms.untracked.string( "outputFULL.root" ),
687  fastCloning = cms.untracked.bool( False ),
688  dataset = cms.untracked.PSet(
689  dataTier = cms.untracked.string( 'RECO' ),
690  filterName = cms.untracked.string( '' )
691  ),
692  outputCommands = cms.untracked.vstring( 'keep *' )
693 )
694 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
695 """
696 
def overrideOutput
Definition: confdb.py:672
def confdb.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 784 of file confdb.py.

785  def overrideParameters(self, module, parameters):
786  # override a module's parameter if the module is present in the configuration
787  self.data += "if '%s' in %%(dict)s:\n" % module
788  for (parameter, value) in parameters:
789  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
790  self.data += "\n"
791 
def overrideParameters
Definition: confdb.py:784
def confdb.overrideProcessName (   self)

Definition at line 698 of file confdb.py.

699  def overrideProcessName(self):
700  if self.config.name is None:
701  return
702 
703  # sanitise process name
704  self.config.name = self.config.name.replace("_","")
705  # override the process name
706  quote = '[\'\"]'
707  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)
708 
709  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
710  self.data += """
711 # adapt HLT modules to the correct process name
712 if 'hltTrigReport' in %%(dict)s:
713  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
714 
715 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
716  %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
717 
718 if 'hltPreExpressOutputSmart' in %%(dict)s:
719  %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
720 
721 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
722  %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
723 
724 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
725  %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
726 
727 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
728  %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
729 
730 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
731  %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
732 
733 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
734  %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
735 
736 if 'hltDQMHLTScalers' in %%(dict)s:
737  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
738  %%(process)shltDQMHLTScalers.processname = '%(name)s'
739 
740 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
741  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
742 """ % self.config.__dict__
743 
def overrideProcessName
Definition: confdb.py:698
def confdb.runL1Emulator (   self)

Definition at line 588 of file confdb.py.

References spr.find().

589  def runL1Emulator(self):
590  # if requested, run (part of) the L1 emulator
591  if self.config.emulator:
592  # FIXME this fragment used "process" explicitly
593  emulator = {
594  'RawToDigi': '',
595  'CustomL1T': '',
596  'CustomHLT': ''
597  }
598 
599  if self.config.data:
600  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
601  else:
602  emulator['RawToDigi'] = 'RawToDigi_cff'
603 
604  if self.config.emulator == 'gt':
605  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
606  emulator['CustomHLT'] = 'switchToSimGtDigis'
607  elif self.config.emulator == 'gct,gt':
608  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
609  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
610  elif self.config.emulator == 'gmt,gt':
611  # XXX currently unsupported
612  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
613  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
614  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
615  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
616  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
617  elif self.config.emulator in ('stage1,gt'):
618  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
619  emulator['CustomHLT'] = 'switchToSimStage1Digis'
620  else:
621  # unsupported argument, default to running the whole emulator
622  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
623  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
624 
625  self.data += """
626 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
627 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
628 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
629 import L1Trigger.Configuration.L1Trigger_custom
630 #
631 """ % emulator
632 
633  if (self.config.emulator).find("stage1")>-1:
634  self.data += """
635 # 2015 Run2 emulator
636 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
637 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
638 """ % emulator
639  else:
640  self.data += """
641 # Run1 Emulator
642 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
643 """ % emulator
644 
645  self.data += """
646 #
647 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
648 # customize the HLT to use the emulated results
649 import HLTrigger.Configuration.customizeHLTforL1Emulator
650 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
651 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
652 """ % emulator
def runL1Emulator
Definition: confdb.py:588
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
def confdb.runL1EmulatorGT (   self)

Definition at line 557 of file confdb.py.

558  def runL1EmulatorGT(self):
559  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
560  if not self.config.emulator:
561  return
562 
563  if self.config.emulator != 'gt':
564  # only the GT emulator is currently supported
565  return
566 
567  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
568  text = """
569 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
570 """
571  if self.config.fragment:
572  # FIXME in a cff, should also update the HLTSchedule
573  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
574  else:
575  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
576 
577  if not 'hltBoolFalse' in self.data:
578  # add hltBoolFalse
579  text += """
580 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
581  result = cms.bool( False )
582 )
583 """
584  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
585 
586  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
587 
def runL1EmulatorGT
Definition: confdb.py:557
def confdb.splitter (   iterator,
  n 
)

Definition at line 11 of file confdb.py.

References list().

Referenced by TotemT1Organization._FromUnitIDToData(), SplittingConfigurableHisto.fill(), HLTLogMonitorFilter.filter(), FWTriggerTableView.saveImageTo(), FWTableView.saveImageTo(), and SplittingConfigurableHisto.SplittingConfigurableHisto().

11 
12 def splitter(iterator, n):
13  i = iterator.__iter__()
14  while True:
15  l = list(islice(i, n))
16  if l:
17  yield l
18  else:
19  break
20 
def splitter
Definition: confdb.py:11
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def confdb.switchToNewL1Skim (   self)

Definition at line 653 of file confdb.py.

654  def switchToNewL1Skim(self):
655  # add snippet to switch to new L1 skim files
656  if self.config.l1skim:
657  self.data += """
658 # Customize the menu to use information from new L1 emulator in the L1 skim files
659 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
660 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
661 for module in process.__dict__.itervalues():
662  if isinstance(module, cms._Module):
663  for parameter in module.__dict__.itervalues():
664  if isinstance(parameter, cms.InputTag):
665  if parameter.moduleLabel == 'hltGtDigis':
666  parameter.moduleLabel = "gtDigisFromSkim"
667  elif parameter.moduleLabel == 'hltL1GtObjectMap':
668  parameter.moduleLabel = "gtDigisFromSkim"
669  elif parameter.moduleLabel == 'hltGctDigis':
670  parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
671 """
def switchToNewL1Skim
Definition: confdb.py:653
def confdb.updateMessageLogger (   self)

Definition at line 744 of file confdb.py.

745  def updateMessageLogger(self):
746  # request summary informations from the MessageLogger
747  self.data += """
748 if 'MessageLogger' in %(dict)s:
749  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
750  %(process)sMessageLogger.categories.append('L1GtTrigReport')
751  %(process)sMessageLogger.categories.append('HLTrigReport')
752  %(process)sMessageLogger.categories.append('FastReport')
753 """
754 
def updateMessageLogger
Definition: confdb.py:744

Variable Documentation

confdb.all_paths

Definition at line 923 of file confdb.py.

confdb.data

Definition at line 379 of file confdb.py.

confdb.parent

Definition at line 1312 of file confdb.py.

confdb.source

Definition at line 1299 of file confdb.py.