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 build_source
 
def buildOptions
 
def buildPathList
 
def dumppaths
 
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
 
 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 342 of file confdb.py.

343  def _fix_parameter(self, **args):
344  """arguments:
345  name: parameter name (optional)
346  type: parameter type (look for tracked and untracked variants)
347  value: original value
348  replace: replacement value
349  """
350  if 'name' in args:
351  self.data = re.sub(
352  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
353  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
354  self.data)
355  else:
356  self.data = re.sub(
357  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
358  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
359  self.data)
360 
def _fix_parameter
Definition: confdb.py:342
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 324 of file confdb.py.

325  def addGlobalOptions(self):
326  # add global options
327  self.data += """
328 # limit the number of events to be processed
329 %%(process)smaxEvents = cms.untracked.PSet(
330  input = cms.untracked.int32( %d )
331 )
332 """ % self.config.events
333 
334  if not self.config.profiling:
335  self.data += """
336 # enable the TrigReport and TimeReport
337 %(process)soptions = cms.untracked.PSet(
338  wantSummary = cms.untracked.bool( True )
339 )
340 """
341 
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:324
def confdb.build_source (   self)

Definition at line 1226 of file confdb.py.

1227  def build_source(self):
1228  if self.config.input:
1229  # if a dataset or a list of input files was given, use it
1230  if self.config.input[0:8] == 'dataset:':
1231  from dasFileQuery import dasFileQuery
1232  # extract the dataset name, and use DAS to fine the list of LFNs
1233  dataset = self.config.input[8:]
1234  files = dasFileQuery(dataset)
1235  self.source = files
1236  else:
1237  # assume a list of input files
1238  self.source = self.config.input.split(',')
1239  elif self.config.online:
1240  # online we always run on data
1241  self.source = [ "file:/tmp/InputCollection.root" ]
1242  elif self.config.data:
1243  # offline we can run on data...
1244  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1245  else:
1246  # ...or on mc
1247  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1248 
1249  self.data += """
1250 %(process)ssource = cms.Source( "PoolSource",
1251  fileNames = cms.untracked.vstring(
1252 """
1253  if self.source:
1254  for line in self.source:
1255  self.data += " '%s',\n" % line
1256  self.data += """ ),
1257  secondaryFileNames = cms.untracked.vstring(
1258 """
1259  if self.parent:
1260  for line in self.parent:
1261  self.data += " '%s',\n" % line
1262  self.data += """ ),
1263  inputCommands = cms.untracked.vstring(
1264  'keep *'
1265  )
1266 )
1267 """
def build_source
Definition: confdb.py:1226
def confdb.buildOptions (   self)

Definition at line 947 of file confdb.py.

References python.multivaluedict.append().

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

Definition at line 890 of file confdb.py.

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

Definition at line 884 of file confdb.py.

885  def dumppaths(paths):
886  sys.stderr.write('Path selection:\n')
887  for path in paths:
888  sys.stderr.write('\t%s\n' % path)
889  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:884
def confdb.fixForFastSim (   self)

Definition at line 372 of file confdb.py.

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

Definition at line 361 of file confdb.py.

362  def fixForMC(self):
363  if not self.config.data:
364  # customise the HLT menu for running on MC
365  if not self.config.fragment:
366  self.data += """
367 # customise the HLT menu for running on MC
368 from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
369 process = customizeHLTforMC(process)
370 """
371 
def fixForMC
Definition: confdb.py:361
def confdb.fixPrescales (   self)

Definition at line 409 of file confdb.py.

