Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-20 00:21:32

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 # Process initialization
0005 from Configuration.Eras.Era_Run3_cff import Run3
0006 process = cms.Process('FED', Run3)
0007 
0008 unitTest = False
0009 if 'unitTest=True' in sys.argv:
0010     unitTest=True
0011 
0012 # Logging:
0013 process.MessageLogger = cms.Service(
0014     'MessageLogger',
0015     destinations = cms.untracked.vstring('cout'),
0016     cout = cms.untracked.PSet(threshold = cms.untracked.string('ERROR'))
0017                                    )
0018 
0019 # Global configuration
0020 
0021 # DQM Environment:
0022 process.load('DQMServices.Core.DQM_cfg')
0023 process.load('DQM.Integration.config.environment_cfi')
0024 # Global tag:
0025 process.load('DQM.Integration.config.FrontierCondition_GT_cfi')
0026 # Input:
0027 if unitTest:
0028     process.load("DQM.Integration.config.unittestinputsource_cfi")
0029     from DQM.Integration.config.unittestinputsource_cfi import options
0030 else:
0031     process.load('DQM.Integration.config.inputsource_cfi')
0032     from DQM.Integration.config.inputsource_cfi import options
0033 # Output:
0034 process.dqmEnv.subSystemFolder = 'FED'
0035 process.dqmSaver.tag = 'FED'
0036 process.dqmSaver.runNumber = options.runNumber
0037 process.dqmSaverPB.tag = 'FED'
0038 process.dqmSaverPB.runNumber = options.runNumber
0039 
0040 # Subsystem sequences
0041 
0042 # We will reuse the same foldername for all subsystems:
0043 folder_name = 'FEDIntegrity_EvF'
0044 
0045 # L1T sequence:
0046 process.load('DQM.L1TMonitor.L1TStage2FED_cff') # stage2 L1T
0047 path = 'L1T/%s/' % folder_name
0048 process.l1tStage2Fed.FEDDirName = cms.untracked.string(path)
0049 # Pixel sequence:
0050 process.load('Configuration.StandardSequences.MagneticField_cff')
0051 process.load('EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi')
0052 process.siPixelDigis.cpu.IncludeErrors = True
0053 process.load('DQM.SiPixelMonitorRawData.SiPixelMonitorHLT_cfi')
0054 process.SiPixelHLTSource.saveFile = False
0055 process.SiPixelHLTSource.slowDown = False
0056 path = 'Pixel/%s/' % folder_name
0057 process.SiPixelHLTSource.DirName = path
0058 process.load('Configuration.StandardSequences.GeometryRecoDB_cff') # ???
0059 # SiStrip sequence:
0060 process.load('DQM.SiStripMonitorHardware.siStripFEDCheck_cfi')
0061 path = 'SiStrip/%s/' % folder_name
0062 process.siStripFEDCheck.DirName = path
0063 # ECAL Preshower sequence:
0064 process.load('EventFilter.ESRawToDigi.esRawToDigi_cfi')
0065 process.load('DQM.EcalPreshowerMonitorModule.ESFEDIntegrityTask_cfi')
0066 process.ecalPreshowerFEDIntegrityTask.FEDDirName = folder_name
0067 # ECAL sequence --> Both ECAL Barrel and ECAL Endcap:
0068 process.load('Geometry.EcalMapping.EcalMapping_cfi')
0069 process.load('Geometry.EcalMapping.EcalMappingRecord_cfi')
0070 from EventFilter.EcalRawToDigi.EcalUnpackerData_cfi import ecalEBunpacker
0071 process.ecalDigis = ecalEBunpacker.clone()
0072 process.load('DQM.EcalMonitorTasks.EcalFEDMonitor_cfi')
0073 process.ecalFEDMonitor.folderName = folder_name
0074 # HCAL sequence:
0075 process.load('EventFilter.HcalRawToDigi.HcalRawToDigi_cfi')
0076 process.load('DQM.HcalTasks.hcalFEDIntegrityTask_cfi')
0077 path = 'Hcal/%s/' % folder_name
0078 process.hcalFEDIntegrityTask.DirName = path
0079 # DT sequence:
0080 process.load('DQM.DTMonitorModule.dtDataIntegrityTask_EvF_cff')
0081 process.dtDataIntegrityTask.processingMode = 'SM'
0082 path = 'DT/%s/' % folder_name
0083 process.dtDataIntegrityTask.fedIntegrityFolder = path
0084 process.dtDataIntegrityTask.dtFEDlabel     = 'dtunpacker'
0085 # RPC sequence:
0086 process.load('EventFilter.RPCRawToDigi.rpcUnpacker_cfi')
0087 process.load('DQM.RPCMonitorClient.RPCFEDIntegrity_cfi')
0088 path = 'RPC/%s/' % folder_name
0089 process.rpcFEDIntegrity.RPCPrefixDir = path
0090 # CSC sequence:
0091 process.load('DQM.CSCMonitorModule.csc_hlt_dqm_sourceclient_cfi')
0092 path = 'CSC/%s/' % folder_name
0093 process.cscDQMEvF.EventProcessor.FOLDER_EMU = path
0094 
0095 # Setting raw data collection label for all subsytem modules, depending on run type:
0096 if (process.runType.getRunType() == process.runType.hi_run):
0097     process.l1tStage2Fed.rawTag = 'rawDataRepacker'
0098     process.siPixelDigis.cpu.InputLabel = 'rawDataRepacker'
0099     process.SiPixelHLTSource.RawInput = 'rawDataRepacker'
0100     process.siStripFEDCheck.RawDataTag = 'rawDataRepacker'
0101     process.esRawToDigi.sourceTag = 'rawDataRepacker'
0102     process.ecalPreshowerFEDIntegrityTask.FEDRawDataCollection = 'rawDataRepacker'
0103     process.ecalDigis.InputLabel = 'rawDataRepacker'
0104     process.ecalFEDMonitor.FEDRawDataCollection = 'rawDataRepacker'
0105     process.hcalDigis.InputLabel = 'rawDataRepacker'
0106     process.dtunpacker.inputLabel = 'rawDataRepacker'
0107     process.rpcunpacker.InputLabel = 'rawDataRepacker'
0108     process.cscDQMEvF.InputObjects = 'rawDataRepacker'
0109 else:
0110     process.l1tStage2Fed.rawTag = 'rawDataCollector'
0111     process.siPixelDigis.cpu.InputLabel = 'rawDataCollector'
0112     process.SiPixelHLTSource.RawInput = 'rawDataCollector'
0113     process.siStripFEDCheck.RawDataTag = 'rawDataCollector'
0114     process.esRawToDigi.sourceTag = 'rawDataCollector'
0115     process.ecalPreshowerFEDIntegrityTask.FEDRawDataCollection = 'rawDataCollector'
0116     process.ecalDigis.InputLabel = 'rawDataCollector'
0117     process.ecalFEDMonitor.FEDRawDataCollection = 'rawDataCollector'
0118     process.hcalDigis.InputLabel = 'rawDataCollector'
0119     process.dtunpacker.inputLabel = 'rawDataCollector'
0120     process.rpcunpacker.InputLabel = 'rawDataCollector'
0121     process.cscDQMEvF.InputObjects = 'rawDataCollector'
0122 
0123 # Finaly the DQM FED sequence itself
0124 process.load('DQMServices.Components.DQMFEDIntegrityClient_cff')
0125 process.dqmFEDIntegrity.fedFolderName = folder_name
0126 
0127 # Sequences, paths and schedules:
0128 
0129 # Modules for the FED
0130 process.FEDModulesPath = cms.Path(
0131                                     process.l1tStage2Fed
0132                                   + process.siPixelDigis
0133                                   + process.SiPixelHLTSource
0134                                   + process.siStripFEDCheck
0135                                   + process.esRawToDigi
0136                                   + process.ecalPreshowerFEDIntegrityTask
0137                                   + process.ecalDigis
0138                                   + process.ecalFEDMonitor
0139                                   + process.hcalDigis
0140                                   + process.hcalFEDIntegrityTask
0141                                   + process.cscDQMEvF
0142                                   + process.dtunpacker
0143                                   + process.dtDataIntegrityTask
0144                                   + process.rpcunpacker
0145                                   + process.rpcFEDIntegrity
0146 
0147                                   + process.dqmFEDIntegrityClient 
0148                                  )
0149 
0150 # Standard DQM modules
0151 process.DQMmodulesPath = cms.Path(
0152                                     process.dqmEnv
0153                                   + process.dqmSaver
0154                                   + process.dqmSaverPB
0155                                  )
0156 
0157 process.schedule = cms.Schedule(
0158                                  process.FEDModulesPath, 
0159                                  process.DQMmodulesPath,
0160                                )
0161 
0162 # Finaly: DQM process customizations
0163 from DQM.Integration.config.online_customizations_cfi import *
0164 print("Final Source settings:", process.source)
0165 process = customise(process)