Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:51

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("test")
0003 
0004 ### event source
0005 process.source = cms.Source("EmptySource")
0006 
0007 ### set number of events
0008 process.maxEvents = cms.untracked.PSet(
0009     input = cms.untracked.int32(1000)
0010     )
0011 
0012 ######################################################################################
0013 ### include to get DQM histogramming services
0014 process.load("DQMServices.Core.DQM_cfg")
0015 process.DQMStore.verbose = 2
0016 
0017 ### include to get DQM environment (file saver and eventinfo module)
0018 process.load("DQMServices.Components.DQMEnvironment_cfi")
0019 
0020 ### replace YourSubsystemName by the name of your source ###
0021 ### use it for dqmEnv, dqmSaver ###
0022 process.dqmEnv.subSystemFolder = 'YourSubsystemName'
0023 
0024 ### optional parameters (defaults are different) ###
0025 ### Online environment
0026 process.dqmSaver.convention = 'Online'
0027 process.DQM.collectorHost = ''
0028 process.DQM.collectorPort = 9190
0029 
0030 ### path where to save the output file
0031 ### optionally change fileSaving conditions
0032 process.dqmSaver.dirName = '.'
0033 process.dqmSaver.saveByTime = 4
0034 process.dqmSaver.saveByLumiSection = -1
0035 process.dqmSaver.saveByMinute = 8
0036 process.dqmSaver.saveByRun = 1
0037 process.dqmSaver.saveAtJobEnd = True
0038 
0039 ######################################################################################
0040 ### include your reference file
0041 
0042 ######################################################################################
0043 ### set this in order to add up histograms that already exist
0044 
0045 ######################################################################################
0046 ### loading of root files into DQMStore (stripping out Run and RunSummary)
0047 process.load("DQMServices.Components.DQMFileReader_cfi")
0048 process.dqmFileReader.FileNames = cms.untracked.vstring ( 
0049        "file:ref.root",
0050        "file:ref.root",
0051        "file:ref.root"
0052        )
0053 
0054 ######################################################################################
0055 ###  DQM Source program (in DQMServices/Examples/src/DQMSourceExample.cc)
0056 process.dqmSource   = cms.EDAnalyzer("DQMSourceExample",
0057         monitorName = cms.untracked.string('YourSubsystemName'),
0058         prescaleEvt = cms.untracked.int32(1),
0059         prescaleLS  =  cms.untracked.int32(1)                    
0060 )
0061 
0062 ######################################################################################
0063 ### run the quality tests as defined in QualityTests.xml
0064 ### by default: the quality tests run at the end of each lumisection
0065 from DQMServices.Core.DQMQualityTester import DQMQualityTester
0066 process.qTester    = DQMQualityTester(
0067     qtList = cms.untracked.FileInPath('DQMServices/Examples/test/QualityTests.xml'),
0068     prescaleFactor = cms.untracked.int32(1),                               
0069     testInEventloop = cms.untracked.bool(False), #run on each event
0070     verboseQT =  cms.untracked.bool(True)                 
0071 )
0072 
0073 ######################################################################################
0074 ### include to get DQM histogramming services
0075 process.load("DQMServices.Components.DQMStoreStats_cfi")
0076 
0077 ######################################################################################
0078 ### DQM Client program (in DQMServices/Examples/src/DQMClientExample.cc)
0079 ### by default: the client runs at the end of each lumisection
0080 process.dqmClient = cms.EDAnalyzer("DQMClientExample",
0081     monitorName   = cms.untracked.string('YourSubsystemName'),
0082     QTestName     = cms.untracked.string('YRange'),                     
0083     prescaleEvt   = cms.untracked.int32(1),
0084     prescaleLS    =  cms.untracked.int32(1),                   
0085     clientOnEachEvent = cms.untracked.bool(False) #run client on each event
0086 )
0087 
0088 ######################################################################################
0089 ### MessageLogger
0090 process.MessageLogger = cms.Service("MessageLogger",
0091                #suppressWarning = cms.untracked.vstring('qTester')      
0092                destinations = cms.untracked.vstring('detailedInfo'),
0093                #debugModules = cms.untracked.vstring('*'),
0094                #detailedInfo = cms.untracked.PSet(
0095                #threshold = cms.untracked.string('DEBUG')
0096                #                )
0097 )
0098 
0099 ######################################################################################
0100 ### LogError Histogramming
0101 process.load("FWCore.Modules.logErrorHarvester_cfi")
0102 process.load("DQMServices.Components.DQMMessageLogger_cfi")
0103 
0104 
0105 ######################################################################################
0106 process.p = cms.Path(
0107                      process.dqmFileReader*
0108              process.dqmEnv*
0109                      process.dqmSource*
0110                      process.qTester*
0111              process.dqmStoreStats*
0112              process.dqmClient*
0113 #            process.logErrorHarvester*process.logErrorDQM*
0114              process.dqmSaver
0115             )