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

356  def _fix_parameter(self, **args):
357  """arguments:
358  name: parameter name (optional)
359  type: parameter type (look for tracked and untracked variants)
360  value: original value
361  replace: replacement value
362  """
363  if 'name' in args:
364  self.data = re.sub(
365  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
366  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
367  self.data)
368  else:
369  self.data = re.sub(
370  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
371  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
372  self.data)
373 
def _fix_parameter
Definition: confdb.py:355
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 337 of file confdb.py.

338  def addGlobalOptions(self):
339  # add global options
340  self.data += """
341 # limit the number of events to be processed
342 %%(process)smaxEvents = cms.untracked.PSet(
343  input = cms.untracked.int32( %d )
344 )
345 """ % self.config.events
346 
347  if not self.config.profiling:
348  self.data += """
349 # enable the TrigReport and TimeReport
350 %(process)soptions = cms.untracked.PSet(
351  wantSummary = cms.untracked.bool( True )
352 )
353 """
354 
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:337
def confdb.append_filenames (   self,
  name,
  filenames 
)

Definition at line 1250 of file confdb.py.

1251  def append_filenames(self, name, filenames):
1252  if len(filenames) > 255:
1253  token_open = "( *("
1254  token_close = ") )"
1255  else:
1256  token_open = "("
1257  token_close = ")"
1258 
1259  self.data += " %s = cms.untracked.vstring%s\n" % (name, token_open)
1260  for line in filenames:
1261  self.data += " '%s',\n" % line
1262  self.data += " %s,\n" % (token_close)
1263 
def append_filenames
Definition: confdb.py:1250
def confdb.build_source (   self)

Definition at line 1276 of file confdb.py.

1277  def build_source(self):
1278  if self.config.input:
1279  # if a dataset or a list of input files was given, use it
1280  self.source = self.expand_filenames(self.config.input)
1281  elif self.config.online:
1282  # online we always run on data
1283  self.source = [ "file:/tmp/InputCollection.root" ]
1284  elif self.config.data:
1285  # offline we can run on data...
1286  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1287  else:
1288  # ...or on mc
1289  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1290 
1291  if self.config.parent:
1292  # if a dataset or a list of input files was given for the parent data, use it
1293  self.parent = self.expand_filenames(self.config.parent)
1294 
1295  self.data += """
1296 %(process)ssource = cms.Source( "PoolSource",
1297 """
1298  self.append_filenames("fileNames", self.source)
1299  if (self.parent):
1300  self.append_filenames("secondaryFileNames", self.parent)
1301  self.data += """\
1302  inputCommands = cms.untracked.vstring(
1303  'keep *'
1304  )
1305 )
1306 """
def build_source
Definition: confdb.py:1276
def confdb.buildOptions (   self)

Definition at line 961 of file confdb.py.

References python.multivaluedict.append().

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

Definition at line 904 of file confdb.py.

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

Definition at line 898 of file confdb.py.

899  def dumppaths(paths):
900  sys.stderr.write('Path selection:\n')
901  for path in paths:
902  sys.stderr.write('\t%s\n' % path)
903  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:898
def confdb.expand_filenames (   self,
  input 
)

Definition at line 1264 of file confdb.py.

1265  def expand_filenames(self, input):
1266  # check if the input is a dataset or a list of files
1267  if input[0:8] == 'dataset:':
1268  from dasFileQuery import dasFileQuery
1269  # extract the dataset name, and use DAS to fine the list of LFNs
1270  dataset = input[8:]
1271  files = dasFileQuery(dataset)
1272  else:
1273  # assume a comma-separated list of input files
1274  files = self.config.input.split(',')
1275  return files
def expand_filenames
Definition: confdb.py:1264
def confdb.fixForFastSim (   self)

Definition at line 385 of file confdb.py.

