Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-29 23:10:37

0001 from __future__ import print_function
0002 #
0003 # cfg file to unpack RAW L1 GT EVM data
0004  
0005 # V M Ghete 2009-04-03
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 # process
0010 process = cms.Process('TestL1GtEvmUnpacker')
0011 
0012 print('\n')
0013 from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
0014 if errorUserOptions == True :
0015     print('\nError returned by UserOptions_cff\n')
0016     sys.exit()
0017 
0018 
0019 # source according to data type
0020 if dataType == 'StreamFile' :
0021     process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0022 else :        
0023     process.source = cms.Source ('PoolSource', 
0024                                  fileNames=readFiles, 
0025                                  secondaryFileNames=secFiles,
0026                                  eventsToProcess = selectedEvents
0027                                  )
0028 
0029 
0030 # number of events to be processed and source file
0031 process.maxEvents = cms.untracked.PSet(
0032     input=cms.untracked.int32(maxNumberEvents)
0033 )
0034 
0035 # load and configure modules via Global Tag
0036 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0037 
0038 process.load("Configuration.StandardSequences.GeometryDB_cff")
0039 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0040 
0041 process.GlobalTag.globaltag = useGlobalTag
0042 
0043 # L1 GT/GMT EvmUnpack
0044 process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi")
0045 
0046 # input tag for GT readout collection (before CMSSW_5_0_X)
0047 #     source        = hardware record
0048 #
0049 #if useRelValSample == True :
0050 #    evmGtInputTag = 'rawDataCollector'
0051 #else :
0052 #    evmGtInputTag = 'rawDataCollector'
0053 
0054 evmGtInputTag = 'rawDataCollector'
0055 
0056 process.l1GtEvmUnpack.EvmGtInputTag = evmGtInputTag
0057 
0058 # Active Boards Mask
0059 
0060 # no board masked (default)
0061 #process.l1GtEvmUnpack.ActiveBoardsMask = 0xFFFF
0062     
0063 # GTFE only in the record
0064 #process.l1GtEvmUnpack.ActiveBoardsMask = 0x0000
0065      
0066 
0067 # BxInEvent to be EvmUnpacked
0068 # all available BxInEvent (default)
0069 #process.l1GtEvmUnpack.UnpackBxInEvent = -1 
0070 
0071 # BxInEvent = 0 (L1A)
0072 #process.l1GtEvmUnpack.UnpackBxInEvent = 1 
0073 
0074 # 3 BxInEvent (F, 0, 1)  
0075 #process.l1GtEvmUnpack.UnpackBxInEvent = 3 
0076 
0077 # length of BST message (in bytes)
0078 # if negative, take it from event setup
0079 #process.l1GtEvmUnpack.BstLengthBytes = 52
0080 
0081 # set it to verbose
0082 process.l1GtEvmUnpack.Verbosity = cms.untracked.int32(1)
0083 
0084 
0085 # path to be run
0086 process.p = cms.Path(process.l1GtEvmUnpack)
0087 
0088 # Message Logger
0089 process.load('FWCore.MessageService.MessageLogger_cfi')
0090 process.MessageLogger.debugModules = ['l1GtEvmUnpack', 'l1GtTrigReport']
0091 process.MessageLogger.cerr.enable = False
0092 
0093 process.MessageLogger.files.L1GtEvmUnpacker_errors = cms.untracked.PSet( 
0094         threshold = cms.untracked.string('ERROR'),
0095         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0096         L1GlobalTriggerEvmRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0097        )
0098 
0099 process.MessageLogger.files.L1GtEvmUnpacker_warnings = cms.untracked.PSet( 
0100         threshold = cms.untracked.string('WARNING'),
0101         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0102         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0103         L1GlobalTriggerEvmRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0104         )
0105 
0106 process.MessageLogger.files.L1GtEvmUnpacker_info = cms.untracked.PSet( 
0107         threshold = cms.untracked.string('INFO'),
0108         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0109         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0110         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0111         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0112         )
0113 
0114 process.MessageLogger.files.L1GtEvmUnpacker = cms.untracked.PSet( 
0115         threshold = cms.untracked.string('DEBUG'),
0116         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0117         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0118         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0119         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0120         L1GlobalTriggerEvmRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0121         )
0122 
0123 # summary
0124 process.options = cms.untracked.PSet(
0125     wantSummary = cms.untracked.bool(True)
0126 )
0127 
0128 # output 
0129 
0130 process.outputL1GtEvmUnpack = cms.OutputModule("PoolOutputModule",
0131     fileName = cms.untracked.string('L1GtEvmUnpacker.root'),
0132     # keep only unpacked data in the ROOT file
0133     outputCommands = cms.untracked.vstring('drop *', 
0134         'keep *_l1GtEvmUnpack_*_*')
0135 )
0136 
0137 process.outpath = cms.EndPath(process.outputL1GtEvmUnpack)