Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:30:19

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 import sys
0005 import os
0006 
0007 # arguments
0008 if (len(sys.argv)>1) :
0009     key=str(sys.argv[2])
0010 else :
0011     key='Default'
0012 
0013 print("Generating LUT files for GCT key %s" % (key))
0014 
0015 if (not ("TNS_ADMIN" in os.environ.keys())):
0016     print("Please set TNS_ADMIN using :")
0017     print("export TNS_ADMIN=/nfshome0/popcondev/conddb")
0018 
0019 
0020 # CMSSW config
0021 process = cms.Process("GctLUTGen")
0022 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0023 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0024 process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
0025 process.MessageLogger.debugModules = cms.untracked.vstring('l1GctConfigDump')
0026 
0027 # Generate dummy L1TriggerKeyList
0028 process.load("CondTools.L1Trigger.L1TriggerKeyListDummy_cff")
0029 
0030 # get 
0031 process.load("CondTools.L1Trigger.L1TriggerKeyDummy_cff")
0032 process.L1TriggerKeyDummy.objectKeys = cms.VPSet()
0033 process.L1TriggerKeyDummy.label = cms.string('SubsystemKeysOnly')
0034 
0035 # xxxKey = csctfKey, dttfKey, rpcKey, gmtKey, rctKey, gctKey, gtKey, or tsp0Key
0036 process.L1TriggerKeyDummy.gctKey = cms.string(key)
0037 
0038 # Subclass of L1ObjectKeysOnlineProdBase.
0039 process.load("L1TriggerConfig.GctConfigProducers.L1GctTSCObjectKeysOnline_cfi")
0040 process.L1GctTSCObjectKeysOnline.subsystemLabel = cms.string('')
0041 
0042 # Get configuration data from OMDS.  This is the subclass of L1ConfigOnlineProdBase.
0043 process.load("L1TriggerConfig.GctConfigProducers.L1GctJetFinderParamsOnline_cfi")
0044 process.load("L1TriggerConfig.L1ScalesProducers.L1JetEtScaleOnline_cfi")
0045 process.load("L1TriggerConfig.L1ScalesProducers.L1HfRingEtScaleOnline_cfi")
0046 process.load("L1TriggerConfig.L1ScalesProducers.L1HtMissScaleOnline_cfi")
0047 
0048 
0049 #process.load("L1TriggerConfig.GctConfigProducers.L1GctChannelMaskOnline_cfi")
0050 
0051 
0052 from CondTools.L1Trigger.L1CondDBPayloadWriter_cff import initPayloadWriter
0053 initPayloadWriter( process )
0054 
0055 
0056 process.maxEvents = cms.untracked.PSet(
0057     input = cms.untracked.int32(1)
0058 )
0059 
0060 process.source = cms.Source("EmptyIOVSource",
0061     timetype = cms.string('runnumber'),
0062     firstValue = cms.uint64(1),
0063     lastValue = cms.uint64(1),
0064     interval = cms.uint64(1)
0065 )
0066 
0067 # LUT printer
0068 process.load("L1Trigger.GlobalCaloTrigger.l1GctPrintLuts_cfi")
0069 process.l1GctPrintLuts.jetRanksFilename = cms.untracked.string("GctJetLUT_"+key+".txt")
0070 process.l1GctPrintLuts.hfSumLutFilename = cms.untracked.string("GctHFSumLUT_"+key+".txt")
0071 process.l1GctPrintLuts.htMissLutFilename = cms.untracked.string("GctHtMissLUT_"+key+".txt")
0072 
0073 
0074 process.p = cms.Path(
0075     process.l1GctPrintLuts
0076 )
0077 
0078 
0079