386  def fixForFastSim(self):
387  if self.config.fastsim:
388  # adapt the hle configuration (fragment) to run under fastsim
389  self.data = re.sub( r'import FWCore.ParameterSet.Config as cms', r'\g<0>\nfrom FastSimulation.HighLevelTrigger.HLTSetup_cff import *', self.data)
390 
391  # remove the definition of streams and datasets
392  self.data = re.compile( r'^streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
393  self.data = re.compile( r'^datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
394 
395  # fix the definition of module
396  # FIXME: this should be updated to take into accout the --l1-emulator option
397  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
398  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'simGmtDigis')
399  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'simGtDigis')
400  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'simGtDigis')
401  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
402  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
403  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
404  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
405  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
406  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
407  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
408  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
409  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
410  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
411 
412  # MeasurementTrackerEvent
413  self._fix_parameter( type = 'InputTag', value = 'hltSiStripClusters', replace = 'MeasurementTrackerEvent')
414 
415  # fix the definition of sequences and paths
416  self.data = re.sub( r'hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
417  self.data = re.sub( r'hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
418  self.data = re.sub( r'hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
419  self.data = re.sub( r'HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
420  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
421 
def fixForFastSim
Definition: confdb.py:385
def confdb.fixForMC (   self)

Definition at line 374 of file confdb.py.

375  def fixForMC(self):
376  if not self.config.data:
377  # customise the HLT menu for running on MC
378  if not self.config.fragment:
379  self.data += """
380 # customise the HLT menu for running on MC
381 from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
382 process = customizeHLTforMC(process)
383 """
384 
def fixForMC
Definition: confdb.py:374
def confdb.fixPrescales (   self)

Definition at line 422 of file confdb.py.

423  def fixPrescales(self):
424  # update the PrescaleService to match the new list of paths
425  if self.options['paths']:
426  if self.options['paths'][0][0] == '-':
427  # drop requested paths
428  for minuspath in self.options['paths']:
429  path = minuspath[1:]
430  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
431  else:
432  # keep requested paths
433  for path in self.all_paths:
434  if path not in self.options['paths']:
435  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
436 
437  if self.config.prescale and (self.config.prescale.lower() != 'none'):
438  # TO DO: check that the requested prescale column is valid
439  self.data += """
440 # force the use of a specific HLT prescale column
441 if 'PrescaleService' in %(dict)s:
442  %(process)sPrescaleService.forceDefault = True
443  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
444 """
445 
def fixPrescales
Definition: confdb.py:422
def confdb.instrumentDQM (   self)

Definition at line 865 of file confdb.py.

866  def instrumentDQM(self):
867  if not self.config.hilton:
868  # remove any reference to the hltDQMFileSaver
869  if 'hltDQMFileSaver' in self.data:
870  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
871  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
872  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
873 
874  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
875  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
876  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
877  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
878  dqmstore += """
879 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
880  fileName = cms.untracked.string("DQMIO.root")
881 )
882 """
883 
884  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
885  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
886  if empty_path.search(self.data):
887  # replace an empty DQMOutput path
888  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
889  elif other_path.search(self.data):
890  # prepend the dqmOutput to the DQMOutput path
891  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
892  else:
893  # ceate a new DQMOutput path with the dqmOutput module
894  self.data += dqmstore
895  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
896 
def instrumentDQM
Definition: confdb.py:865
def confdb.instrumentErrorEventType (   self)

Definition at line 460 of file confdb.py.

461  def instrumentErrorEventType(self):
462  if self.config.errortype:
463  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
464  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
465  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
466  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
467 
def instrumentErrorEventType
Definition: confdb.py:460
def confdb.instrumentOpenMode (   self)

Definition at line 446 of file confdb.py.

References join().

447  def instrumentOpenMode(self):
448  if self.config.open:
449  # find all EDfilters
450  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
451  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
452  # remove existing 'cms.ignore' and '~' modifiers
453  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
454  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
455  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
456  for some in splitter(filters, 1000):
457  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
458  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
459 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:446
def confdb.instrumentTiming (   self)

Definition at line 774 of file confdb.py.

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

Definition at line 737 of file confdb.py.

738  def loadAdditionalConditions(self, comment, *conditions):
739  # load additional conditions
740  self.data += """
741 # %s
742 if 'GlobalTag' in %%(dict)s:
743 """ % comment
744  for condition in conditions:
745  self.data += """ %%(process)sGlobalTag.toGet.append(
746  cms.PSet(
747  record = cms.string( '%(record)s' ),
748  tag = cms.string( '%(tag)s' ),
749  label = cms.untracked.string( '%(label)s' ),
750  connect = cms.untracked.string( '%(connect)s' )
751  )
752  )
753 """ % condition
754 
def loadAdditionalConditions
Definition: confdb.py:737
def confdb.loadCff (   self,
  module 
)

Definition at line 762 of file confdb.py.

763  def loadCff(self, module):
764  self.data += self.loadCffCommand(module)
765 
def loadCff
Definition: confdb.py:762
def confdb.loadCffCommand (   self,
  module 
)

Definition at line 755 of file confdb.py.

756  def loadCffCommand(self, module):
757  # load a cfi or cff module
758  if self.config.fragment:
759  return 'from %s import *\n' % module
760  else:
761  return 'process.load( "%s" )\n' % module
def loadCffCommand
Definition: confdb.py:755
def confdb.overrideGlobalTag (   self)

Definition at line 468 of file confdb.py.

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

Definition at line 522 of file confdb.py.

523  def overrideL1MenuXml(self):
524  # if requested, override the L1 menu from the GlobalTag (Xml file)
525  if self.config.l1Xml.XmlFile:
526  text = """
527 # override the L1 menu from an Xml file
528 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
529  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
530  DefXmlFile = cms.string('%(XmlFile)s'),
531  VmeXmlFile = cms.string('')
532 )
533 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
534  recordName = cms.string('L1GtTriggerMenuRcd'),
535  iovIsRunNotTime = cms.bool(True),
536  firstValid = cms.vuint32(1)
537 )
538 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
539 """
540  self.data += text % self.config.l1Xml.__dict__
def overrideL1MenuXml
Definition: confdb.py:522
def confdb.overrideOutput (   self)

Definition at line 656 of file confdb.py.

657  def overrideOutput(self):
658  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
659  self.data = re.sub(
660  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
661  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 ),',
662  self.data
663  )
664 
665  if not self.config.fragment and self.config.output == 'full':
666  # add a single "keep *" output
667  self.data += """
668 # add a single "keep *" output
669 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
670  fileName = cms.untracked.string( "outputFULL.root" ),
671  fastCloning = cms.untracked.bool( False ),
672  dataset = cms.untracked.PSet(
673  dataTier = cms.untracked.string( 'RECO' ),
674  filterName = cms.untracked.string( '' )
675  ),
676  outputCommands = cms.untracked.vstring( 'keep *' )
677 )
678 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
679 """
680 
def overrideOutput
Definition: confdb.py:656
def confdb.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 766 of file confdb.py.

767  def overrideParameters(self, module, parameters):
768  # override a module's parameter if the module is present in the configuration
769  self.data += "if '%s' in %%(dict)s:\n" % module
770  for (parameter, value) in parameters:
771  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
772  self.data += "\n"
773 
def overrideParameters
Definition: confdb.py:766
def confdb.overrideProcessName (   self)

Definition at line 682 of file confdb.py.

683  def overrideProcessName(self):
684  if self.config.name is None:
685  return
686 
687  # override the process name
688  quote = '[\'\"]'
689  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)
690 
691  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
692  self.data += """
693 # adapt HLT modules to the correct process name
694 if 'hltTrigReport' in %%(dict)s:
695  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
696 
697 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
698  %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
699 
700 if 'hltPreExpressOutputSmart' in %%(dict)s:
701  %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
702 
703 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
704  %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
705 
706 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
707  %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
708 
709 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
710  %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
711 
712 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
713  %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
714 
715 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
716  %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
717 
718 if 'hltDQMHLTScalers' in %%(dict)s:
719  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
720  %%(process)shltDQMHLTScalers.processname = '%(name)s'
721 
722 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
723  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
724 """ % self.config.__dict__
725 
def overrideProcessName
Definition: confdb.py:682
def confdb.runL1Emulator (   self)

Definition at line 572 of file confdb.py.

References spr.find().

573  def runL1Emulator(self):
574  # if requested, run (part of) the L1 emulator
575  if self.config.emulator:
576  # FIXME this fragment used "process" explicitly
577  emulator = {
578  'RawToDigi': '',
579  'CustomL1T': '',
580  'CustomHLT': ''
581  }
582 
583  if self.config.data:
584  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
585  else:
586  emulator['RawToDigi'] = 'RawToDigi_cff'
587 
588  if self.config.emulator == 'gt':
589  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
590  emulator['CustomHLT'] = 'switchToSimGtDigis'
591  elif self.config.emulator == 'gct,gt':
592  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
593  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
594  elif self.config.emulator == 'gmt,gt':
595  # XXX currently unsupported
596  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
597  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
598  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
599  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
600  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
601  elif self.config.emulator in ('stage1,gt'):
602  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
603  emulator['CustomHLT'] = 'switchToSimStage1Digis'
604  else:
605  # unsupported argument, default to running the whole emulator
606  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
607  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
608 
609  self.data += """
610 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
611 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
612 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
613 import L1Trigger.Configuration.L1Trigger_custom
614 #
615 """ % emulator
616 
617  if (self.config.emulator).find("stage1")>-1:
618  self.data += """
619 # 2015 Run2 emulator
620 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
621 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
622 """ % emulator
623  else:
624  self.data += """
625 # Run1 Emulator
626 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
627 """ % emulator
628 
629  self.data += """
630 #
631 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
632 # customize the HLT to use the emulated results
633 import HLTrigger.Configuration.customizeHLTforL1Emulator
634 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
635 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
636 """ % emulator
def runL1Emulator
Definition: confdb.py:572
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 541 of file confdb.py.

542  def runL1EmulatorGT(self):
543  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
544  if not self.config.emulator:
545  return
546 
547  if self.config.emulator != 'gt':
548  # only the GT emulator is currently supported
549  return
550 
551  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
552  text = """
553 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
554 """
555  if self.config.fragment:
556  # FIXME in a cff, should also update the HLTSchedule
557  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
558  else:
559  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
560 
561  if not 'hltBoolFalse' in self.data:
562  # add hltBoolFalse
563  text += """
564 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
565  result = cms.bool( False )
566 )
567 """
568  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
569 
570  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
571 
def runL1EmulatorGT
Definition: confdb.py:541
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 637 of file confdb.py.

638  def switchToNewL1Skim(self):
639  # add snippet to switch to new L1 skim files
640  if self.config.l1skim:
641  self.data += """
642 # Customize the menu to use information from new L1 emulator in the L1 skim files
643 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
644 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
645 for module in process.__dict__.itervalues():
646  if isinstance(module, cms._Module):
647  for parameter in module.__dict__.itervalues():
648  if isinstance(parameter, cms.InputTag):
649  if parameter.moduleLabel == 'hltGtDigis':
650  parameter.moduleLabel = "gtDigisFromSkim"
651  elif parameter.moduleLabel == 'hltL1GtObjectMap':
652  parameter.moduleLabel = "gtDigisFromSkim"
653  elif parameter.moduleLabel == 'hltGctDigis':
654  parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
655 """
def switchToNewL1Skim
Definition: confdb.py:637
def confdb.updateMessageLogger (   self)

Definition at line 726 of file confdb.py.

727  def updateMessageLogger(self):
728  # request summary informations from the MessageLogger
729  self.data += """
730 if 'MessageLogger' in %(dict)s:
731  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
732  %(process)sMessageLogger.categories.append('L1GtTrigReport')
733  %(process)sMessageLogger.categories.append('HLTrigReport')
734  %(process)sMessageLogger.categories.append('FastReport')
735 """
736 
def updateMessageLogger
Definition: confdb.py:726

Variable Documentation

confdb.all_paths

Definition at line 905 of file confdb.py.

confdb.data

Definition at line 363 of file confdb.py.

confdb.parent

Definition at line 1292 of file confdb.py.

confdb.source

Definition at line 1279 of file confdb.py.