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

408  def _fix_parameter(self, **args):
409  """arguments:
410  name: parameter name (optional)
411  type: parameter type (look for tracked and untracked variants)
412  value: original value
413  replace: replacement value
414  """
415  if 'name' in args:
416  self.data = re.sub(
417  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
418  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
419  self.data)
420  else:
421  self.data = re.sub(
422  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
423  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
424  self.data)
425 
def _fix_parameter
Definition: confdb.py:407
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 389 of file confdb.py.

390  def addGlobalOptions(self):
391  # add global options
392  self.data += """
393 # limit the number of events to be processed
394 %%(process)smaxEvents = cms.untracked.PSet(
395  input = cms.untracked.int32( %d )
396 )
397 """ % self.config.events
398 
399  if not self.config.profiling:
400  self.data += """
401 # enable the TrigReport and TimeReport
402 %(process)soptions = cms.untracked.PSet(
403  wantSummary = cms.untracked.bool( True )
404 )
405 """
406 
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:389
def confdb.append_filenames (   self,
  name,
  filenames 
)

Definition at line 1298 of file confdb.py.

1299  def append_filenames(self, name, filenames):
1300  if len(filenames) > 255:
1301  token_open = "( *("
1302  token_close = ") )"
1303  else:
1304  token_open = "("
1305  token_close = ")"
1306 
1307  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
1308  for line in filenames:
1309  self.data += " '%s',\n" % line
1310  self.data += " %s,\n" % (token_close)
1311 
def append_filenames
Definition: confdb.py:1298
def confdb.build_source (   self)

Definition at line 1324 of file confdb.py.

1325  def build_source(self):
1326  if self.config.input:
1327  # if a dataset or a list of input files was given, use it
1328  self.source = self.expand_filenames(self.config.input)
1329  elif self.config.online:
1330  # online we always run on data
1331  self.source = [ "file:/tmp/InputCollection.root" ]
1332  elif self.config.data:
1333  # offline we can run on data...
1334  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1335  else:
1336  # ...or on mc
1337  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1338 
1339  if self.config.parent:
1340  # if a dataset or a list of input files was given for the parent data, use it
1341  self.parent = self.expand_filenames(self.config.parent)
1342 
1343  self.data += """
1344 %(process)ssource = cms.Source( "PoolSource",
1345 """
1346  self.append_filenames("fileNames", self.source)
1347  if (self.parent):
1348  self.append_filenames("secondaryFileNames", self.parent)
1349  self.data += """\
1350  inputCommands = cms.untracked.vstring(
1351  'keep *'
1352  )
1353 )
1354 """
def build_source
Definition: confdb.py:1324
def confdb.buildOptions (   self)

Definition at line 1004 of file confdb.py.

References python.multivaluedict.append().

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

Definition at line 947 of file confdb.py.

948  def buildPathList(self):
949  self.all_paths = self.getPathList()
950 
951  if self.config.paths:
952  # no path list was requested, dump the full table, minus unsupported / unwanted paths
953  paths = self.config.paths.split(',')
954  else:
955  # dump only the requested paths, plus the eventual output endpaths
956  paths = []
957 
958  if self.config.fragment or self.config.output in ('none', 'full'):
959  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
960  if self.config.paths:
961  # paths are removed by default
962  pass
963  else:
964  # drop all output endpaths
965  paths.append( "-*Output" )
966  elif self.config.output == 'minimal':
967  # drop all output endpaths but HLTDQMResultsOutput
968  if self.config.paths:
969  paths.append( "HLTDQMResultsOutput" )
970  else:
971  paths.append( "-*Output" )
972  paths.append( "HLTDQMResultsOutput" )
973  else:
974  # keep / add back all output endpaths
975  if self.config.paths:
976  paths.append( "*Output" )
977  else:
978  pass # paths are kepy by default
979 
980  # drop paths unsupported by fastsim
981  if self.config.fastsim:
982  paths.extend( "-%s" % path for path in self.fastsimUnsupportedPaths )
983 
984  # drop unwanted paths for profiling (and timing studies)
985  if self.config.profiling:
986  paths.append( "-HLTriggerFirstPath" )
987  paths.append( "-HLTAnalyzerEndpath" )
988 
989  # this should never be in any dump (nor online menu)
990  paths.append( "-OfflineOutput" )
991 
992  # expand all wildcards
993  paths = self.expandWildcards(paths, self.all_paths)
994 
995  if self.config.paths:
996  # do an "additive" consolidation
997  self.options['paths'] = self.consolidatePositiveList(paths)
998  if not self.options['paths']:
999  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
1000  else:
1001  # do a "subtractive" consolidation
1002  self.options['paths'] = self.consolidateNegativeList(paths)
1003 
def buildPathList
Definition: confdb.py:947
def confdb.dumppaths (   paths)
static

