CMS 3D CMS Logo

dtNoiseDBValidation_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 class config: pass
4 config.runNumber = 1
5 config.refTag = 'DT_noise_cosmic2009_V01_hlt'
6 config.noiseDB = 'noise.db'
7 config.dataset = '/SingleMu/Run2011A-DtCalib-v4/ALCARECO'
8 config.outputdir = 'DQM'
9 config.trial = 1
10 
11 # Further config.
12 dataset_vec = config.dataset.split('/')
13 config.workflowName = '/%s/%s-dtNoiseDBValidation-rev%d/%s' % (dataset_vec[1],
14  dataset_vec[2],
15  config.trial,
16  dataset_vec[3])
17 
18 process = cms.Process("DBValidation")
19 
20 process.MessageLogger = cms.Service("MessageLogger",
21  debugModules = cms.untracked.vstring('dtNoiseAnalyzer'),
22  cerr = cms.untracked.PSet(
23  default = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
24  DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
25  NoiseDbValidation = cms.untracked.PSet( limit = cms.untracked.int32(10000000) ),
26  threshold = cms.untracked.string('DEBUG'),
27  ),
28  categories = cms.untracked.vstring('NoiseDBValidation'),
29  destinations = cms.untracked.vstring('cerr')
30 )
31 
32 
33 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
34 process.load("Geometry.DTGeometry.dtGeometry_cfi")
35 process.DTGeometryESModule.applyAlignment = False
36 
37 process.load("CondCore.DBCommon.CondDBSetup_cfi")
38 process.load("DQMServices.Core.DQM_cfg")
39 process.load("DQMServices.Components.DQMEnvironment_cfi")
40 
41 process.source = cms.Source("EmptySource",
42  numberEventsInRun = cms.untracked.uint32(1),
43  firstRun = cms.untracked.uint32(config.runNumber)
44 )
45 
46 process.maxEvents = cms.untracked.PSet(
47  input = cms.untracked.int32(1)
48 )
49 
50 process.noiseRef = cms.ESSource("PoolDBESSource",
51  process.CondDBSetup,
52  connect = cms.string('oracle://cms_orcoff_prod/CMS_COND_31X_DT'),
53  toGet = cms.VPSet(
54  cms.PSet(
55  record = cms.string('DTStatusFlagRcd'),
56  tag = cms.string(config.refTag),
57  label = cms.untracked.string('noiseRef')
58  ),
59  cms.PSet(
60  record = cms.string('DTStatusFlagRcd'),
61  tag = cms.string('noise'),
62  connect = cms.untracked.string('sqlite_file:%s' % config.noiseDB),
63  label = cms.untracked.string('noiseToValidate')
64  )),
65 )
66 process.noiseRef.DBParameters.authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
67 
68 process.dtNoiseAnalyzer = cms.EDAnalyzer("DTnoiseDBValidation",
69  labelDBRef = cms.string('noiseRef'),
70  labelDB = cms.string('noiseToValidate'),
71  diffTestName = cms.string('noiseDifferenceInRange'),
72  wheelTestName = cms.string('noiseWheelOccInRange'),
73  stationTestName = cms.string('noiseStationOccInRange'),
74  sectorTestName = cms.string('noiseSectorOccInRange'),
75  #OutputFileName = cms.string('noiseDBValidation.root')
76 )
77 
78 process.qTester = cms.EDAnalyzer("QualityTester",
79  prescaleFactor = cms.untracked.int32(1),
80  reportThreshold = cms.untracked.string('black'),
81  qtList = cms.untracked.FileInPath('DQMOffline/CalibMuon/data/QualityTests.xml')
82 )
83 
84 process.DQMStore.referenceFileName = ''
85 process.dqmSaver.convention = 'Offline'
86 process.dqmSaver.workflow = config.workflowName
87 process.dqmSaver.dirName = config.outputdir
88 process.DQMStore.collateHistograms = False
89 process.DQM.collectorHost = ''
90 
91 #process.p = cms.Path(process.dtNoiseAnalyzer*process.qTester*process.dqmSaver)
92 process.p = cms.Path(process.qTester*
93  process.dtNoiseAnalyzer*
94  process.dqmSaver)
95