Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:12

0001 from __future__ import print_function
0002 # cfg file to test L1 GT records
0003 #
0004 # V M Ghete  2008 - 2010 - 2012
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 # choose a valid global tag for the release you are using 
0009 #
0010 # 5_2_X
0011 #useGlobalTag='GR_R_52_V9'
0012 useGlobalTag='START52_V10'
0013 
0014 # run number to retrieve the records - irrelevant if records are overwritten or
0015 # the global tag is a MC global tag, with infinite IoV
0016 useRunNumber = 194251
0017 
0018 # print L1 GT prescale factors and trigger mask
0019 printPrescaleFactorsAndMasks = True
0020 #printPrescaleFactorsAndMasks = False
0021 
0022 # print L1 GT board maps
0023 printBoardMaps = True
0024 #printBoardMaps = False
0025 
0026 # print L1 GT stable parameters
0027 printStableParameters = True
0028 #printStableParameters = False
0029 
0030 # print L1 GT parameters
0031 printParameters = True
0032 #printParameters = False
0033 
0034 # print L1 GT PSB setup
0035 printPsbSetup = True
0036 #printPsbSetup = False
0037 
0038 ##########################################################################################
0039 
0040 # process
0041 
0042 processName = "L1GtTester"
0043 process = cms.Process(processName)
0044 
0045 # number of events and source
0046 process.maxEvents = cms.untracked.PSet(
0047     input = cms.untracked.int32(1)
0048 )
0049 
0050 process.source = cms.Source("EmptyIOVSource",
0051                         timetype = cms.string('runnumber'),
0052                         firstValue = cms.uint64(useRunNumber),
0053                         lastValue = cms.uint64(useRunNumber),
0054                         interval = cms.uint64(1)
0055                         )
0056 
0057 
0058 # import standard configurations, load and configure modules via Global Tag
0059 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0060 # retrieve also the HLT menu
0061 
0062 process.load('Configuration.StandardSequences.Services_cff')
0063 process.load('FWCore.MessageService.MessageLogger_cfi')
0064 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0065 
0066 process.GlobalTag.globaltag = useGlobalTag+'::All'
0067 
0068 # records to be printed
0069 
0070 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTester_cff')
0071 
0072 # prescale factors and masks
0073 #process.l1GtPrescaleFactorsAndMasksTester.TesterPrescaleFactors = True
0074 #process.l1GtPrescaleFactorsAndMasksTester.TesterTriggerMask = True
0075 #process.l1GtPrescaleFactorsAndMasksTester.TesterTriggerVetoMask = True
0076 #process.l1GtPrescaleFactorsAndMasksTester.RetrieveInBeginRun = True
0077 #process.l1GtPrescaleFactorsAndMasksTester.RetrieveInBeginLuminosityBlock = False
0078 #process.l1GtPrescaleFactorsAndMasksTester.RetrieveInAnalyze = False
0079 #process.l1GtPrescaleFactorsAndMasksTester.PrintInBeginRun = True
0080 #process.l1GtPrescaleFactorsAndMasksTester.PrintInBeginLuminosityBlock = False
0081 #process.l1GtPrescaleFactorsAndMasksTester.PrintInAnalyze = False
0082 #process.l1GtPrescaleFactorsAndMasksTester.PrintOutput = 0
0083 
0084 # Path definitions
0085 process.pathL1GtStableParameters = cms.Path(process.seqL1GtStableParameters)
0086 process.pathL1GtParameters = cms.Path(process.seqL1GtParameters)
0087 process.pathL1GtBoardMaps = cms.Path(process.seqL1GtBoardMaps)
0088 process.pathL1GtPsbSetup = cms.Path(process.seqL1GtPsbSetup)
0089 process.pathL1GtPrescaleFactorsAndMasks = cms.Path(process.seqL1GtPrescaleFactorsAndMasks)
0090 
0091 # Schedule definition
0092 process.schedule = cms.Schedule()
0093 
0094 print('')
0095 
0096 if printStableParameters == True :
0097     process.schedule.extend([process.pathL1GtStableParameters])
0098     print("Printing L1 GT stable parameters from global tag ", useGlobalTag)
0099 else :
0100     print("L1 GT stable parameters from ", useGlobalTag, " not requested to be printed")
0101 
0102 if printParameters == True :
0103     process.schedule.extend([process.pathL1GtParameters])
0104     print("Printing L1 GT parameters from global tag ", useGlobalTag)
0105 else :
0106     print("L1 GT parameters from ", useGlobalTag, " not requested to be printed")
0107 
0108 if printBoardMaps == True :
0109     process.schedule.extend([process.pathL1GtBoardMaps])
0110     print("Printing L1 GT board maps from global tag ", useGlobalTag)
0111 else :
0112     print("L1 GT board maps from ", useGlobalTag, " not requested to be printed")
0113 
0114 if printPsbSetup == True :
0115     process.schedule.extend([process.pathL1GtPsbSetup])
0116     print("Printing L1 GT PSB setup from global tag ", useGlobalTag)
0117 else :
0118     print("L1 GT PSB setup from ", useGlobalTag, " not requested to be printed")
0119 
0120 if printPrescaleFactorsAndMasks == True :
0121     process.schedule.extend([process.pathL1GtPrescaleFactorsAndMasks])
0122     print("Printing L1 GT prescale factors and masks from global tag ", useGlobalTag)
0123 else :
0124     print("L1 GT prescale factors and masks from ", useGlobalTag, " not requested to be printed")
0125     
0126 
0127 
0128 # services
0129 
0130 # Message Logger
0131 process.MessageLogger.cerr.enable = False
0132 
0133 process.MessageLogger.files.L1GtTester_errors = cms.untracked.PSet( 
0134         threshold = cms.untracked.string('ERROR'),
0135         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0136         L1GtPrescaleFactorsAndMasksTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0137        )
0138 
0139 process.MessageLogger.files.L1GtTester_warnings = cms.untracked.PSet( 
0140         threshold = cms.untracked.string('WARNING'),
0141         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0142         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0143         L1GtPrescaleFactorsAndMasksTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0144         )
0145 
0146 process.MessageLogger.files.L1GtTester_info = cms.untracked.PSet( 
0147         threshold = cms.untracked.string('INFO'),
0148         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0149         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0150         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0151         L1GtPrescaleFactorsAndMasksTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0152         )
0153 
0154 process.MessageLogger.files.L1GtTester_debug = cms.untracked.PSet( 
0155         threshold = cms.untracked.string('DEBUG'),
0156         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0157         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0158         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0159         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0160         L1GtPrescaleFactorsAndMasksTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0161         )
0162