Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:53

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