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 FASTSIM
 
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.FASTSIM (   process)

Definition at line 71 of file CustomConfigs.py.

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

71 
72 def FASTSIM(process):
73 # modifications when running L1T+HLT
74 
75  process=L1THLT(process)
76  process.hltL1GtTrigReport.L1GtRecordInputTag = cms.InputTag("simGtDigis")
77 
78  return(process)
79 
return((rh^lh)&mask)
def CustomConfigs.HLTDropPrevious (   process)

Definition at line 80 of file CustomConfigs.py.

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

80 
81 def HLTDropPrevious(process):
82 # drop on input the previous HLT results
83  process.source.inputCommands = cms.untracked.vstring (
84  'keep *',
85  'drop *_hltL1GtObjectMap_*_*',
86  'drop *_TriggerResults_*_*',
87  'drop *_hltTriggerSummaryAOD_*_*',
88  )
89 
90  process=Base(process)
91 
92  return(process)
93 
return((rh^lh)&mask)
def CustomConfigs.L1REPACK (   process)

Definition at line 109 of file CustomConfigs.py.

110 def L1REPACK(process):
111 # Replace only the L1 parts and keep the rest
112  if 'DigiToRaw' in process.__dict__:
113  process.DigiToRaw = cms.Sequence(process.l1tDigiToRawSeq + process.l1GtPack + process.l1GtEvmPack + process.rawDataCollector)
114  if 'rawDataCollector' in process.__dict__:
115  process.rawDataCollector.RawCollectionList = cms.VInputTag(
116  cms.InputTag('gctDigiToRaw'),
117  cms.InputTag('l1tDigiToRaw'),
118  cms.InputTag('l1GtPack'),
119  cms.InputTag('l1GtEvmPack'),
120  cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
121  )
122 
123  process=L1T(process)
124 
125  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().

Referenced by FASTSIM().

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

Definition at line 94 of file CustomConfigs.py.

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

94 
95 def MassReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker"):
96 # replace InputTag values (adapted from Configuration/Applications/python/ConfigBuilder.py)
97  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
98  for s in process.paths_().keys():
99  massSearchReplaceAnyInputTag(getattr(process,s),old,new)
100  return(process)
return((rh^lh)&mask)
def massSearchReplaceAnyInputTag
Definition: helpers.py:262
def MassReplaceInputTag
def CustomConfigs.MassReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker" 
)

Definition at line 101 of file CustomConfigs.py.

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

102 def MassReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker"):
103 # replace values of named parameters
104  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceParam
105  for s in process.paths_().keys():
106  massSearchReplaceParam(getattr(process,s),name,old,new)
107  return(process)
108 
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.