CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseUtils.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import os
4 
5 ##############################################################################
6 # customisations for L1T utilities
7 #
8 # customisations which add utilities features such as debugging of L1T,
9 # summary module, etc.
10 #
11 ##############################################################################
12 
13 # Unpack Stage-2 GT and GMT
15  cutlist=['gtStage2Digis','gmtStage2Digis']
16  for b in cutlist:
17  process.L1TRawToDigi.remove(getattr(process,b))
18  return process
19 
21  print "L1T INFO: removing output module if found."
22  # print process.schedule
23  cutlist=['RECOSIMoutput_step'] # extend as needed!
24  for b in cutlist:
25  if hasattr(process,b):
26  if process.schedule.count(getattr(process,b)):
27  print "Dropping module ", b
28  process.schedule.remove(getattr(process,b))
29  #print process.schedule
30  return process
31 
32 def L1TStage1DigisSummary(process):
33  print "L1T INFO: will dump a summary of unpacked Stage1 content to screen."
34  process.load('L1Trigger.L1TCommon.l1tSummaryStage1Digis_cfi')
35  process.l1tstage1summary = cms.Path(process.l1tSummaryStage1Digis)
36  process.schedule.append(process.l1tstage1summary)
37  return process
38 
39 def L1TStage2DigisSummary(process):
40  print "L1T INFO: will dump a summary of unpacked Stage2 content to screen."
41  process.load('L1Trigger.L1TCommon.l1tSummaryStage2Digis_cfi')
42  process.l1tstage2summary = cms.Path(process.l1tSummaryStage2Digis)
43  process.schedule.append(process.l1tstage2summary)
44  return process
45 
47  print "L1T INFO: will dump a summary of simulated Stage1 content to screen."
48  process.load('L1Trigger.L1TCommon.l1tSummaryStage1SimDigis_cfi')
49  process.l1tsimstage1summary = cms.Path(process.l1tSummaryStage1SimDigis)
50  process.schedule.append(process.l1tsimstage1summary)
51  return process
52 
54  print "L1T INFO: will dump a summary of simulated Stage2 content to screen."
55  process.load('L1Trigger.L1TCommon.l1tSummarySimStage2Digis_cfi')
56  process.l1tsimstage2summary = cms.Path(process.l1tSummarySimStage2Digis)
57  process.schedule.append(process.l1tsimstage2summary)
58  return process
59 
60 
61 def L1TAddDebugOutput(process):
62  print "L1T INFO: sending debugging ouput to file l1tdebug.log"
63  print "L1T INFO: add <flags CXXFLAGS=\"-g -D=EDM_ML_DEBUG\"/> in BuildFile.xml of any package you want to debug..."
64  process.MessageLogger = cms.Service(
65  "MessageLogger",
66  destinations = cms.untracked.vstring('l1tdebug','cerr'),
67  l1tdebug = cms.untracked.PSet(threshold = cms.untracked.string('DEBUG')),
68  #debugModules = cms.untracked.vstring('caloStage1Digis'))
69  cerr = cms.untracked.PSet(threshold = cms.untracked.string('WARNING')),
70  debugModules = cms.untracked.vstring('*'))
71  return process
72 
73 def L1TDumpEventData(process):
74  print "L1T INFO: adding EventContentAnalyzer to process schedule"
75  process.dumpED = cms.EDAnalyzer("EventContentAnalyzer")
76  process.l1tdumpevent = cms.Path(process.dumpED)
77  process.schedule.append(process.l1tdumpevent)
78  return process
79 
80 def L1TDumpEventSummary(process):
81  process.dumpES = cms.EDAnalyzer("PrintEventSetupContent")
82  process.l1tdumpeventsetup = cms.Path(process.dumpES)
83  process.schedule.append(process.l1tdumpeventsetup)
84  return process
85 
86 
87 
88 
def L1TTurnOffUnpackStage2GtAndGmt
customisations for L1T utilities
def L1TStage1SimDigisSummary
def L1TTurnOffOutputModule
def L1TStage2SimDigisSummary