Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-01 22:52:10

0001 from __future__ import print_function
0002 #
0003 # cfg file to run L1GtTrigReport on GT output file containing 
0004 #    the readout record L1GlobalTriggerReadoutRecord
0005 #    or
0006 #    the lite record L1GlobalTriggerRecord
0007 #
0008 # V M Ghete 2009-03-04
0009 
0010 
0011 import FWCore.ParameterSet.Config as cms
0012 import sys
0013 
0014 # process
0015 process = cms.Process('L1GtTrigReport')
0016 
0017 print('\n')
0018 from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
0019 if errorUserOptions == True :
0020     print('\nError returned by UserOptions_cff\n')
0021     sys.exit()
0022 
0023 
0024 # source according to data type
0025 if dataType == 'StreamFile' :
0026     process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0027 else :        
0028     process.source = cms.Source ('PoolSource', fileNames=readFiles, secondaryFileNames=secFiles)
0029 
0030 
0031 # number of events to be processed and source file
0032 process.maxEvents = cms.untracked.PSet(
0033     input=cms.untracked.int32(maxNumberEvents)
0034 )
0035 
0036 # load and configure modules via Global Tag
0037 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0038 
0039 process.load('Configuration.StandardSequences.GeometryDB_cff')
0040 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0041 
0042 process.GlobalTag.globaltag = useGlobalTag
0043 
0044 #
0045 # l1GtTrigReport module
0046 #
0047 
0048 process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
0049  
0050 # boolean flag to select the input record
0051 # if true, it will use L1GlobalTriggerRecord 
0052 #process.l1GtTrigReport.UseL1GlobalTriggerRecord = True
0053 
0054 # input tag for GT record: 
0055 #   GT emulator:    gtDigis (DAQ record)
0056 #   GT unpacker:    gtDigis (DAQ record)
0057 #   GT lite record: l1GtRecord 
0058 process.l1GtTrigReport.L1GtRecordInputTag = "simGtDigis"
0059 
0060 #process.l1GtTrigReport.PrintVerbosity = 2
0061 #process.l1GtTrigReport.PrintOutput = 1
0062 
0063 # for RAW data, run first the RAWTODIGI 
0064 if (dataType == 'RAW') and not (useRelValSample) :
0065     process.load('Configuration/StandardSequences/RawToDigi_Data_cff')
0066     process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
0067     process.p = cms.Path(process.RawToDigi+process.l1GtTrigReport)
0068 
0069 elif (dataType == 'RAW') and (useRelValSample) :
0070     process.load('Configuration/StandardSequences/RawToDigi_cff')
0071     process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
0072     process.p = cms.Path(process.RawToDigi+process.l1GtTrigReport)
0073     
0074 else :        
0075     # path to be run for RECO
0076     process.p = cms.Path(process.l1GtTrigReport)
0077 
0078 # Message Logger
0079 process.load('FWCore.MessageService.MessageLogger_cfi')
0080 process.MessageLogger.debugModules = ['l1GtTrigReport']
0081 
0082 #process.MessageLogger.cerr.threshold = 'DEBUG'
0083 process.MessageLogger.cerr.threshold = 'INFO'
0084 #process.MessageLogger.cerr.threshold = 'WARNING'
0085 #process.MessageLogger.cerr.threshold = 'ERROR'
0086 
0087 process.MessageLogger.cerr.DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) )
0088 process.MessageLogger.cerr.INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) )
0089 process.MessageLogger.cerr.WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) )
0090 process.MessageLogger.cerr.ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) )
0091 
0092 process.MessageLogger.cerr.L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0093 
0094 
0095 # summary
0096 process.options = cms.untracked.PSet(
0097     wantSummary=cms.untracked.bool(True)
0098 )
0099