CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
CustomConfigs Namespace Reference

Functions

def Base
 
def HLTDropPrevious
 
def L1REPACK
 
def L1T
 
def L1THLT
 
def L1XML
 
def ProcessName
 

Variables

tuple process = ProcessName(process)
 override the GlobalTag, connection string and pfnPrefix if 'GlobalTag' in process.__dict__: process.GlobalTag.connect = 'frontier://FrontierProd/CMS_CONDITIONS' process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://Frontie#rProd/') More...
 

Function Documentation

def CustomConfigs.Base (   process)

Definition at line 17 of file CustomConfigs.py.

Referenced by gen::DataCardFileWriter.DataCardFileWriter(), models.generate(), HLTDropPrevious(), L1T(), and L1THLT().

17 
18 def Base(process):
19 # default modifications
20 
21  process.options.wantSummary = cms.untracked.bool(True)
22  process.options.numberOfThreads = cms.untracked.uint32( 4 )
23  process.options.numberOfStreams = cms.untracked.uint32( 0 )
24  process.options.sizeOfStackForThreadsInKB = cms.untracked.uint32( 10*1024 )
25 
26  process.MessageLogger.TriggerSummaryProducerAOD=cms.untracked.PSet()
27  process.MessageLogger.L1GtTrigReport=cms.untracked.PSet()
28  process.MessageLogger.L1TGlobalSummary=cms.untracked.PSet()
29  process.MessageLogger.HLTrigReport=cms.untracked.PSet()
30 
# No longer override - instead use GT config as provided via cmsDriver
def CustomConfigs.HLTDropPrevious (   process)

Definition at line 109 of file CustomConfigs.py.

References Base(), and gpuVertexFinder.return.

110 def HLTDropPrevious(process):
111 # drop on input the previous HLT results
112  process.source.inputCommands = cms.untracked.vstring (
113  'keep *',
114  'drop *_hltL1GtObjectMap_*_*',
115  'drop *_TriggerResults_*_*',
116  'drop *_hltTriggerSummaryAOD_*_*',
117  )
118 
119  process=Base(process)
120 
121  return(process)
122 
def CustomConfigs.L1REPACK (   process,
  sequence = "Full" 
)

Definition at line 123 of file CustomConfigs.py.

References edm::eventsetup::heterocontainer.insert(), and mps_monitormerge.items.

124 def L1REPACK(process, sequence="Full"):
125 
126  from Configuration.Eras.Era_Run3_cff import Run3
127  l1repack = cms.Process('L1REPACK', Run3)
128  l1repack.load('Configuration.StandardSequences.SimL1EmulatorRepack_'+sequence+'_cff')
129 
130  for module in l1repack.es_sources_():
131  if not hasattr(process, module):
132  setattr(process, module, getattr(l1repack, module))
133  for module in l1repack.es_producers_():
134  if not hasattr(process, module):
135  setattr(process, module, getattr(l1repack, module))
136 
137  for module in l1repack.SimL1Emulator.expandAndClone().moduleNames():
138  setattr(process, module, getattr(l1repack, module))
139  for taskName, task in l1repack.tasks_().items():
140  if l1repack.SimL1Emulator.contains(task):
141  setattr(process, taskName, task)
142  for sequenceName, sequence in l1repack.sequences_().items():
143  if l1repack.SimL1Emulator.contains(sequence):
144  setattr(process, sequenceName, sequence)
145 
146  process.SimL1Emulator = l1repack.SimL1Emulator
147 
148  for path in process.paths_():
149  getattr(process,path).insert(0,process.SimL1Emulator)
150  for path in process.endpaths_():
151  getattr(process,path).insert(0,process.SimL1Emulator)
152 
153  # special L1T cleanup
154  for obj in [
155  'hgcalTriggerGeometryESProducer',
156  ]:
157  if hasattr(process, obj):
158  delattr(process, obj)
159 
160  return process
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
def CustomConfigs.L1T (   process)

Definition at line 43 of file CustomConfigs.py.

References Base(), and gpuVertexFinder.return.

