Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:26

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("test")
0005 
0006 ##
0007 ## prepare options
0008 ##
0009 options = VarParsing.VarParsing("analysis")
0010 
0011 options.register ('globalTag',
0012                   "auto:run3_data",VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0013                   VarParsing.VarParsing.varType.string,        # string, int, or float
0014                   "GlobalTag")
0015 
0016 options.register ('forHLT',
0017                   True,VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0018                   VarParsing.VarParsing.varType.bool,          # string, int, or float
0019                   "payload type to be used")
0020 
0021 options.register ('firstRun',
0022                   1,VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0023                   VarParsing.VarParsing.varType.int,          # string, int, or float
0024                   "first run to be processed")
0025 
0026 options.parseArguments()
0027 
0028 process.load("CondTools.SiPixel.SiPixelGainCalibrationService_cfi")
0029 
0030 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0031 from Configuration.AlCa.GlobalTag import GlobalTag
0032 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0033 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0034 
0035 process.insertNoisyandDead = cms.EDAnalyzer("SiPixelGainCalibrationRejectNoisyAndDead",
0036                                             record = cms.untracked.string('SiPixelGainCalibrationForHLTRcd' if(options.forHLT) else 'SiPixelGainCalibrationOfflineRcd'),
0037                                             debug = cms.untracked.bool(False)              
0038 )
0039 
0040 process.load("FWCore.MessageService.MessageLogger_cfi")
0041 
0042 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0043 
0044 process.source = cms.Source("EmptyIOVSource",
0045                             lastValue = cms.uint64(1),
0046                             timetype = cms.string('runnumber'),
0047                             firstValue = cms.uint64(options.firstRun),
0048                             interval = cms.uint64(1)
0049                             )
0050 
0051 #Input DB
0052 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0053     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0054     DBParameters = cms.PSet(
0055         messageLevel = cms.untracked.int32(10),
0056         authenticationPath = cms.untracked.string('.')
0057     ),
0058     toGet = cms.VPSet(cms.PSet(
0059         record = cms.string('SiPixelGainCalibrationForHLTRcd' if(options.forHLT) else 'SiPixelGainCalibrationOfflineRcd'),
0060         tag = cms.string('SiPixelGainCalibrationHLT_2009runs_express' if(options.forHLT) else 'SiPixelGainCalibration_2009runs_express')
0061     )),
0062     connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
0063 )
0064 
0065 #Output DB
0066 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0067     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0068     DBParameters = cms.PSet(
0069         messageLevel = cms.untracked.int32(10),
0070         authenticationPath = cms.untracked.string('.')
0071     ),
0072     toPut = cms.VPSet(
0073         cms.PSet(
0074             record = cms.string('SiPixelGainCalibrationForHLTRcd' if(options.forHLT) else 'SiPixelGainCalibrationOfflineRcd'),
0075             tag = cms.string('GainCalib_TEST_hlt' if(options.forHLT) else 'GainCalib_Offline_hlt')
0076     )),
0077     connect = cms.string('sqlite_file:SiPixelGainCalibrationRejectedNoisyAndDead.db')
0078 )
0079 
0080 process.prefer("PoolDBESSource")
0081 process.p = cms.Path(process.insertNoisyandDead)