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 DAQ data
0003 # the options set in "user choices" file
0004 #   L1Trigger/GlobalTriggerAnalyzer/python/UserOptions.py
0005  
0006 # V M Ghete 2009-04-03
0007 # V M Ghete 2011-02-09 use UserOptions.py
0008 
0009  
0010 import FWCore.ParameterSet.Config as cms
0011 import sys
0012 
0013 process = cms.Process("TestL1GtUnpacker")
0014 
0015 print('\n')
0016 from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
0017 if errorUserOptions == True :
0018     print('\nError returned by UserOptions_cff\n')
0019     sys.exit()
0020 
0021 # source according to data type
0022 if dataType == 'StreamFile' :
0023     process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0024 else :        
0025     process.source = cms.Source ('PoolSource', 
0026                                  fileNames=readFiles, 
0027                                  secondaryFileNames=secFiles,
0028                                  eventsToProcess = selectedEvents
0029                                  )
0030 
0031 
0032 # number of events to be processed and source file
0033 process.maxEvents = cms.untracked.PSet(
0034     input=cms.untracked.int32(maxNumberEvents)
0035 )
0036 
0037 
0038 # load and configure modules via Global Tag
0039 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0040 
0041 process.load("Configuration.StandardSequences.GeometryDB_cff")
0042 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0043 
0044 process.GlobalTag.globaltag = useGlobalTag
0045 
0046 # L1 GT/GMT unpack
0047 process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi")
0048 
0049 # input tag for GT readout collection (before CMSSW_5_0_X)
0050 #     source        = hardware record
0051 #
0052 #if useRelValSample == True :
0053 #    daqGtInputTag = 'rawDataCollector'
0054 #else :
0055 #    daqGtInputTag = 'rawDataCollector'
0056 
0057 daqGtInputTag = 'rawDataCollector'
0058 
0059 process.l1GtUnpack.DaqGtInputTag = daqGtInputTag
0060 #process.l1GtUnpack.DaqGtInputTag = 'l1GtTextToRaw'
0061 
0062 # Active Boards Mask
0063 
0064 # no board masked (default)
0065 #process.l1GtUnpack.ActiveBoardsMask = 0xFFFF
0066     
0067 # GTFE only in the record
0068 #process.l1GtUnpack.ActiveBoardsMask = 0x0000
0069 
0070 # GTFE + FDL 
0071 #process.l1GtUnpack.ActiveBoardsMask = 0x0001
0072      
0073 # GTFE + GMT 
0074 #process.l1GtUnpack.ActiveBoardsMask = 0x0100
0075 
0076 # GTFE + FDL + GMT 
0077 #process.l1GtUnpack.ActiveBoardsMask = 0x0101
0078 
0079 # BxInEvent to be unpacked
0080 # all available BxInEvent (default)
0081 #process.l1GtUnpack.UnpackBxInEvent = -1 
0082 
0083 # BxInEvent = 0 (L1A)
0084 #process.l1GtUnpack.UnpackBxInEvent = 1 
0085 
0086 # 3 BxInEvent (F, 0, 1)  
0087 #process.l1GtUnpack.UnpackBxInEvent = 3 
0088 
0089 # set it to verbose
0090 process.l1GtUnpack.Verbosity = cms.untracked.int32(1)
0091 
0092 #
0093 # l1GtTrigReport module
0094 #
0095 
0096 process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
0097  
0098 # boolean flag to select the input record
0099 # if true, it will use L1GlobalTriggerRecord 
0100 #process.l1GtTrigReport.UseL1GlobalTriggerRecord = True
0101 
0102 # input tag for GT record: 
0103 #   GT emulator:    gtDigis (DAQ record)
0104 #   GT unpacker:    gtDigis (DAQ record)
0105 #   GT lite record: l1GtRecord 
0106 process.l1GtTrigReport.L1GtRecordInputTag = "l1GtUnpack"
0107 
0108 #process.l1GtTrigReport.PrintVerbosity = 10
0109 
0110 # print output: 0 = std::cout; 1 = LogTrace; 2 = LogVerbatim; 3 = LogInfo
0111 #process.l1GtTrigReport.PrintOutput = 0
0112 
0113 
0114 # path to be run
0115 process.p = cms.Path(process.l1GtUnpack*process.l1GtTrigReport)
0116 
0117 # Message Logger
0118 process.load('FWCore.MessageService.MessageLogger_cfi')
0119 process.MessageLogger.debugModules = ['l1GtUnpack', 'l1GtTrigReport']
0120 process.MessageLogger.cerr.enable = False
0121 
0122 process.MessageLogger.files.L1GtUnpacker_errors = cms.untracked.PSet( 
0123         threshold = cms.untracked.string('ERROR'),
0124         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0125         L1GlobalTriggerRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0126        )
0127 
0128 process.MessageLogger.files.L1GtUnpacker_warnings = cms.untracked.PSet( 
0129         threshold = cms.untracked.string('WARNING'),
0130         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0131         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0132         L1GlobalTriggerRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0133         )
0134 
0135 process.MessageLogger.files.L1GtUnpacker_info = cms.untracked.PSet( 
0136         threshold = cms.untracked.string('INFO'),
0137         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0138         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0139         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0140         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0141         )
0142 
0143 process.MessageLogger.files.L1GtUnpacker = cms.untracked.PSet( 
0144         threshold = cms.untracked.string('DEBUG'),
0145         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0146         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0147         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0148         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0149         L1GlobalTriggerRawToDigi = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0150         )
0151 
0152 
0153 # summary
0154 process.options = cms.untracked.PSet(
0155     wantSummary = cms.untracked.bool(True)
0156 )
0157 
0158 # output 
0159 
0160 process.outputL1GtUnpack = cms.OutputModule("PoolOutputModule",
0161     fileName = cms.untracked.string('L1GtUnpacker.root'),
0162     # keep only unpacked data in the ROOT file
0163     outputCommands = cms.untracked.vstring('drop *', 
0164         'keep *_l1GtUnpack_*_*')
0165 )
0166 
0167 process.outpath = cms.EndPath(process.outputL1GtUnpack)
0168