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
 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 ) """ More...
 
def build_source
 
def buildOptions
 
def buildPathList
 
def dumppaths
 
def fixForFastSim
 
def fixForMC
 
def fixPrescales
 
def instrumentErrorEventType
 
def instrumentOpenMode
 
def instrumentTiming
 
def loadAdditionalConditions
 
def loadCff
 
def overrideGlobalTag
 
def overrideL1MenuXml
 
def overrideOutput
 
def overrideParameters
 
def overrideProcessName
 
def runL1Emulator
 
def runL1EmulatorGT
 
def splitter
 
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 327 of file confdb.py.

328  def _fix_parameter(self, **args):
329  """arguments:
330  name: parameter name (optional)
331  type: parameter type (look for tracked and untracked variants)
332  value: original value
333  replace: replacement value
334  """
335  if 'name' in args:
336  self.data = re.sub(
337  r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
338  r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
339  self.data)
340  else:
341  self.data = re.sub(
342  r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
343  r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
344  self.data)
345 
def _fix_parameter
Definition: confdb.py:327
def confdb.addGlobalOptions (   self)

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 ) """

dummyfy hltGetConditions in cff's if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s : %(process)shltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) ) %(process)sHLTriggerFirstPath.replace(%(process)shltGetConditions,%(process)shltDummyConditions) """

Definition at line 309 of file confdb.py.

310  def addGlobalOptions(self):
311  # add global options
312  self.data += """
313 # limit the number of events to be processed
314 %%(process)smaxEvents = cms.untracked.PSet(
315  input = cms.untracked.int32( %d )
316 )
317 """ % self.config.events
318 
319  if not self.config.profiling:
320  self.data += """
321 # enable the TrigReport and TimeReport
322 %(process)soptions = cms.untracked.PSet(
323  wantSummary = cms.untracked.bool( True )
324 )
325 """
326 
def addGlobalOptions
untracked parameters with NO default in the code if &#39;hltHcalDataIntegrityMonitor&#39; in %(dict)s: %(proc...
Definition: confdb.py:309
def confdb.build_source (   self)

Definition at line 1117 of file confdb.py.