410  def fixPrescales(self):
411  # update the PrescaleService to match the new list of paths
412  if self.options['paths']:
413  if self.options['paths'][0][0] == '-':
414  # drop requested paths
415  for minuspath in self.options['paths']:
416  path = minuspath[1:]
417  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
418  else:
419  # keep requested paths
420  for path in self.all_paths:
421  if path not in self.options['paths']:
422  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
423 
424  if self.config.prescale and (self.config.prescale.lower() != 'none'):
425  # TO DO: check that the requested prescale column is valid
426  self.data += """
427 # force the use of a specific HLT prescale column
428 if 'PrescaleService' in %(dict)s:
429  %(process)sPrescaleService.forceDefault = True
430  %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
431 """
432 
def fixPrescales
Definition: confdb.py:409
def confdb.instrumentDQM (   self)

Definition at line 852 of file confdb.py.

853  def instrumentDQM(self):
854  # remove any reference to the hltDQMFileSaver
855  if 'hltDQMFileSaver' in self.data:
856  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver \+ ', '', self.data)
857  self.data = re.sub(r' \+ \b(process\.)?hltDQMFileSaver', '', self.data)
858  self.data = re.sub(r'\b(process\.)?hltDQMFileSaver', '', self.data)
859 
860  # instrument the HLT menu with DQMStore and DQMRootOutputModule suitable for running offline
861  dqmstore = "\n# load the DQMStore and DQMRootOutputModule\n"
862  dqmstore += self.loadCffCommand('DQMServices.Core.DQMStore_cfi')
863  dqmstore += "%(process)sDQMStore.enableMultiThread = True\n"
864  dqmstore += """
865 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
866  fileName = cms.untracked.string("DQMIO.root")
867 )
868 """
869 
870  empty_path = re.compile(r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
871  other_path = re.compile(r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
872  if empty_path.search(self.data):
873  # replace an empty DQMOutput path
874  self.data = empty_path.sub(dqmstore + '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
875  elif other_path.search(self.data):
876  # prepend the dqmOutput to the DQMOutput path
877  self.data = other_path.sub(dqmstore + r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
878  else:
879  # ceate a new DQMOutput path with the dqmOutput module
880  self.data += dqmstore
881  self.data += '\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
882 
def instrumentDQM
Definition: confdb.py:852
def confdb.instrumentErrorEventType (   self)

Definition at line 447 of file confdb.py.

448  def instrumentErrorEventType(self):
449  if self.config.errortype:
450  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
451  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
452  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
453  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
454 
def instrumentErrorEventType
Definition: confdb.py:447
def confdb.instrumentOpenMode (   self)

Definition at line 433 of file confdb.py.

References join().

434  def instrumentOpenMode(self):
435  if self.config.open:
436  # find all EDfilters
437  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
438  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
439  # remove existing 'cms.ignore' and '~' modifiers
440  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
441  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
442  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
443  for some in splitter(filters, 1000):
444  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
445  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
446 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:433
def confdb.instrumentTiming (   self)

Definition at line 761 of file confdb.py.

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

Definition at line 724 of file confdb.py.

725  def loadAdditionalConditions(self, comment, *conditions):
726  # load additional conditions
727  self.data += """
728 # %s
729 if 'GlobalTag' in %%(dict)s:
730 """ % comment
731  for condition in conditions:
732  self.data += """ %%(process)sGlobalTag.toGet.append(
733  cms.PSet(
734  record = cms.string( '%(record)s' ),
735  tag = cms.string( '%(tag)s' ),
736  label = cms.untracked.string( '%(label)s' ),
737  connect = cms.untracked.string( '%(connect)s' )
738  )
739  )
740 """ % condition
741 
def loadAdditionalConditions
Definition: confdb.py:724
def confdb.loadCff (   self,
  module 
)

Definition at line 749 of file confdb.py.

750  def loadCff(self, module):
751  self.data += self.loadCffCommand(module)
752 
def loadCff
Definition: confdb.py:749
def confdb.loadCffCommand (   self,
  module 
)

Definition at line 742 of file confdb.py.

743  def loadCffCommand(self, module):
744  # load a cfi or cff module
745  if self.config.fragment:
746  return 'from %s import *\n' % module
747  else:
748  return 'process.load( "%s" )\n' % module
def loadCffCommand
Definition: confdb.py:742
def confdb.overrideGlobalTag (   self)

Definition at line 455 of file confdb.py.

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

Definition at line 509 of file confdb.py.

510  def overrideL1MenuXml(self):
511  # if requested, override the L1 menu from the GlobalTag (Xml file)
512  if self.config.l1Xml.XmlFile:
513  text = """
514 # override the L1 menu from an Xml file
515 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
516  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
517  DefXmlFile = cms.string('%(XmlFile)s'),
518  VmeXmlFile = cms.string('')
519 )
520 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
521  recordName = cms.string('L1GtTriggerMenuRcd'),
522  iovIsRunNotTime = cms.bool(True),
523  firstValid = cms.vuint32(1)
524 )
525 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
526 """
527  self.data += text % self.config.l1Xml.__dict__
def overrideL1MenuXml
Definition: confdb.py:509
def confdb.overrideOutput (   self)

Definition at line 643 of file confdb.py.

644  def overrideOutput(self):
645  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
646  self.data = re.sub(
647  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
648  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 ),',
649  self.data
650  )
651 
652  if not self.config.fragment and self.config.output == 'full':
653  # add a single "keep *" output
654  self.data += """
655 # add a single "keep *" output
656 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
657  fileName = cms.untracked.string( "outputFULL.root" ),
658  fastCloning = cms.untracked.bool( False ),
659  dataset = cms.untracked.PSet(
660  dataTier = cms.untracked.string( 'RECO' ),
661  filterName = cms.untracked.string( '' )
662  ),
663  outputCommands = cms.untracked.vstring( 'keep *' )
664 )
665 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
666 """
667 
def overrideOutput
Definition: confdb.py:643
def confdb.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 753 of file confdb.py.

754  def overrideParameters(self, module, parameters):
755  # override a module's parameter if the module is present in the configuration
756  self.data += "if '%s' in %%(dict)s:\n" % module
757  for (parameter, value) in parameters:
758  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
759  self.data += "\n"
760 
def overrideParameters
Definition: confdb.py:753
def confdb.overrideProcessName (   self)

Definition at line 669 of file confdb.py.

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

Definition at line 559 of file confdb.py.

References spr.find().

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

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

625  def switchToNewL1Skim(self):
626  # add snippet to switch to new L1 skim files
627  if self.config.l1skim:
628  self.data += """
629 # Customize the menu to use information from new L1 emulator in the L1 skim files
630 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
631 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
632 for module in process.__dict__.itervalues():
633  if isinstance(module, cms._Module):
634  for parameter in module.__dict__.itervalues():
635  if isinstance(parameter, cms.InputTag):
636  if parameter.moduleLabel == 'hltGtDigis':
637  parameter.moduleLabel = "gtDigisFromSkim"
638  elif parameter.moduleLabel == 'hltL1GtObjectMap':
639  parameter.moduleLabel = "gtDigisFromSkim"
640  elif parameter.moduleLabel == 'hltGctDigis':
641  parameter.moduleLabel ="caloStage1LegacyFormatDigis"
642 """
def switchToNewL1Skim
Definition: confdb.py:624
def confdb.updateMessageLogger (   self)

Definition at line 713 of file confdb.py.

714  def updateMessageLogger(self):
715  # request summary informations from the MessageLogger
716  self.data += """
717 if 'MessageLogger' in %(dict)s:
718  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
719  %(process)sMessageLogger.categories.append('L1GtTrigReport')
720  %(process)sMessageLogger.categories.append('HLTrigReport')
721  %(process)sMessageLogger.categories.append('FastReport')
722 """
723 
def updateMessageLogger
Definition: confdb.py:713

Variable Documentation

confdb.all_paths

Definition at line 891 of file confdb.py.

confdb.data

Definition at line 350 of file confdb.py.

confdb.source

Definition at line 1234 of file confdb.py.