Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:27

0001 from __future__ import print_function
0002 #
0003 # cfg file to print the content of 
0004 # L1 trigger records from a global tag 
0005 #
0006 # V M Ghete  2009-03-04  first version
0007 # W Sun      2009-03-04  add run number option 
0008 
0009 
0010 import FWCore.ParameterSet.Config as cms
0011 
0012 # process
0013 process = cms.Process('L1GlobalTagTest')
0014 
0015 ###################### user choices ######################
0016 
0017 # choose the global tag corresponding to the run number or the sample used
0018 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0019 #
0020 # for MC samples, one must use the same global tag as used for production
0021 # (if compatible with the release used) or a compatible tag, due to lack 
0022 # of proper IoV treatment (as of 2010-05-16) during MC production. 
0023 # Recommendation: original global tag with the latest available release 
0024 # compatible with that global tag.
0025 
0026 #    data global tags
0027 # 5_2_X
0028 useGlobalTag = 'GR_P_V37'
0029 
0030 #    MC production global tags
0031 #useGlobalTag = 'MC_37Y_V5'
0032 #useGlobalTag = 'START37_V5'
0033 
0034 
0035 # enable / disable printing for subsystems 
0036 #    un-comment the False option to suppress printing for that system
0037 
0038 printL1Rct = True
0039 #printL1Rct = False
0040 
0041 printL1Gct = True
0042 #printL1Gct = False
0043 
0044 #printL1DtTPG = True
0045 printL1DtTPG = False
0046 
0047 
0048 printL1DtTF = True
0049 #printL1DtTF = False
0050 
0051 printL1CscTF= True
0052 #printL1CscTF= False
0053 
0054 printL1Rpc = True
0055 #printL1Rpc = False
0056 
0057 printL1Gmt = True
0058 #printL1Gmt = False
0059 
0060 printL1Gt = True
0061 #printL1Gt = False
0062 
0063 
0064 # choose if using a specific run number or event files
0065 
0066 useRunNumber = True
0067 #useRunNumber = False
0068 
0069 if useRunNumber == True :
0070     # specific run number (using empty source)
0071     cmsSource = 'EmptySource'
0072     
0073     firstRunNumber = 109087
0074     lastRunNumber = 109087
0075     
0076 else :
0077     #running over a given event sample (using POOL source)
0078     cmsSource = 'PoolSource'
0079 
0080     readFiles = cms.untracked.vstring()
0081     secFiles = cms.untracked.vstring() 
0082     
0083     readFiles.extend( [
0084             '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/847/6A699BB9-2072-DE11-995B-001D09F34488.root'
0085         
0086         ] );
0087 
0088 
0089 
0090 ###################### end user choices ###################
0091 
0092 # number of events and source
0093 process.maxEvents = cms.untracked.PSet(
0094     input = cms.untracked.int32(1)
0095 )
0096 
0097 if cmsSource == 'EmptySource' :
0098     process.source = cms.Source("EmptyIOVSource",
0099                                 timetype = cms.string('runnumber'),
0100                                 firstValue = cms.uint64(firstRunNumber),
0101                                 lastValue = cms.uint64(lastRunNumber),
0102                                 interval = cms.uint64(1)
0103                                 )
0104 else :
0105     process.source = cms.Source ('PoolSource', fileNames=readFiles, secondaryFileNames=secFiles)
0106     
0107 
0108 # load and configure modules via Global Tag
0109 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0110 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0111 process.GlobalTag.globaltag = useGlobalTag + '::All'
0112 
0113 # 
0114 process.load('L1Trigger.Configuration.L1GlobalTagTest_cff')
0115 
0116 # Path definitions
0117 process.printGTagL1Rct = cms.Path(process.printGlobalTagL1Rct)
0118 process.printGTagL1Gct = cms.Path(process.printGlobalTagL1Gct)
0119 
0120 #process.printGTagL1DtTPG = cms.Path(process.printGlobalTagL1DtTPG)
0121 process.printGTagL1DtTF = cms.Path(process.printGlobalTagL1DtTF)
0122 
0123 process.printGTagL1CscTF = cms.Path(process.printGlobalTagL1CscTF)
0124 
0125 process.printGTagL1Rpc = cms.Path(process.printGlobalTagL1Rpc)
0126 
0127 process.printGTagL1Gmt = cms.Path(process.printGlobalTagL1Gmt)
0128 process.printGTagL1Gt = cms.Path(process.printGlobalTagL1Gt)
0129 
0130 # Schedule definition
0131 process.schedule = cms.Schedule()
0132 
0133 print('')
0134 
0135 if printL1Rct == True :
0136     process.schedule.extend([process.printGTagL1Rct])
0137     print("Printing L1 RCT content of global tag ", useGlobalTag)
0138 else :
0139     print("L1 RCT content of global tag ", useGlobalTag, " not requested to be printed")
0140 
0141 #
0142 if printL1Gct == True :
0143     process.schedule.extend([process.printGTagL1Gct])
0144     print("Printing L1 GCT content of global tag ", useGlobalTag)
0145 else :
0146     print("L1 GCT content of global tag ", useGlobalTag, " not requested to be printed")
0147 
0148 #
0149 
0150 if printL1DtTPG == True :
0151     #process.schedule.extend([process.printGTagL1DtTPG])
0152     print("Printing L1 DtTPG content of global tag ", useGlobalTag, ": MISSING")
0153 else :
0154     print("L1 DtTPG content of global tag ", useGlobalTag, " not requested to be printed")
0155 
0156 
0157 if printL1DtTF == True :
0158     process.schedule.extend([process.printGTagL1DtTF])
0159     print("Printing L1 DtTF content of global tag ", useGlobalTag)
0160 else :
0161     print("L1 DtTF content of global tag ", useGlobalTag, " not requested to be printed")
0162 
0163 #
0164 
0165 if printL1CscTF == True :
0166     process.schedule.extend([process.printGTagL1CscTF])
0167     print("Printing L1 CscTF content of global tag ", useGlobalTag)
0168 else :
0169     print("L1 CscTF content of global tag ", useGlobalTag, " not requested to be printed")
0170 
0171 #
0172 
0173 if printL1Rpc == True :
0174     process.schedule.extend([process.printGTagL1Rpc])
0175     print("Printing L1 RPC content of global tag ", useGlobalTag)
0176 else :
0177     print("L1 RPC content of global tag ", useGlobalTag, " not requested to be printed")
0178 
0179 #
0180 
0181 if printL1Gmt == True :
0182     process.schedule.extend([process.printGTagL1Gmt])
0183     print("Printing L1 GMT content of global tag ", useGlobalTag)
0184 else :
0185     print("L1 GMT content of global tag ", useGlobalTag, " not requested to be printed")
0186 
0187 #
0188 
0189 if printL1Gt == True :
0190     process.schedule.extend([process.printGTagL1Gt])
0191     print("Printing L1 GT content of global tag ", useGlobalTag)
0192 else :
0193     print("L1 GT content of global tag ", useGlobalTag, " not requested to be printed")
0194  
0195 print('')
0196 
0197 
0198 # Message Logger
0199 process.load('FWCore.MessageService.MessageLogger_cfi')
0200 process.MessageLogger.debugModules = ['*']
0201 
0202 process.MessageLogger.cerr.threshold = 'DEBUG'
0203 #process.MessageLogger.cerr.threshold = 'INFO'
0204 #process.MessageLogger.cerr.threshold = 'WARNING'
0205 #process.MessageLogger.cerr.threshold = 'ERROR'
0206 
0207 process.MessageLogger.cerr.DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0208 process.MessageLogger.cerr.INFO = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0209 process.MessageLogger.cerr.WARNING = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0210 process.MessageLogger.cerr.ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0211