Definition at line 941 of file confdb.py.

942  def dumppaths(paths):
943  sys.stderr.write('Path selection:\n')
944  for path in paths:
945  sys.stderr.write('\t%s\n' % path)
946  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:941
def confdb.expand_filenames (   self,
  input 
)

Definition at line 1312 of file confdb.py.

1313  def expand_filenames(self, input):
1314  # check if the input is a dataset or a list of files
1315  if input[0:8] == 'dataset:':
1316  from dasFileQuery import dasFileQuery
1317  # extract the dataset name, and use DAS to fine the list of LFNs
1318  dataset = input[8:]
1319  files = dasFileQuery(dataset)
1320  else:
1321  # assume a comma-separated list of input files
1322  files = self.config.input.split(',')
1323  return files
def expand_filenames
Definition: confdb.py:1312
def confdb.fixForFastSim (   self)

Definition at line 426 of file confdb.py.

427  def fixForFastSim(self):
428  if self.config.fastsim:
429  # adapt the the configuration fragment to run under fastsim
430  self.data = re.compile( r'process = cms\.Process.*$', re.MULTILINE ).sub( r'\g<0>\n\nprocess.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )', self.data)
431 
432  # remove the definition of streams and datasets
433  self.data = re.compile( r'^process\.streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
434  self.data = re.compile( r'^process\.datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
435 
436  # fix the definition of some modules
437  # FIXME: this should be updated to take into accout the --l1-emulator option
438  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
439  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'simGmtDigis')
440  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'simGtDigis')
441  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'simGtDigis')
442  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
443  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
444  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
445  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
446  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
447  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
448  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
449  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
450  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
451  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
452 
453  # MeasurementTrackerEvent
454  self._fix_parameter( type = 'InputTag', value = 'hltSiStripClusters', replace = 'MeasurementTrackerEvent')
455 
456  # fix the definition of sequences and paths
457  self.data = re.sub( r'process.hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
458  self.data = re.sub( r'process.hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
459  self.data = re.sub( r'process.hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
460  self.data = re.sub( r'process.HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
461  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
462 
def fixForFastSim
Definition: confdb.py:426
def confdb.fixPrescales (   self)

Definition at line 463 of file confdb.py.

464  def fixPrescales(self):
465  # update the PrescaleService to match the new list of paths
466  if self.options['paths']:
467  if self.options['paths'][0][0] == '-':
468  # drop requested paths
469  for minuspath in self.options['paths']:
470  path = minuspath[1:]
471  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
472  else:
473  # keep requested paths
474  for path in self.all_paths:
475  if path not in self.options['paths']:
476  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
477 
478  if self.config.prescale and (self.config.prescale.lower() != 'none'):
479  # TO DO: check that the requested prescale column is valid
480  self.data += """
481 # force the use of a specific HLT prescale column
482 if 'PrescaleService' in %(dict)s:
483  %(process)sPrescaleService.forceDefault = True
484  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
485 """
486 
def fixPrescales
Definition: confdb.py:463
def confdb.instrumentDQM (   self)

Definition at line 908 of file confdb.py.

909  def instrumentDQM(self):
910  if not self.config.hilton:
911  # remove any reference to the hltDQMFileSaver
912  if 'hltDQMFileSaver' in self.data:
913  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
914  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
915  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
916 
917  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
918  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
919  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
920  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
921  dqmstore += """
922 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
923  fileName = cms.untracked.string("DQMIO.root")
924 )
925 """
926 
927  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
928  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
929  if empty_path.search(self.data):
930  # replace an empty DQMOutput path
931  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
932  elif other_path.search(self.data):
933  # prepend the dqmOutput to the DQMOutput path
934  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
935  else:
936  # ceate a new DQMOutput path with the dqmOutput module
937  self.data += dqmstore
938  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
939 
def instrumentDQM
Definition: confdb.py:908
def confdb.instrumentErrorEventType (   self)

Definition at line 501 of file confdb.py.

502  def instrumentErrorEventType(self):
503  if self.config.errortype:
504  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
505  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
506  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
507  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
508 
def instrumentErrorEventType
Definition: confdb.py:501
def confdb.instrumentOpenMode (   self)

Definition at line 487 of file confdb.py.

References join().

488  def instrumentOpenMode(self):
489  if self.config.open:
490  # find all EDfilters
491  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
492  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
493  # remove existing 'cms.ignore' and '~' modifiers
494  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
495  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
496  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
497  for some in splitter(filters, 1000):
498  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
499  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
500 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:487
def confdb.instrumentTiming (   self)

Definition at line 817 of file confdb.py.

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

Definition at line 780 of file confdb.py.

781  def loadAdditionalConditions(self, comment, *conditions):
782  # load additional conditions
783  self.data += """
784 # %s
785 if 'GlobalTag' in %%(dict)s:
786 """ % comment
787  for condition in conditions:
788  self.data += """ %%(process)sGlobalTag.toGet.append(
789  cms.PSet(
790  record = cms.string( '%(record)s' ),
791  tag = cms.string( '%(tag)s' ),
792  label = cms.untracked.string( '%(label)s' ),
793  connect = cms.untracked.string( '%(connect)s' )
794  )
795  )
796 """ % condition
797 
def loadAdditionalConditions
Definition: confdb.py:780
def confdb.loadCff (   self,
  module 
)

Definition at line 805 of file confdb.py.

806  def loadCff(self, module):
807  self.data += self.loadCffCommand(module)
808 
def loadCff
Definition: confdb.py:805
def confdb.loadCffCommand (   self,
  module 
)

Definition at line 798 of file confdb.py.

799  def loadCffCommand(self, module):
800  # load a cfi or cff module
801  if self.config.fragment:
802  return 'from %s import *\n' % module
803  else:
804  return 'process.load( "%s" )\n' % module
def loadCffCommand
Definition: confdb.py:798
def confdb.overrideGlobalTag (   self)

Definition at line 509 of file confdb.py.

510  def overrideGlobalTag(self):
511  # overwrite GlobalTag
512  # the logic is:
513  # - always set the correct connection string and pfnPrefix
514  # - if a GlobalTag is specified on the command line:
515  # - override the global tag
516  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
517  # - if a GlobalTag is NOT specified on the command line:
518  # - when running on data, do nothing, and keep the global tag in the menu
519  # - when running on mc, take the GT from the configuration.type
520 
521  # override the GlobalTag connection string and pfnPrefix
522  text = """
523 # override the GlobalTag, connection string and pfnPrefix
524 if 'GlobalTag' in %(dict)s:
525 """
526 
527  # when running on MC, override the global tag even if not specified on the command line
528  if not self.config.data and not self.config.globaltag:
529  if self.config.type in globalTag:
530  self.config.globaltag = globalTag[self.config.type]
531  else:
532  self.config.globaltag = globalTag['GRun']
533 
534  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
535  if self.config.l1.override:
536  self.config.l1.record = 'L1GtTriggerMenuRcd'
537  self.config.l1.label = ''
538  self.config.l1.tag = self.config.l1.override
539  if not self.config.l1.connect:
540  self.config.l1.connect = '%(connect)s/CMS_CONDITIONS'
541  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
542  else:
543  self.config.l1cond = None
544 
545  if self.config.globaltag or self.config.l1cond:
546  text += " from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag as customiseGlobalTag\n"
547  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
548  if self.config.globaltag:
549  text += ", globaltag = %s" % repr(self.config.globaltag)
550  if self.config.l1cond:
551  text += ", conditions = %s" % repr(self.config.l1cond)
552  text += ")\n"
553 
554  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_CONDITIONS'
555  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
556  for pset in process.GlobalTag.toGet.value():
557  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
558  # fix for multi-run processing
559  %(process)sGlobalTag.RefreshEachRun = cms.untracked.bool( False )
560  %(process)sGlobalTag.ReconnectEachRun = cms.untracked.bool( False )
561 """
562  self.data += text
def overrideGlobalTag
Definition: confdb.py:509
def confdb.overrideL1MenuXml (   self)

Definition at line 563 of file confdb.py.

564  def overrideL1MenuXml(self):
565  # if requested, override the L1 menu from the GlobalTag (Xml file)
566  if self.config.l1Xml.XmlFile:
567  text = """
568 # override the L1 menu from an Xml file
569 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
570  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
571  DefXmlFile = cms.string('%(XmlFile)s'),
572  VmeXmlFile = cms.string('')
573 )
574 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
575  recordName = cms.string('L1GtTriggerMenuRcd'),
576  iovIsRunNotTime = cms.bool(True),
577  firstValid = cms.vuint32(1)
578 )
579 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
580 """
581  self.data += text % self.config.l1Xml.__dict__
def overrideL1MenuXml
Definition: confdb.py:563
def confdb.overrideOutput (   self)

Definition at line 697 of file confdb.py.

698  def overrideOutput(self):
699  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
700  self.data = re.sub(
701  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
702  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 ),',
703  self.data
704  )
705 
706  if not self.config.fragment and self.config.output == 'full':
707  # add a single "keep *" output
708  self.data += """
709 # add a single "keep *" output
710 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
711  fileName = cms.untracked.string( "outputFULL.root" ),
712  fastCloning = cms.untracked.bool( False ),
713  dataset = cms.untracked.PSet(
714  dataTier = cms.untracked.string( 'RECO' ),
715  filterName = cms.untracked.string( '' )
716  ),
717  outputCommands = cms.untracked.vstring( 'keep *' )
718 )
719 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
720 """
721 
def overrideOutput
Definition: confdb.py:697
def confdb.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 809 of file confdb.py.

810  def overrideParameters(self, module, parameters):
811  # override a module's parameter if the module is present in the configuration
812  self.data += "if '%s' in %%(dict)s:\n" % module
813  for (parameter, value) in parameters:
814  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
815  self.data += "\n"
816 
def overrideParameters
Definition: confdb.py:809
def confdb.overrideProcessName (   self)

Definition at line 723 of file confdb.py.

724  def overrideProcessName(self):
725  if self.config.name is None:
726  return
727 
728  # sanitise process name
729  self.config.name = self.config.name.replace("_","")
730  # override the process name
731  quote = '[\'\"]'
732  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)
733 
734  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
735  self.data += """
736 # adapt HLT modules to the correct process name
737 if 'hltTrigReport' in %%(dict)s:
738  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
739 
740 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
741  %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
742 
743 if 'hltPreExpressOutputSmart' in %%(dict)s:
744  %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
745 
746 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
747  %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
748 
749 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
750  %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
751 
752 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
753  %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
754 
755 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
756  %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
757 
758 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
759  %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
760 
761 if 'hltDQMHLTScalers' in %%(dict)s:
762  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
763  %%(process)shltDQMHLTScalers.processname = '%(name)s'
764 
765 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
766  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
767 """ % self.config.__dict__
768 
def overrideProcessName
Definition: confdb.py:723
def confdb.runL1Emulator (   self)

Definition at line 613 of file confdb.py.

References spr.find().

614  def runL1Emulator(self):
615  # if requested, run (part of) the L1 emulator
616  if self.config.emulator:
617  # FIXME this fragment used "process" explicitly
618  emulator = {
619  'RawToDigi': '',
620  'CustomL1T': '',
621  'CustomHLT': ''
622  }
623 
624  if self.config.data:
625  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
626  else:
627  emulator['RawToDigi'] = 'RawToDigi_cff'
628 
629  if self.config.emulator == 'gt':
630  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
631  emulator['CustomHLT'] = 'switchToSimGtDigis'
632  elif self.config.emulator == 'gct,gt':
633  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
634  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
635  elif self.config.emulator == 'gmt,gt':
636  # XXX currently unsupported
637  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
638  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
639  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
640  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
641  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
642  elif self.config.emulator in ('stage1,gt'):
643  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
644  emulator['CustomHLT'] = 'switchToSimStage1Digis'
645  else:
646  # unsupported argument, default to running the whole emulator
647  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
648  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
649 
650  self.data += """
651 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
652 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
653 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
654 import L1Trigger.Configuration.L1Trigger_custom
655 #
656 """ % emulator
657 
658  if (self.config.emulator).find("stage1")>-1:
659  self.data += """
660 # 2015 Run2 emulator
661 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
662 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
663 """ % emulator
664  else:
665  self.data += """
666 # Run1 Emulator
667 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
668 """ % emulator
669 
670  self.data += """
671 #
672 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
673 # customize the HLT to use the emulated results
674 import HLTrigger.Configuration.customizeHLTforL1Emulator
675 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
676 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
677 """ % emulator
def runL1Emulator
Definition: confdb.py:613
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 582 of file confdb.py.

583  def runL1EmulatorGT(self):
584  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
585  if not self.config.emulator:
586  return
587 
588  if self.config.emulator != 'gt':
589  # only the GT emulator is currently supported
590  return
591 
592  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
593  text = """
594 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
595 """
596  if self.config.fragment:
597  # FIXME in a cff, should also update the HLTSchedule
598  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
599  else:
600  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
601 
602  if not 'hltBoolFalse' in self.data:
603  # add hltBoolFalse
604  text += """
605 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
606  result = cms.bool( False )
607 )
608 """
609  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
610 
611  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
612 
def runL1EmulatorGT
Definition: confdb.py:582
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 678 of file confdb.py.

679  def switchToNewL1Skim(self):
680  # add snippet to switch to new L1 skim files
681  if self.config.l1skim:
682  self.data += """
683 # Customize the menu to use information from new L1 emulator in the L1 skim files
684 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
685 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
686 for module in process.__dict__.itervalues():
687  if isinstance(module, cms._Module):
688  for parameter in module.__dict__.itervalues():
689  if isinstance(parameter, cms.InputTag):
690  if parameter.moduleLabel == 'hltGtDigis':
691  parameter.moduleLabel = "gtDigisFromSkim"
692  elif parameter.moduleLabel == 'hltL1GtObjectMap':
693  parameter.moduleLabel = "gtDigisFromSkim"
694  elif parameter.moduleLabel == 'hltGctDigis':
695  parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
696 """
def switchToNewL1Skim
Definition: confdb.py:678
def confdb.updateMessageLogger (   self)

Definition at line 769 of file confdb.py.

770  def updateMessageLogger(self):
771  # request summary informations from the MessageLogger
772  self.data += """
773 if 'MessageLogger' in %(dict)s:
774  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
775  %(process)sMessageLogger.categories.append('L1GtTrigReport')
776  %(process)sMessageLogger.categories.append('HLTrigReport')
777  %(process)sMessageLogger.categories.append('FastReport')
778 """
779 
def updateMessageLogger
Definition: confdb.py:769

Variable Documentation

confdb.all_paths

Definition at line 948 of file confdb.py.

confdb.data

Definition at line 415 of file confdb.py.

confdb.parent

Definition at line 1340 of file confdb.py.

confdb.source

Definition at line 1327 of file confdb.py.