Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:31

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 class config: pass
0004 config.runNumber = 1
0005 config.refTag = 'DT_noise_cosmic2009_V01_hlt'
0006 config.noiseDB = 'noise.db'
0007 config.dataset = '/SingleMu/Run2011A-DtCalib-v4/ALCARECO'
0008 config.outputdir = 'DQM'
0009 config.trial = 1
0010 
0011 # Further config.
0012 dataset_vec = config.dataset.split('/')
0013 config.workflowName = '/%s/%s-dtNoiseDBValidation-rev%d/%s' % (dataset_vec[1],
0014                                                                dataset_vec[2],
0015                                                                config.trial,
0016                                                                dataset_vec[3]) 
0017 
0018 process = cms.Process("DBValidation")
0019 
0020 process.MessageLogger = cms.Service("MessageLogger",
0021     debugModules = cms.untracked.vstring('dtNoiseAnalyzer'),
0022     cerr = cms.untracked.PSet(
0023         default = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0024         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0025         NoiseDbValidation = cms.untracked.PSet( limit = cms.untracked.int32(10000000) ),
0026         threshold = cms.untracked.string('DEBUG'),
0027     ),
0028     categories = cms.untracked.vstring('NoiseDBValidation'),
0029     destinations = cms.untracked.vstring('cerr')
0030 )
0031 
0032 
0033 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0034 process.load("Geometry.DTGeometry.dtGeometry_cfi")
0035 process.DTGeometryESModule.applyAlignment = False
0036 
0037 process.load("CondCore.DBCommon.CondDBSetup_cfi")
0038 process.load("DQMServices.Core.DQM_cfg")
0039 process.load("DQMServices.Components.DQMEnvironment_cfi")
0040 
0041 process.source = cms.Source("EmptySource",
0042     numberEventsInRun = cms.untracked.uint32(1),
0043     firstRun = cms.untracked.uint32(config.runNumber)
0044 )
0045 
0046 process.maxEvents = cms.untracked.PSet(
0047     input = cms.untracked.int32(1)
0048 )
0049 
0050 process.noiseRef = cms.ESSource("PoolDBESSource",
0051     process.CondDBSetup,
0052     connect = cms.string('oracle://cms_orcoff_prod/CMS_COND_31X_DT'),
0053     toGet = cms.VPSet(
0054     cms.PSet(
0055         record = cms.string('DTStatusFlagRcd'),
0056         tag = cms.string(config.refTag),
0057         label = cms.untracked.string('noiseRef')
0058     ), 
0059     cms.PSet(
0060         record = cms.string('DTStatusFlagRcd'),
0061         tag = cms.string('noise'),
0062         connect = cms.untracked.string('sqlite_file:%s' % config.noiseDB),
0063         label = cms.untracked.string('noiseToValidate')
0064     )),
0065 )
0066 process.noiseRef.DBParameters.authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0067 
0068 process.dtNoiseAnalyzer = cms.EDAnalyzer("DTnoiseDBValidation",
0069     labelDBRef = cms.string('noiseRef'),
0070     labelDB = cms.string('noiseToValidate'),
0071     diffTestName = cms.string('noiseDifferenceInRange'),
0072     wheelTestName = cms.string('noiseWheelOccInRange'),
0073     stationTestName = cms.string('noiseStationOccInRange'),
0074     sectorTestName = cms.string('noiseSectorOccInRange'),                                   
0075     #OutputFileName = cms.string('noiseDBValidation.root')
0076 )
0077 
0078 from DQMServices.Core.DQMQualityTester import DQMQualityTester
0079 process.qTester = DQMQualityTester(
0080     prescaleFactor = cms.untracked.int32(1),
0081     reportThreshold = cms.untracked.string('black'),
0082     qtList = cms.untracked.FileInPath('DQMOffline/CalibMuon/data/QualityTests.xml')
0083 )
0084 
0085 process.dqmSaver.convention = 'Offline'
0086 process.dqmSaver.workflow = config.workflowName
0087 process.dqmSaver.dirName = config.outputdir 
0088 process.DQM.collectorHost = ''
0089 
0090 #process.p = cms.Path(process.dtNoiseAnalyzer*process.qTester*process.dqmSaver)
0091 process.p = cms.Path(process.qTester*
0092                      process.dtNoiseAnalyzer*
0093                      process.dqmSaver)
0094