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

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

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

Definition at line 1242 of file confdb.py.

1243  def build_source(self):
1244  if self.config.input:
1245  # if a dataset or a list of input files was given, use it
1246  if self.config.input[0:8] == 'dataset:':
1247  from dasFileQuery import dasFileQuery
1248  # extract the dataset name, and use DAS to fine the list of LFNs
1249  dataset = self.config.input[8:]
1250  files = dasFileQuery(dataset)
1251  self.source = files
1252  else:
1253  # assume a list of input files
1254  self.source = self.config.input.split(',')
1255  elif self.config.online:
1256  # online we always run on data
1257  self.source = [ "file:/tmp/InputCollection.root" ]
1258  elif self.config.data:
1259  # offline we can run on data...
1260  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1261  else:
1262  # ...or on mc
1263  self.source = [ "file:RelVal_Raw_%s_MC.root" % self.config.type ]
1264 
1265  self.data += """
1266 %(process)ssource = cms.Source( "PoolSource",
1267  fileNames = cms.untracked.vstring(
1268 """
1269  if self.source:
1270  for line in self.source:
1271  self.data += " '%s',\n" % line
1272  self.data += """ ),
1273  secondaryFileNames = cms.untracked.vstring(
1274 """
1275  if self.parent:
1276  for line in self.parent:
1277  self.data += " '%s',\n" % line
1278  self.data += """ ),
1279  inputCommands = cms.untracked.vstring(
1280  'keep *'
1281  )
1282 )
1283 """
def build_source
Definition: confdb.py:1242
def confdb.buildOptions (   self)

Definition at line 953 of file confdb.py.

References python.multivaluedict.append().

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

Definition at line 896 of file confdb.py.

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

Definition at line 890 of file confdb.py.

891  def dumppaths(paths):
892  sys.stderr.write('Path selection:\n')
893  for path in paths:
894  sys.stderr.write('\t%s\n' % path)
895  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:890
def confdb.fixForFastSim (   self)

Definition at line 377 of file confdb.py.

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

Definition at line 366 of file confdb.py.

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

Definition at line 414 of file confdb.py.

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

Definition at line 857 of file confdb.py.

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

Definition at line 452 of file confdb.py.

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

Definition at line 438 of file confdb.py.

References join().

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

Definition at line 766 of file confdb.py.

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

Definition at line 729 of file confdb.py.

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

Definition at line 754 of file confdb.py.

755  def loadCff(self, module):
756  self.data += self.loadCffCommand(module)
757 
def loadCff
Definition: confdb.py:754
def confdb.loadCffCommand (   self,
  module 
)

Definition at line 747 of file confdb.py.

748  def loadCffCommand(self, module):
749  # load a cfi or cff module
750  if self.config.fragment:
751  return 'from %s import *\n' % module
752  else:
753  return 'process.load( "%s" )\n' % module
def loadCffCommand
Definition: confdb.py:747
def confdb.overrideGlobalTag (   self)

Definition at line 460 of file confdb.py.

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

Definition at line 514 of file confdb.py.

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

Definition at line 648 of file confdb.py.

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

Definition at line 758 of file confdb.py.

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

Definition at line 674 of file confdb.py.

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

Definition at line 564 of file confdb.py.

References spr.find().

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

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

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

Definition at line 718 of file confdb.py.

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

Variable Documentation

confdb.all_paths

Definition at line 897 of file confdb.py.

confdb.data

Definition at line 355 of file confdb.py.

confdb.source

Definition at line 1250 of file confdb.py.