CMS 3D CMS Logo

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

Functions

def Base
 
def HLTDropPrevious
 
def L1REPACK
 
def L1T
 
def L1THLT
 
def MassReplaceInputTag
 
def MassReplaceParameter
 
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 18 of file CustomConfigs.py.

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

18 
19 def Base(process):
20 # default modifications
21 
22  process.options.wantSummary = cms.untracked.bool(True)
23 
24  process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
25  process.MessageLogger.categories.append('L1GtTrigReport')
26  process.MessageLogger.categories.append('HLTrigReport')
27 
28 #
# No longer override - instead use GT config as provided via cmsDriver
def CustomConfigs.HLTDropPrevious (   process)

Definition at line 71 of file CustomConfigs.py.

References Base(), and mathSSE.return().

71 
72 def HLTDropPrevious(process):
73 # drop on input the previous HLT results
74  process.source.inputCommands = cms.untracked.vstring (
75  'keep *',
76  'drop *_hltL1GtObjectMap_*_*',
77  'drop *_TriggerResults_*_*',
78  'drop *_hltTriggerSummaryAOD_*_*',
79  )
80 
81  process=Base(process)
82 
83  return(process)
84 
return((rh^lh)&mask)
def CustomConfigs.L1REPACK (   process)

Definition at line 103 of file CustomConfigs.py.

104 def L1REPACK(process):
105 # Replace only the L1 parts and keep the rest
106  if 'DigiToRaw' in process.__dict__:
107  process.DigiToRaw = cms.Sequence(process.l1tDigiToRawSeq + process.l1GtPack + process.l1GtEvmPack + process.rawDataCollector)
108  if 'rawDataCollector' in process.__dict__:
109  process.rawDataCollector.RawCollectionList = cms.VInputTag(
110  cms.InputTag('gctDigiToRaw'),
111  cms.InputTag('l1tDigiToRaw'),
112  cms.InputTag('l1GtPack'),
113  cms.InputTag('l1GtEvmPack'),
114  cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
115  )
116 
117  process=L1T(process)
118 
119  return process
def CustomConfigs.L1T (   process)

Definition at line 39 of file CustomConfigs.py.

References Base(), and mathSSE.return().

39 
40 def L1T(process):
41 # modifications when running L1T only
42 
43  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
44  labels = ['gtDigis','simGtDigis','newGtDigis','hltGtDigis']
45  for label in labels:
46  if label in process.__dict__:
47  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( label )
48 
49  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
50  process.schedule.append(process.L1AnalyzerEndpath)
51 
52  process=Base(process)
53 
54  return(process)
55 
return((rh^lh)&mask)
def CustomConfigs.L1THLT (   process)

Definition at line 56 of file CustomConfigs.py.

References Base(), and mathSSE.return().

56 
57 def L1THLT(process):
58 # modifications when running L1T+HLT
59 
60  if not ('HLTAnalyzerEndpath' in process.__dict__) :
61  from HLTrigger.Configuration.HLT_FULL_cff import fragment
62  process.hltL1GtTrigReport = fragment.hltL1GtTrigReport
63  process.hltTrigReport = fragment.hltTrigReport
64  process.HLTAnalyzerEndpath = cms.EndPath(process.hltL1GtTrigReport + process.hltTrigReport)
65  process.schedule.append(process.HLTAnalyzerEndpath)
66 
67  process=Base(process)
68 
69  return(process)
70 
return((rh^lh)&mask)
def CustomConfigs.MassReplaceInputTag (   process,
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False,
  moduleLabelOnly = False,
  skipLabelTest = False 
)

Definition at line 85 of file CustomConfigs.py.

References relativeConstraints.keys, helpers.massSearchReplaceAnyInputTag(), and mathSSE.return().

85 
86 def MassReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker",verbose=False,moduleLabelOnly=False,skipLabelTest=False):
87 # replace InputTag values (adapted from Configuration/Applications/python/ConfigBuilder.py)
88  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
89  for s in process.paths_().keys():
90  massSearchReplaceAnyInputTag(getattr(process,s),old,new,verbose,moduleLabelOnly,skipLabelTest)
91  for s in process.endpaths_().keys():
92  massSearchReplaceAnyInputTag(getattr(process,s),old,new,verbose,moduleLabelOnly,skipLabelTest)
93  return(process)
return((rh^lh)&mask)
def massSearchReplaceAnyInputTag
Definition: helpers.py:262
def MassReplaceInputTag
def CustomConfigs.MassReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False 
)

Definition at line 94 of file CustomConfigs.py.

References relativeConstraints.keys, helpers.massSearchReplaceParam(), and mathSSE.return().

Referenced by customizeHLTforMC.customizeHLTforMC().

94 
95 def MassReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker",verbose=False):
96 # replace values of named parameters
97  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceParam
98  for s in process.paths_().keys():
99  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
100  for s in process.endpaths_().keys():
101  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
102  return(process)
return((rh^lh)&mask)
def massSearchReplaceParam
Definition: helpers.py:249
def MassReplaceParameter
def CustomConfigs.ProcessName (   process)

Definition at line 3 of file CustomConfigs.py.

References mathSSE.return().

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

3 
4 def ProcessName(process):
5 # processname modifications
6 
7  if 'hltTrigReport' in process.__dict__:
8  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
9 
10  if 'hltDQMHLTScalers' in process.__dict__:
11  process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
12 
13  if 'hltDQML1SeedLogicScalers' in process.__dict__:
14  process.hltDQML1SeedLogicScalers.processname = process.name_()
15 
16  return(process)
17 
return((rh^lh)&mask)

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/')

Definition at line 34 of file CustomConfigs.py.