Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-30 04:13:22

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("SiStripQualityStatisticsSingleTag")
0005 
0006 #prepare options
0007 
0008 options = VarParsing.VarParsing("analysis")
0009 
0010 options.register ('tagName',
0011                   "NOTATAG",
0012                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0013                   VarParsing.VarParsing.varType.string,          # string, int, or float
0014                   "DB tag name")
0015 options.register ('runNumber',
0016                   1,
0017                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0018                   VarParsing.VarParsing.varType.int,          # string, int, or float
0019                   "Run Number")
0020 
0021 options.parseArguments()
0022 
0023 process.MessageLogger = cms.Service("MessageLogger",
0024     cout = cms.untracked.PSet(
0025         threshold = cms.untracked.string('WARNING')
0026     ),
0027     log_singletag = cms.untracked.PSet(
0028         threshold = cms.untracked.string('INFO'),
0029         default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0030         SiStripQualityStatistics = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0031     ),
0032     destinations = cms.untracked.vstring('log_singletag','cout'),
0033     categories = cms.untracked.vstring('SiStripQualityStatistics')
0034 )
0035 
0036 process.source = cms.Source("EmptyIOVSource",
0037     timetype = cms.string('runnumber'),
0038     firstValue= cms.uint64(options.runNumber),
0039     lastValue= cms.uint64(options.runNumber),
0040     interval = cms.uint64(1)
0041 )
0042 
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(1)
0045 )
0046 
0047 #-------------------------------------------------
0048 # Calibration
0049 #-------------------------------------------------
0050 process.load("Configuration.Geometry.GeometryIdeal_cff")   # needed because the GlobalTag is NOT used
0051 process.load("CondCore.DBCommon.CondDBCommon_cfi")   # needed because the GlobalTag is NOT used
0052 process.CondDBCommon.connect='frontier://FrontierProd/CMS_CONDITIONS'
0053 process.poolDBESSource=cms.ESSource("PoolDBESSource",
0054                                     process.CondDBCommon,
0055                                     BlobStreamerName=cms.untracked.string('TBufferBlobStreamingService'),
0056                                     toGet           =cms.VPSet(
0057     cms.PSet(
0058     record=cms.string('SiStripBadModuleRcd'),
0059     tag   =cms.string(options.tagName)
0060     )
0061     )
0062                                     )
0063 
0064 # Include masking #
0065 
0066 process.onlineSiStripQualityProducer = cms.ESProducer("SiStripQualityESProducer",
0067    appendToDataLabel = cms.string(''),
0068    PrintDebugOutput = cms.bool(False),
0069    PrintDebug = cms.untracked.bool(True),
0070    ListOfRecordToMerge = cms.VPSet(cms.PSet(
0071        record = cms.string('SiStripBadModuleRcd'),
0072        tag = cms.string('')
0073        )),
0074    UseEmptyRunInfo = cms.bool(False),
0075    ReduceGranularity = cms.bool(False),
0076 #   ThresholdForReducedGranularity = cms.double(0.3)
0077 )
0078 
0079 #-------------------------------------------------
0080 # Services for the TkHistoMap
0081 #-------------------------------------------------
0082 process.load("DQM.SiStripCommon.TkHistoMap_cff")
0083 
0084 from CalibTracker.SiStripQuality.siStripQualityStatistics_cfi import siStripQualityStatistics
0085 process.stat = siStripQualityStatistics.clone(
0086         TkMapFileName=cms.untracked.string("TkMapBadComponents_singleTag.png")  #available filetypes: .pdf .png .jpg .svg
0087         )
0088 
0089 process.p = cms.Path(process.stat)
0090 
0091