1118  def build_source(self):
1119  if self.config.input:
1120  # if a dataset or a list of input files was given, use it
1121  if self.config.input[0:8] == 'dataset:':
1122  from dbsFileQuery import dbsFileQuery
1123  # extract the dataset name, and use DBS to fine the list of LFNs
1124  dataset = self.config.input[8:]
1125  query = 'find file where dataset=' + dataset
1126  files = dbsFileQuery(query)
1127  self.source = files
1128  else:
1129  # assume a list of input files
1130  self.source = self.config.input.split(',')
1131  elif self.config.online:
1132  # online we always run on data
1133  self.source = [ "file:/tmp/InputCollection.root" ]
1134  elif self.config.data:
1135  # offline we can run on data...
1136  self.source = [ "file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1137  else:
1138  # ...or on mc
1139  self.source = [ "file:RelVal_Raw_%s_STARTUP.root" % self.config.type ]
1140 
1141  self.data += """
1142 %(process)ssource = cms.Source( "PoolSource",
1143  fileNames = cms.untracked.vstring(
1144 """
1145  if self.source:
1146  for line in self.source:
1147  self.data += " '%s',\n" % line
1148  self.data += """ ),
1149  secondaryFileNames = cms.untracked.vstring(
1150 """
1151  if self.parent:
1152  for line in self.parent:
1153  self.data += " '%s',\n" % line
1154  self.data += """ ),
1155  inputCommands = cms.untracked.vstring(
1156  'keep *'
1157  )
1158 )
1159 """
def build_source
Definition: confdb.py:1117
def confdb.buildOptions (   self)

Definition at line 873 of file confdb.py.

References python.multivaluedict.append().

874  def buildOptions(self):
875  # common configuration for all scenarios
876  self.options['services'].append( "-FUShmDQMOutputService" )
877 
878  if self.config.fragment:
879  # extract a configuration file fragment
880  self.options['essources'].append( "-GlobalTag" )
881  self.options['essources'].append( "-HepPDTESSource" )
882  self.options['essources'].append( "-XMLIdealGeometryESSource" )
883  self.options['essources'].append( "-eegeom" )
884  self.options['essources'].append( "-es_hardcode" )
885  self.options['essources'].append( "-magfield" )
886 
887  self.options['esmodules'].append( "-AutoMagneticFieldESProducer" )
888  self.options['esmodules'].append( "-SlaveField0" )
889  self.options['esmodules'].append( "-SlaveField20" )
890  self.options['esmodules'].append( "-SlaveField30" )
891  self.options['esmodules'].append( "-SlaveField35" )
892  self.options['esmodules'].append( "-SlaveField38" )
893  self.options['esmodules'].append( "-SlaveField40" )
894  self.options['esmodules'].append( "-VBF0" )
895  self.options['esmodules'].append( "-VBF20" )
896  self.options['esmodules'].append( "-VBF30" )
897  self.options['esmodules'].append( "-VBF35" )
898  self.options['esmodules'].append( "-VBF38" )
899  self.options['esmodules'].append( "-VBF40" )
900  self.options['esmodules'].append( "-CSCGeometryESModule" )
901  self.options['esmodules'].append( "-CaloGeometryBuilder" )
902  self.options['esmodules'].append( "-CaloTowerHardcodeGeometryEP" )
903  self.options['esmodules'].append( "-CastorHardcodeGeometryEP" )
904  self.options['esmodules'].append( "-DTGeometryESModule" )
905  self.options['esmodules'].append( "-EcalBarrelGeometryEP" )
906  self.options['esmodules'].append( "-EcalElectronicsMappingBuilder" )
907  self.options['esmodules'].append( "-EcalEndcapGeometryEP" )
908  self.options['esmodules'].append( "-EcalLaserCorrectionService" )
909  self.options['esmodules'].append( "-EcalPreshowerGeometryEP" )
910  self.options['esmodules'].append( "-HcalHardcodeGeometryEP" )
911  self.options['esmodules'].append( "-HcalTopologyIdealEP" )
912  self.options['esmodules'].append( "-MuonNumberingInitialization" )
913  self.options['esmodules'].append( "-ParametrizedMagneticFieldProducer" )
914  self.options['esmodules'].append( "-RPCGeometryESModule" )
915  self.options['esmodules'].append( "-SiStripGainESProducer" )
916  self.options['esmodules'].append( "-SiStripRecHitMatcherESProducer" )
917  self.options['esmodules'].append( "-SiStripQualityESProducer" )
918  self.options['esmodules'].append( "-StripCPEfromTrackAngleESProducer" )
919  self.options['esmodules'].append( "-TrackerDigiGeometryESModule" )
920  self.options['esmodules'].append( "-TrackerGeometricDetESModule" )
921  self.options['esmodules'].append( "-VolumeBasedMagneticFieldESProducer" )
922  self.options['esmodules'].append( "-ZdcHardcodeGeometryEP" )
923  self.options['esmodules'].append( "-hcal_db_producer" )
924  self.options['esmodules'].append( "-L1GtTriggerMaskAlgoTrigTrivialProducer" )
925  self.options['esmodules'].append( "-L1GtTriggerMaskTechTrigTrivialProducer" )
926  self.options['esmodules'].append( "-hltESPEcalTrigTowerConstituentsMapBuilder" )
927  self.options['esmodules'].append( "-hltESPGlobalTrackingGeometryESProducer" )
928  self.options['esmodules'].append( "-hltESPMuonDetLayerGeometryESProducer" )
929  self.options['esmodules'].append( "-hltESPTrackerRecoGeometryESProducer" )
930  if not self.config.fastsim:
931  self.options['esmodules'].append( "-CaloTowerGeometryFromDBEP" )
932  self.options['esmodules'].append( "-CastorGeometryFromDBEP" )
933  self.options['esmodules'].append( "-EcalBarrelGeometryFromDBEP" )
934  self.options['esmodules'].append( "-EcalEndcapGeometryFromDBEP" )
935  self.options['esmodules'].append( "-EcalPreshowerGeometryFromDBEP" )
936  self.options['esmodules'].append( "-HcalGeometryFromDBEP" )
937  self.options['esmodules'].append( "-ZdcGeometryFromDBEP" )
938  self.options['esmodules'].append( "-XMLFromDBSource" )
939  self.options['esmodules'].append( "-sistripconn" )
940 
941  self.options['services'].append( "-PrescaleService" )
942  self.options['services'].append( "-MessageLogger" )
943  self.options['services'].append( "-DQM" )
944  self.options['services'].append( "-DQMStore" )
945  self.options['services'].append( "-MicroStateService" )
946  self.options['services'].append( "-ModuleWebRegistry" )
947  self.options['services'].append( "-TimeProfilerService" )
948  self.options['services'].append( "-FastTimerService" )
949 
950  self.options['psets'].append( "-maxEvents" )
951  self.options['psets'].append( "-options" )
952 
953  if self.config.fastsim:
954  # remove components not supported or needed by fastsim
955  self.options['esmodules'].append( "-navigationSchoolESProducer" )
956  self.options['esmodules'].append( "-TransientTrackBuilderESProducer" )
957  self.options['esmodules'].append( "-SteppingHelixPropagatorAny" )
958  self.options['esmodules'].append( "-OppositeMaterialPropagator" )
959  self.options['esmodules'].append( "-MaterialPropagator" )
960  self.options['esmodules'].append( "-CaloTowerConstituentsMapBuilder" )
961  self.options['esmodules'].append( "-CaloTopologyBuilder" )
962 
963  self.options['services'].append( "-UpdaterService" )
964 
965  self.options['modules'].append( "hltL3MuonIsolations" )
966  self.options['modules'].append( "hltPixelVertices" )
967  self.options['modules'].append( "-hltCkfL1SeededTrackCandidates" )
968  self.options['modules'].append( "-hltCtfL1SeededithMaterialTracks" )
969  self.options['modules'].append( "-hltCkf3HitL1SeededTrackCandidates" )
970  self.options['modules'].append( "-hltCtf3HitL1SeededWithMaterialTracks" )
971  self.options['modules'].append( "-hltCkf3HitActivityTrackCandidates" )
972  self.options['modules'].append( "-hltCtf3HitActivityWithMaterialTracks" )
973  self.options['modules'].append( "-hltActivityCkfTrackCandidatesForGSF" )
974  self.options['modules'].append( "-hltL1SeededCkfTrackCandidatesForGSF" )
975  self.options['modules'].append( "-hltMuCkfTrackCandidates" )
976  self.options['modules'].append( "-hltMuCtfTracks" )
977  self.options['modules'].append( "-hltTau3MuCkfTrackCandidates" )
978  self.options['modules'].append( "-hltTau3MuCtfWithMaterialTracks" )
979  self.options['modules'].append( "-hltMuTrackJpsiCkfTrackCandidates" )
980  self.options['modules'].append( "-hltMuTrackJpsiCtfTracks" )
981  self.options['modules'].append( "-hltMuTrackJpsiEffCkfTrackCandidates" )
982  self.options['modules'].append( "-hltMuTrackJpsiEffCtfTracks" )
983  self.options['modules'].append( "-hltJpsiTkPixelSeedFromL3Candidate" )
984  self.options['modules'].append( "-hltCkfTrackCandidatesJpsiTk" )
985  self.options['modules'].append( "-hltCtfWithMaterialTracksJpsiTk" )
986  self.options['modules'].append( "-hltMuTrackCkfTrackCandidatesOnia" )
987  self.options['modules'].append( "-hltMuTrackCtfTracksOnia" )
988 
989  self.options['modules'].append( "-hltESRegionalEgammaRecHit" )
990  self.options['modules'].append( "-hltEcalRegionalJetsFEDs" )
991  self.options['modules'].append( "-hltEcalRegionalMuonsFEDs" )
992  self.options['modules'].append( "-hltEcalRegionalEgammaFEDs" )
993  self.options['modules'].append( "-hltFEDSelector" )
994  self.options['modules'].append( "-hltL3TrajSeedOIHit" )
995  self.options['modules'].append( "-hltL3TrajSeedIOHit" )
996  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIState" )
997  self.options['modules'].append( "-hltL3TrackCandidateFromL2OIHit" )
998  self.options['modules'].append( "-hltL3TrackCandidateFromL2IOHit" )
999  self.options['modules'].append( "-hltL3TrackCandidateFromL2NoVtx" )
1000  self.options['modules'].append( "-hltHcalDigis" )
1001  self.options['modules'].append( "-hltHoreco" )
1002  self.options['modules'].append( "-hltHfreco" )
1003  self.options['modules'].append( "-hltHbhereco" )
1004  self.options['modules'].append( "-hltEcalRegionalRestFEDs" )
1005  self.options['modules'].append( "-hltEcalRegionalESRestFEDs" )
1006  self.options['modules'].append( "-hltEcalRawToRecHitFacility" )
1007  self.options['modules'].append( "-hltESRawToRecHitFacility" )
1008  self.options['modules'].append( "-hltEcalRegionalJetsRecHit" )
1009  self.options['modules'].append( "-hltEcalRegionalMuonsRecHit" )
1010  self.options['modules'].append( "-hltEcalRegionalEgammaRecHit" )
1011  self.options['modules'].append( "-hltEcalRecHitAll" )
1012  self.options['modules'].append( "-hltESRecHitAll" )
1013  # === hltPF
1014  self.options['modules'].append( "-hltPFJetCkfTrackCandidates" )
1015  self.options['modules'].append( "-hltPFJetCtfWithMaterialTracks" )
1016  self.options['modules'].append( "-hltPFlowTrackSelectionHighPurity" )
1017  # === hltFastJet
1018  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator" )
1019  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates" )
1020  self.options['modules'].append( "-hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks" )
1021  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator" )
1022  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates" )
1023  self.options['modules'].append( "-hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks" )
1024  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet" )
1025  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet" )
1026  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet" )
1027  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbbVBF" )
1028  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbbVBF" )
1029  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF" )
1030  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1031  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1032  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1033  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet" )
1034  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet" )
1035  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet" )
1036  # === hltBLifetimeRegional
1037  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorHbb" )
1038  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesHbb" )
1039  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksHbb" )
1040  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhi" )
1041  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhi" )
1042  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhi" )
1043  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1044  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1045  self.options['modules'].append( "-hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1046  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb" )
1047  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb" )
1048  self.options['modules'].append( "-hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb" )
1049  self.options['modules'].append( "-hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF" )
1050  self.options['modules'].append( "-hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF" )
1051  self.options['modules'].append( "-hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF" )
1052  self.options['modules'].append( "-hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV" )
1053  self.options['modules'].append( "-hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV" )
1054  self.options['modules'].append( "-hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV" )
1055  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb" )
1056  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb" )
1057  self.options['modules'].append( "-hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb" )
1058 
1059  self.options['modules'].append( "-hltPixelTracksForMinBias" )
1060  self.options['modules'].append( "-hltPixelTracksForHighMult" )
1061  self.options['modules'].append( "-hltRegionalPixelTracks" )
1062  self.options['modules'].append( "-hltPixelTracksReg" )
1063  self.options['modules'].append( "-hltIter4Merged" )
1064  self.options['modules'].append( "-hltFastPixelHitsVertex" )
1065  self.options['modules'].append( "-hltFastPixelTracks")
1066  self.options['modules'].append( "-hltFastPixelTracksRecover")
1067 
1068  self.options['modules'].append( "-hltFastPrimaryVertexbbPhi")
1069  self.options['modules'].append( "-hltPixelTracksFastPVbbPhi")
1070  self.options['modules'].append( "-hltPixelTracksRecoverbbPhi" )
1071  self.options['modules'].append( "-hltFastPixelHitsVertexVHbb" )
1072  self.options['modules'].append( "-hltFastPixelTracksVHbb" )
1073  self.options['modules'].append( "-hltFastPixelTracksRecoverVHbb" )
1074 
1075  self.options['modules'].append( "-hltFastPrimaryVertex")
1076  self.options['modules'].append( "-hltFastPVPixelTracks")
1077  self.options['modules'].append( "-hltFastPVPixelTracksRecover" )
1078 
1079  self.options['modules'].append( "-hltIter4Tau3MuMerged" )
1080  self.options['modules'].append( "hltPixelMatchElectronsActivity" )
1081 
1082  self.options['modules'].append( "-hltMuonCSCDigis" )
1083  self.options['modules'].append( "-hltMuonDTDigis" )
1084  self.options['modules'].append( "-hltMuonRPCDigis" )
1085  self.options['modules'].append( "-hltGtDigis" )
1086  self.options['modules'].append( "-hltL1GtTrigReport" )
1087  self.options['modules'].append( "hltCsc2DRecHits" )
1088  self.options['modules'].append( "hltDt1DRecHits" )
1089  self.options['modules'].append( "hltRpcRecHits" )
1090  self.options['modules'].append( "-hltScalersRawToDigi" )
1091 
1092  self.options['sequences'].append( "-HLTL1SeededEgammaRegionalRecoTrackerSequence" )
1093  self.options['sequences'].append( "-HLTEcalActivityEgammaRegionalRecoTrackerSequence" )
1094  self.options['sequences'].append( "-HLTPixelMatchElectronActivityTrackingSequence" )
1095  self.options['sequences'].append( "-HLTDoLocalStripSequence" )
1096  self.options['sequences'].append( "-HLTDoLocalPixelSequence" )
1097  self.options['sequences'].append( "-HLTDoLocalPixelSequenceRegL2Tau" )
1098  self.options['sequences'].append( "-hltSiPixelDigis" )
1099  self.options['sequences'].append( "-hltSiPixelClusters" )
1100  self.options['sequences'].append( "-hltSiPixelRecHits" )
1101  self.options['sequences'].append( "-HLTRecopixelvertexingSequence" )
1102  self.options['sequences'].append( "-HLTEndSequence" )
1103  self.options['sequences'].append( "-HLTBeginSequence" )
1104  self.options['sequences'].append( "-HLTBeginSequenceNZS" )
1105  self.options['sequences'].append( "-HLTBeginSequenceBPTX" )
1106  self.options['sequences'].append( "-HLTBeginSequenceAntiBPTX" )
1107  self.options['sequences'].append( "-HLTHBHENoiseSequence" )
1108  self.options['sequences'].append( "-HLTIterativeTracking" )
1109  self.options['sequences'].append( "-HLTIterativeTrackingTau3Mu" )
1110  self.options['sequences'].append( "-HLTRegionalCKFTracksForL3Isolation" )
1111  self.options['sequences'].append( "-HLTHBHENoiseCleanerSequence" )
1112 
1113  # remove HLTAnalyzerEndpath from fastsim cff's
1114  if self.config.fragment:
1115  self.options['paths'].append( "-HLTAnalyzerEndpath" )
1116 
def buildOptions
Definition: confdb.py:873
def confdb.buildPathList (   self)

Definition at line 816 of file confdb.py.

817  def buildPathList(self):
818  self.all_paths = self.getPathList()
819 
820  if self.config.paths:
821  # no path list was requested, dump the full table, minus unsupported / unwanted paths
822  paths = self.config.paths.split(',')
823  else:
824  # dump only the requested paths, plus the eventual output endpaths
825  paths = []
826 
827  if self.config.fragment or self.config.output in ('none', 'full'):
828  # 'full' removes all outputs (same as 'none') and then adds a single "keep *" output (see the overrideOutput method)
829  if self.config.paths:
830  # paths are removed by default
831  pass
832  else:
833  # drop all output endpaths
834  paths.append( "-*Output" )
835  elif self.config.output == 'minimal':
836  # drop all output endpaths but HLTDQMResultsOutput
837  if self.config.paths:
838  paths.append( "HLTDQMResultsOutput" )
839  else:
840  paths.append( "-*Output" )
841  paths.append( "HLTDQMResultsOutput" )
842  else:
843  # keep / add back all output endpaths
844  if self.config.paths:
845  paths.append( "*Output" )
846  else:
847  pass # paths are kepy by default
848 
849  # drop paths unsupported by fastsim
850  if self.config.fastsim:
851  paths.extend( "-%s" % path for path in self.fastsimUnsupportedPaths )
852 
853  # drop unwanted paths for profiling (and timing studies)
854  if self.config.profiling:
855  paths.append( "-HLTriggerFirstPath" )
856  paths.append( "-HLTAnalyzerEndpath" )
857 
858  # this should never be in any dump (nor online menu)
859  paths.append( "-OfflineOutput" )
860 
861  # expand all wildcards
862  paths = self.expandWildcards(paths, self.all_paths)
863 
864  if self.config.paths:
865  # do an "additive" consolidation
866  self.options['paths'] = self.consolidatePositiveList(paths)
867  if not self.options['paths']:
868  raise RuntimeError('Error: option "--paths %s" does not select any valid paths' % self.config.paths)
869  else:
870  # do a "subtractive" consolidation
871  self.options['paths'] = self.consolidateNegativeList(paths)
872 
def buildPathList
Definition: confdb.py:816
def confdb.dumppaths (   paths)
static

Definition at line 810 of file confdb.py.

811  def dumppaths(paths):
812  sys.stderr.write('Path selection:\n')
813  for path in paths:
814  sys.stderr.write('\t%s\n' % path)
815  sys.stderr.write('\n\n')
def dumppaths
Definition: confdb.py:810
def confdb.fixForFastSim (   self)

Definition at line 357 of file confdb.py.

358  def fixForFastSim(self):
359  if self.config.fastsim:
360  # adapt the hle configuration (fragment) to run under fastsim
361  self.data = re.sub( r'import FWCore.ParameterSet.Config as cms', r'\g<0>\nfrom FastSimulation.HighLevelTrigger.HLTSetup_cff import *', self.data)
362 
363  # remove the definition of streams and datasets
364  self.data = re.compile( r'^streams.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
365  self.data = re.compile( r'^datasets.*\n(.*\n)*?^\)\s*\n', re.MULTILINE ).sub( '', self.data )
366 
367  # fix the definition of module
368  # FIXME: this should be updated to take into accout the --l1-emulator option
369  self._fix_parameter( type = 'InputTag', value = 'hltL1extraParticles', replace = 'l1extraParticles')
370  self._fix_parameter(name = 'GMTReadoutCollection', type = 'InputTag', value = 'hltGtDigis', replace = 'gmtDigis')
371  self._fix_parameter( type = 'InputTag', value = 'hltGtDigis', replace = 'gtDigis')
372  self._fix_parameter( type = 'InputTag', value = 'hltL1GtObjectMap', replace = 'gtDigis')
373  self._fix_parameter(name = 'initialSeeds', type = 'InputTag', value = 'noSeedsHere', replace = 'globalPixelSeeds:GlobalPixel')
374  self._fix_parameter(name = 'preFilteredSeeds', type = 'bool', value = 'True', replace = 'False')
375  self._fix_parameter( type = 'InputTag', value = 'hltOfflineBeamSpot', replace = 'offlineBeamSpot')
376  self._fix_parameter( type = 'InputTag', value = 'hltOnlineBeamSpot', replace = 'offlineBeamSpot')
377  self._fix_parameter( type = 'InputTag', value = 'hltMuonCSCDigis', replace = 'simMuonCSCDigis')
378  self._fix_parameter( type = 'InputTag', value = 'hltMuonDTDigis', replace = 'simMuonDTDigis')
379  self._fix_parameter( type = 'InputTag', value = 'hltMuonRPCDigis', replace = 'simMuonRPCDigis')
380  self._fix_parameter( type = 'InputTag', value = 'hltRegionalTracksForL3MuonIsolation', replace = 'hltPixelTracks')
381  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltHcalTowerNoiseCleaner', replace = 'hltTowerMakerForAll')
382  self._fix_parameter(name = 'src', type = 'InputTag', value = 'hltIter4Tau3MuMerged', replace = 'hltIter4Merged')
383 
384  # fix the definition of sequences and paths
385  self.data = re.sub( r'hltMuonCSCDigis', r'cms.SequencePlaceholder( "simMuonCSCDigis" )', self.data )
386  self.data = re.sub( r'hltMuonDTDigis', r'cms.SequencePlaceholder( "simMuonDTDigis" )', self.data )
387  self.data = re.sub( r'hltMuonRPCDigis', r'cms.SequencePlaceholder( "simMuonRPCDigis" )', self.data )
388  self.data = re.sub( r'HLTEndSequence', r'cms.SequencePlaceholder( "HLTEndSequence" )', self.data )
389  self.data = re.sub( r'hltGtDigis', r'HLTBeginSequence', self.data )
390 
def fixForFastSim
Definition: confdb.py:357
def confdb.fixForMC (   self)

Definition at line 346 of file confdb.py.

347  def fixForMC(self):
348  if not self.config.data:
349  # customise the HLT menu for running on MC
350  if not self.config.fragment:
351  self.data += """
352 # customise the HLT menu for running on MC
353 from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
354 process = customizeHLTforMC(process)
355 """
356 
def fixForMC
Definition: confdb.py:346
def confdb.fixPrescales (   self)

Definition at line 391 of file confdb.py.

392  def fixPrescales(self):
393  # update the PrescaleService to match the new list of paths
394  if self.options['paths']:
395  if self.options['paths'][0][0] == '-':
396  # drop requested paths
397  for minuspath in self.options['paths']:
398  path = minuspath[1:]
399  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
400  else:
401  # keep requested paths
402  for path in self.all_paths:
403  if path not in self.options['paths']:
404  self.data = re.sub(r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path, '', self.data)
405 
406  if self.config.unprescale:
407  self.data += """
408 # remove the HLT prescales
409 if 'PrescaleService' in %(dict)s:
410  %(process)sPrescaleService.lvl1DefaultLabel = cms.string( '0' )
411  %(process)sPrescaleService.lvl1Labels = cms.vstring( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' )
412  %(process)sPrescaleService.prescaleTable = cms.VPSet( )
413 """
414 
def fixPrescales
Definition: confdb.py:391
def confdb.instrumentErrorEventType (   self)

Definition at line 429 of file confdb.py.

430  def instrumentErrorEventType(self):
431  if self.config.errortype:
432  # change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
433  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '1', replace = '0')
434  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '2', replace = '0')
435  self._fix_parameter(name = 'SelectedTriggerType', type ='int32', value = '3', replace = '0')
436 
def instrumentErrorEventType
Definition: confdb.py:429
def confdb.instrumentOpenMode (   self)

