Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-13 23:03:04

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import sys
0004 from Configuration.Eras.Era_Run3_cff import Run3
0005 process = cms.Process('CTPPSDQM', Run3)
0006 
0007 test = False
0008 unitTest = False
0009 
0010 if 'unitTest=True' in sys.argv:
0011   unitTest=True
0012 
0013 # event source
0014 if unitTest:
0015   process.load("DQM.Integration.config.unittestinputsource_cfi")
0016   from DQM.Integration.config.unittestinputsource_cfi import options
0017 elif not test:
0018   # for live online DQM in P5
0019   process.load("DQM.Integration.config.inputsource_cfi")
0020   from DQM.Integration.config.inputsource_cfi import options
0021 else:
0022   # for testing in lxplus
0023   process.load("DQM.Integration.config.fileinputsource_cfi")
0024   from DQM.Integration.config.fileinputsource_cfi import options
0025   process.source.fileNames = cms.untracked.vstring(
0026     #"root://eoscms.cern.ch//eos/cms/store/group/phys_pps/sw_test_input/001D08EE-C4B1-E711-B92D-02163E013864.root"
0027     #"/store/express/Run2016H/ExpressPhysics/FEVT/Express-v2/000/283/877/00000/4EE44B0E-2499-E611-A155-02163E011938.root"
0028     "/store/data/Run2017B/SingleMuon/RAW/v1/000/297/050/00000/30346DF0-0153-E711-BBC7-02163E01437C.root"
0029   )
0030   process.source.inputCommands = cms.untracked.vstring(
0031     'drop *',
0032     'keep FEDRawDataCollection_*_*_*'
0033   )
0034 
0035 # DQM environment
0036 process.load("DQM.Integration.config.environment_cfi")
0037 process.dqmEnv.subSystemFolder = 'CTPPS'
0038 process.dqmSaver.tag = 'CTPPS'
0039 process.dqmSaver.runNumber = options.runNumber
0040 process.dqmSaverPB.tag = 'CTPPS'
0041 process.dqmSaverPB.runNumber = options.runNumber
0042 
0043 if test:
0044   process.dqmSaver.path = "."
0045   process.dqmSaverPB.path = "./pb"
0046 
0047 process.load("DQMServices.Components.DQMProvInfo_cfi")
0048 
0049 # message logger
0050 process.MessageLogger = cms.Service("MessageLogger",
0051   destinations = cms.untracked.vstring('cout'),
0052   cout = cms.untracked.PSet(threshold = cms.untracked.string('WARNING'))
0053 )
0054 
0055 # global tag - conditions for P5 cluster
0056 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0057 
0058 # raw-to-digi conversion
0059 process.load("EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff")
0060 
0061 # loading Meta tags used by commonDQM
0062 process.load('EventFilter.OnlineMetaDataRawToDigi.onlineMetaDataRawToDigi_cfi')
0063 process.onlineMetaDataDigis = cms.EDProducer('OnlineMetaDataRawToDigi')
0064 
0065 
0066 # local RP reconstruction chain with standard settings
0067 process.load("RecoPPS.Configuration.recoCTPPS_cff")
0068 
0069 # DQM Modules
0070 process.load("DQM.CTPPS.ctppsDQM_cff")
0071 
0072 # processing path
0073 process.recoStep = cms.Sequence(
0074   process.ctppsRawToDigi *
0075   process.onlineMetaDataDigis *
0076   process.recoCTPPS
0077 )
0078 
0079 process.dqmModules = cms.Sequence(
0080   process.ctppsDQMOnlineSource +
0081   process.ctppsDQMOnlineHarvest
0082 )
0083 
0084 process.dqmModulesCalibration = cms.Sequence(
0085   process.ctppsDQMCalibrationSource +
0086   process.ctppsDQMCalibrationHarvest
0087 )
0088 
0089 process.path = cms.Path(
0090   process.recoStep *
0091 
0092   # here: (un)comment to switch between normal and calibration mode
0093   process.dqmModules *
0094   #process.dqmModulesCalibration *
0095 
0096   process.dqmEnv *
0097   process.dqmSaver *
0098   process.dqmSaverPB
0099 )
0100 
0101 process.schedule = cms.Schedule(process.path)
0102 
0103 process.dqmProvInfo.runType = process.runType.getRunTypeName()
0104 
0105 # Process customizations included here
0106 from DQM.Integration.config.online_customizations_cfi import *
0107 print("Final Source settings:", process.source)
0108 process = customise(process)