Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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