43 
44 def L1T(process):
45 # modifications when running L1T only
46 
47  def _legacyStage1(process):
48  labels = ['gtDigis','simGtDigis','newGtDigis','hltGtDigis']
49  for label in labels:
50  if label in process.__dict__:
51  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
52  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( label )
53  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
54  process.schedule.append(process.L1AnalyzerEndpath)
55 
56  def _stage2(process):
57  labels = ['gtStage2Digis','simGtStage2Digis','newGtStage2Digis','hltGtStage2Digis']
58  for label in labels:
59  if label in process.__dict__:
60  process.load('L1Trigger.L1TGlobal.L1TGlobalSummary_cfi')
61  process.L1TGlobalSummary.AlgInputTag = cms.InputTag( label )
62  process.L1TGlobalSummary.ExtInputTag = cms.InputTag( label )
63  process.L1TAnalyzerEndpath = cms.EndPath(process.L1TGlobalSummary )
64  process.schedule.append(process.L1TAnalyzerEndpath)
65 
66  from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
67  (~stage2L1Trigger).toModify(process, _legacyStage1)
68  stage2L1Trigger.toModify(process, _stage2)
69 
70  if hasattr(process,'TriggerMenu'):
71  delattr(process,'TriggerMenu')
72 
73  process=Base(process)
74 
75  return(process)
76 
def CustomConfigs.L1THLT (   process)

Definition at line 77 of file CustomConfigs.py.

References Base(), and gpuVertexFinder.return.

77 
78 def L1THLT(process):
79 # modifications when running L1T+HLT
80 
81  if not ('HLTAnalyzerEndpath' in process.__dict__) :
82  def _legacyStage1(process):
83  if 'hltGtDigis' in process.__dict__:
84  from HLTrigger.Configuration.HLT_Fake_cff import fragment
85  process.hltL1GtTrigReport = fragment.hltL1GtTrigReport
86  process.hltTrigReport = fragment.hltTrigReport
87  process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtDigis + process.hltL1GtTrigReport + process.hltTrigReport)
88  process.schedule.append(process.HLTAnalyzerEndpath)
89 
90  def _stage2(process):
91  if 'hltGtStage2ObjectMap' in process.__dict__:
92  from HLTrigger.Configuration.HLT_FULL_cff import fragment
93  process.hltL1TGlobalSummary = fragment.hltL1TGlobalSummary
94  process.hltTrigReport = fragment.hltTrigReport
95  process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtStage2Digis + process.hltL1TGlobalSummary + process.hltTrigReport)
96  process.schedule.append(process.HLTAnalyzerEndpath)
97 
98  from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
99  (~stage2L1Trigger).toModify(process, _legacyStage1)
100  stage2L1Trigger.toModify(process, _stage2)
101 
102  if hasattr(process,'TriggerMenu'):
103  delattr(process,'TriggerMenu')
104 
105  process=Base(process)
106 
107  return(process)
108 
def CustomConfigs.L1XML (   process,
  xmlFile = None 
)

Definition at line 161 of file CustomConfigs.py.

162 def L1XML(process,xmlFile=None):
163 
164 # xmlFile="L1Menu_Collisions2016_dev_v3.xml"
165 
166  if ((xmlFile is None) or (xmlFile=="")):
167  return process
168 
169  process.L1TriggerMenu= cms.ESProducer("L1TUtmTriggerMenuESProducer",
170  L1TriggerMenuFile= cms.string(xmlFile)
171  )
172  process.ESPreferL1TXML = cms.ESPrefer("L1TUtmTriggerMenuESProducer","L1TriggerMenu")
173 
174  return process
def CustomConfigs.ProcessName (   process)

Definition at line 8 of file CustomConfigs.py.

References gpuVertexFinder.return.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

8 
9 def ProcessName(process):
10 # processname modifications
11 
12  if 'hltTrigReport' in process.__dict__:
13  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
14 
15  return(process)
16 

Variable Documentation

tuple CustomConfigs.process = ProcessName(process)

override the GlobalTag, connection string and pfnPrefix if 'GlobalTag' in process.__dict__: process.GlobalTag.connect = 'frontier://FrontierProd/CMS_CONDITIONS' process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://Frontie#rProd/')

process.GlobalTag.snapshotTime = cms.string("9999-12-31 23:59:59.000")

Definition at line 38 of file CustomConfigs.py.