Definition at line 415 of file confdb.py.

References join().

416  def instrumentOpenMode(self):
417  if self.config.open:
418  # find all EDfilters
419  filters = [ match[1] for match in re.findall(r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
420  re_sequence = re.compile( r'cms\.(Path|Sequence)\((.*)\)' )
421  # remove existing 'cms.ingore' and '~' modifiers
422  self.data = re_sequence.sub( lambda line: re.sub( r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)', r'\1', line.group(0) ), self.data )
423  self.data = re_sequence.sub( lambda line: re.sub( r'~', '', line.group(0) ), self.data )
424  # wrap all EDfilters with "cms.ignore( ... )", 1000 at a time (python 2.6 complains for too-big regular expressions)
425  for some in splitter(filters, 1000):
426  re_filters = re.compile( r'\b((process\.)?(' + r'|'.join(some) + r'))\b' )
427  self.data = re_sequence.sub( lambda line: re_filters.sub( r'cms.ignore( \1 )', line.group(0) ), self.data )
428 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def instrumentOpenMode
Definition: confdb.py:415
def confdb.instrumentTiming (   self)

Definition at line 701 of file confdb.py.

702  def instrumentTiming(self):
703  if self.config.profiling:
704  # instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
705  text = ''
706 
707  if not 'hltGetRaw' in self.data:
708  # add hltGetRaw
709  text += """
710 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
711  RawDataCollection = cms.InputTag( "rawDataCollector" )
712 )
713 """
714 
715  if not 'hltGetConditions' in self.data:
716  # add hltGetConditions
717  text += """
718 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
719  verbose = cms.untracked.bool( False ),
720  toGet = cms.VPSet( )
721 )
722 """
723 
724  if not 'hltBoolFalse' in self.data:
725  # add hltBoolFalse
726  text += """
727 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
728  result = cms.bool( False )
729 )
730 """
731 
732  # add the definition of HLTriggerFirstPath
733  # FIXME in a cff, should also update the HLTSchedule
734  text += """
735 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
736 """
737  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
738 
739 
740  # instrument the menu with the Service, EDProducer and EndPath needed for timing studies
741  # FIXME in a cff, should also update the HLTSchedule
742  if self.config.timing:
743  self.data += """
744 # instrument the menu with the modules and EndPath needed for timing studies
745 """
746 
747  hasFST = False
748  if 'FastTimerService' in self.data:
749  hasFST = True
750 
751  self.data += '\n# configure the FastTimerService\n'
752  if not hasFST:
753  self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
754  self.data += """%(process)sFastTimerService.useRealTimeClock = False
755 %(process)sFastTimerService.enableTimingPaths = True
756 %(process)sFastTimerService.enableTimingModules = True
757 %(process)sFastTimerService.enableTimingExclusive = True
758 %(process)sFastTimerService.enableTimingSummary = True
759 %(process)sFastTimerService.skipFirstPath = True
760 %(process)sFastTimerService.enableDQM = True
761 %(process)sFastTimerService.enableDQMbyPathActive = True
762 %(process)sFastTimerService.enableDQMbyPathTotal = True
763 %(process)sFastTimerService.enableDQMbyPathOverhead = True
764 %(process)sFastTimerService.enableDQMbyPathDetails = True
765 %(process)sFastTimerService.enableDQMbyPathCounters = True
766 %(process)sFastTimerService.enableDQMbyPathExclusive = True
767 %(process)sFastTimerService.enableDQMbyModule = True
768 %(process)sFastTimerService.enableDQMbyModuleType = True
769 %(process)sFastTimerService.enableDQMSummary = True
770 %(process)sFastTimerService.enableDQMbyLuminosity = True
771 %(process)sFastTimerService.enableDQMbyLumiSection = True
772 %(process)sFastTimerService.enableDQMbyProcesses = False
773 %(process)sFastTimerService.dqmTimeRange = 1000.
774 %(process)sFastTimerService.dqmTimeResolution = 5.
775 %(process)sFastTimerService.dqmPathTimeRange = 100.
776 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
777 %(process)sFastTimerService.dqmModuleTimeRange = 40.
778 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
779 %(process)sFastTimerService.dqmLuminosityRange = 1e+34
780 %(process)sFastTimerService.dqmLuminosityResolution = 1e+31
781 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
782 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
783 %(process)sFastTimerService.luminosityProduct = cms.untracked.InputTag( 'hltScalersRawToDigi' )
784 %(process)sFastTimerService.supportedProcesses = cms.untracked.vuint32( )
785 """
786 
787  self.data += """
788 # FastTimerServiceClient
789 %(process)sfastTimerServiceClient = cms.EDAnalyzer( "FastTimerServiceClient",
790  dqmPath = cms.untracked.string( "HLT/TimerService" )
791 )
792 
793 # DQM file saver
794 %(process)sdqmFileSaver = cms.EDAnalyzer( "DQMFileSaver",
795  convention = cms.untracked.string( "Offline" ),
796  workflow = cms.untracked.string( "/HLT/FastTimerService/All" ),
797  dirName = cms.untracked.string( "." ),
798  saveByRun = cms.untracked.int32(1),
799  saveByLumiSection = cms.untracked.int32(-1),
800  saveByEvent = cms.untracked.int32(-1),
801  saveByTime = cms.untracked.int32(-1),
802  saveByMinute = cms.untracked.int32(-1),
803  saveAtJobEnd = cms.untracked.bool(False),
804  forceRunNumber = cms.untracked.int32(-1),
805 )
806 
807 %(process)sTimingOutput = cms.EndPath( %(process)sfastTimerServiceClient + %(process)sdqmFileSaver )
808 """
def instrumentTiming
Definition: confdb.py:701
def confdb.loadAdditionalConditions (   self,
  comment,
  conditions 
)

Definition at line 667 of file confdb.py.

668  def loadAdditionalConditions(self, comment, *conditions):
669  # load additional conditions
670  self.data += """
671 # %s
672 if 'GlobalTag' in %%(dict)s:
673 """ % comment
674  for condition in conditions:
675  self.data += """ %%(process)sGlobalTag.toGet.append(
676  cms.PSet(
677  record = cms.string( '%(record)s' ),
678  tag = cms.string( '%(tag)s' ),
679  label = cms.untracked.string( '%(label)s' ),
680  connect = cms.untracked.string( '%(connect)s' )
681  )
682  )
683 """ % condition
684 
def loadAdditionalConditions
Definition: confdb.py:667
def confdb.loadCff (   self,
  module 
)

Definition at line 685 of file confdb.py.

686  def loadCff(self, module):
687  # load a cfi or cff module
688  if self.config.fragment:
689  self.data += 'from %s import *\n' % module
690  else:
691  self.data += 'process.load( "%s" )\n' % module
692 
def loadCff
Definition: confdb.py:685
def confdb.overrideGlobalTag (   self)

Definition at line 437 of file confdb.py.

438  def overrideGlobalTag(self):
439  # overwrite GlobalTag
440  # the logic is:
441  # - always set the correct connection string and pfnPrefix
442  # - if a GlobalTag is specified on the command line:
443  # - override the global tag
444  # - if the GT is "auto:...", insert the code to read it from Configuration.AlCa.autoCond
445  # - if a GlobalTag is NOT specified on the command line:
446  # - when running on data, do nothing, and keep the global tag in the menu
447  # - when running on mc, take the GT from the configuration.type
448 
449  # override the GlobalTag connection string and pfnPrefix
450  text = """
451 # override the GlobalTag, connection string and pfnPrefix
452 if 'GlobalTag' in %(dict)s:
453 """
454 
455  # when running on MC, override the global tag even if not specified on the command line
456  if not self.config.data and not self.config.globaltag:
457  if self.config.type in globalTag:
458  self.config.globaltag = globalTag[self.config.type]
459  else:
460  self.config.globaltag = globalTag['GRun']
461 
462  # if requested, override the L1 menu from the GlobalTag (using the same connect as the GlobalTag itself)
463  if self.config.l1.override:
464  self.config.l1.record = 'L1GtTriggerMenuRcd'
465  self.config.l1.label = ''
466  self.config.l1.tag = self.config.l1.override
467  if not self.config.l1.connect:
468  self.config.l1.connect = '%(connect)s/CMS_COND_31X_L1T'
469  self.config.l1cond = '%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
470  else:
471  self.config.l1cond = None
472 
473  if self.config.globaltag or self.config.l1cond:
474  text += " from Configuration.AlCa.GlobalTag import GlobalTag as customiseGlobalTag\n"
475  text += " %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
476  if self.config.globaltag:
477  text += ", globaltag = %s" % repr(self.config.globaltag)
478  if self.config.l1cond:
479  text += ", conditions = %s" % repr(self.config.l1cond)
480  text += ")\n"
481 
482  text += """ %(process)sGlobalTag.connect = '%(connect)s/CMS_COND_31X_GLOBALTAG'
483  %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
484  for pset in process.GlobalTag.toGet.value():
485  pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
486 """
487  self.data += text
def overrideGlobalTag
Definition: confdb.py:437
def confdb.overrideL1MenuXml (   self)

Definition at line 488 of file confdb.py.

489  def overrideL1MenuXml(self):
490  # if requested, override the L1 menu from the GlobalTag (Xml file)
491  if self.config.l1Xml.XmlFile:
492  text = """
493 # override the L1 menu from an Xml file
494 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
495  TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
496  DefXmlFile = cms.string('%(XmlFile)s'),
497  VmeXmlFile = cms.string('')
498 )
499 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
500  recordName = cms.string('L1GtTriggerMenuRcd'),
501  iovIsRunNotTime = cms.bool(True),
502  firstValid = cms.vuint32(1)
503 )
504 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
505 """
506  self.data += text % self.config.l1Xml.__dict__
def overrideL1MenuXml
Definition: confdb.py:488
def confdb.overrideOutput (   self)

Definition at line 586 of file confdb.py.

587  def overrideOutput(self):
588  # override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
589  self.data = re.sub(
590  r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
591  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 ),',
592  self.data
593  )
594 
595  if not self.config.fragment and self.config.output == 'full':
596  # add a single "keep *" output
597  self.data += """
598 # add a single "keep *" output
599 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
600  fileName = cms.untracked.string( "outputFULL.root" ),
601  fastCloning = cms.untracked.bool( False ),
602  dataset = cms.untracked.PSet(
603  dataTier = cms.untracked.string( 'RECO' ),
604  filterName = cms.untracked.string( '' )
605  ),
606  outputCommands = cms.untracked.vstring( 'keep *' )
607 )
608 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
609 """
610 
def overrideOutput
Definition: confdb.py:586
def confdb.overrideParameters (   self,
  module,
  parameters 
)

Definition at line 693 of file confdb.py.

694  def overrideParameters(self, module, parameters):
695  # override a module's parameter if the module is present in the configuration
696  self.data += "if '%s' in %%(dict)s:\n" % module
697  for (parameter, value) in parameters:
698  self.data += " %%(process)s%s.%s = %s\n" % (module, parameter, value)
699  self.data += "\n"
700 
def overrideParameters
Definition: confdb.py:693
def confdb.overrideProcessName (   self)

Definition at line 612 of file confdb.py.

613  def overrideProcessName(self):
614  if self.config.name is None:
615  return
616 
617  # override the process name
618  quote = '[\'\"]'
619  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)
620 
621  # the following was stolen and adapted from HLTrigger.Configuration.customL1THLT_Options
622  self.data += """
623 # adapt HLT modules to the correct process name
624 if 'hltTrigReport' in %%(dict)s:
625  %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
626 
627 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
628  %%(process)shltPreExpressCosmicsOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
629 
630 if 'hltPreExpressOutputSmart' in %%(dict)s:
631  %%(process)shltPreExpressOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
632 
633 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
634  %%(process)shltPreDQMForHIOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
635 
636 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
637  %%(process)shltPreDQMForPPOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
638 
639 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
640  %%(process)shltPreHLTDQMResultsOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
641 
642 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
643  %%(process)shltPreHLTDQMOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
644 
645 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
646  %%(process)shltPreHLTMONOutputSmart.TriggerResultsTag = cms.InputTag( 'TriggerResults', '', '%(name)s' )
647 
648 if 'hltDQMHLTScalers' in %%(dict)s:
649  %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
650  %%(process)shltDQMHLTScalers.processname = '%(name)s'
651 
652 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
653  %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
654 """ % self.config.__dict__
655 
def overrideProcessName
Definition: confdb.py:612
def confdb.runL1Emulator (   self)

Definition at line 538 of file confdb.py.

539  def runL1Emulator(self):
540  # if requested, run (part of) the L1 emulator
541  if self.config.emulator:
542  # FIXME this fragment used "process" explicitly
543  emulator = {
544  'RawToDigi': '',
545  'CustomL1T': '',
546  'CustomHLT': ''
547  }
548 
549  if self.config.data:
550  emulator['RawToDigi'] = 'RawToDigi_Data_cff'
551  else:
552  emulator['RawToDigi'] = 'RawToDigi_cff'
553 
554  if self.config.emulator == 'gt':
555  emulator['CustomL1T'] = 'customiseL1GtEmulatorFromRaw'
556  emulator['CustomHLT'] = 'switchToSimGtDigis'
557  elif self.config.emulator == 'gct,gt':
558  emulator['CustomL1T'] = 'customiseL1CaloAndGtEmulatorsFromRaw'
559  emulator['CustomHLT'] = 'switchToSimGctGtDigis'
560  elif self.config.emulator == 'gmt,gt':
561  # XXX currently unsupported
562  emulator['CustomL1T'] = 'customiseL1MuonAndGtEmulatorsFromRaw'
563  emulator['CustomHLT'] = 'switchToSimGmtGtDigis'
564  elif self.config.emulator in ('gmt,gct,gt', 'gct,gmt,gt', 'all'):
565  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
566  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
567  else:
568  # unsupported argument, default to running the whole emulator
569  emulator['CustomL1T'] = 'customiseL1EmulatorFromRaw'
570  emulator['CustomHLT'] = 'switchToSimGmtGctGtDigis'
571 
572  self.data += """
573 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
574 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
575 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
576 import L1Trigger.Configuration.L1Trigger_custom
577 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
578 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
579 
580 # customize the HLT to use the emulated results
581 import HLTrigger.Configuration.customizeHLTforL1Emulator
582 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
583 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
584 """ % emulator
585 
def runL1Emulator
Definition: confdb.py:538
def confdb.runL1EmulatorGT (   self)

Definition at line 507 of file confdb.py.

508  def runL1EmulatorGT(self):
509  # if requested, run (part of) the L1 emulator, then repack the data into a new RAW collection, to be used by the HLT
510  if not self.config.emulator:
511  return
512 
513  if self.config.emulator != 'gt':
514  # only the GT emulator is currently supported
515  return
516 
517  # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
518  text = """
519 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
520 """
521  if self.config.fragment:
522  # FIXME in a cff, should also update the HLTSchedule
523  text += "import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
524  else:
525  text += "process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
526 
527  if not 'hltBoolFalse' in self.data:
528  # add hltBoolFalse
529  text += """
530 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
531  result = cms.bool( False )
532 )
533 """
534  text += "process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
535 
536  self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)
537 
def runL1EmulatorGT
Definition: confdb.py:507
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.updateMessageLogger (   self)

Definition at line 656 of file confdb.py.

657  def updateMessageLogger(self):
658  # request summary informations from the MessageLogger
659  self.data += """
660 if 'MessageLogger' in %(dict)s:
661  %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
662  %(process)sMessageLogger.categories.append('L1GtTrigReport')
663  %(process)sMessageLogger.categories.append('HLTrigReport')
664  %(process)sMessageLogger.categories.append('FastReport')
665 """
666 
def updateMessageLogger
Definition: confdb.py:656

Variable Documentation

confdb.all_paths

Definition at line 817 of file confdb.py.

confdb.data

Definition at line 335 of file confdb.py.

confdb.source

Definition at line 1126 of file confdb.py.