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("PixelDBReader")
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 ('payloadType',
0017                   "HLT",VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0018                   VarParsing.VarParsing.varType.string,          # string, int, or float
0019                   "what payload type should 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("FWCore.MessageService.MessageLogger_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.load("CondTools.SiPixel.SiPixelGainCalibrationService_cfi")
0036 
0037 process.TFileService = cms.Service("TFileService",
0038                                    fileName = cms.string("histo_GainsAll.root")
0039                                    )
0040 
0041 # There is no actual payload in DB associated with the SiPixelGainCalibrationRcd record
0042 # using the fake gain producer instead
0043 process.load("CalibTracker.SiPixelESProducers.SiPixelFakeGainESSource_cfi")
0044 
0045 process.maxEvents = cms.untracked.PSet(
0046     input = cms.untracked.int32(1)
0047 )
0048 process.source = cms.Source("EmptySource",
0049                             numberEventsInRun = cms.untracked.uint32(10),
0050                             firstRun = cms.untracked.uint32(options.firstRun)
0051                             )
0052 
0053 process.Timing = cms.Service("Timing")
0054 
0055 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0056     ignoreTotal = cms.untracked.int32(0)
0057 )
0058 
0059 
0060 process.load("CondCore.CondDB.CondDB_cfi")
0061 process.CondDB.connect = 'frontier://FrontierProd/CMS_CONDITIONS'
0062 process.CondDB.DBParameters.messageLevel = 2
0063 process.CondDB.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
0064 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0065                                       process.CondDB,
0066                                       BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0067                                       toGet = cms.VPSet(#cms.PSet(record = cms.string('SiPixelGainCalibrationRcd'),
0068                                                         #         tag = cms.string('GainCalibTestFull')
0069                                                         #     ), 
0070                                                         cms.PSet(record = cms.string('SiPixelGainCalibrationForHLTRcd'),
0071                                                                  tag = cms.string('SiPixelGainCalibrationHLT_2009runs_express')
0072                                                              ), 
0073                                                         cms.PSet(record = cms.string('SiPixelGainCalibrationOfflineRcd'),
0074                                                                  tag = cms.string('SiPixelGainCalibration_2009runs_express')
0075                                                              ))
0076                                        )
0077 process.prefer("PoolDBESSource")
0078 
0079 process.SiPixelCondObjAllPayloadsReader = cms.EDAnalyzer("SiPixelCondObjAllPayloadsReader",
0080                                                          process.SiPixelGainCalibrationServiceParameters,
0081                                                          payloadType = cms.string(options.payloadType)
0082                                                          )
0083 
0084 #process.print = cms.OutputModule("AsciiOutputModule")
0085 
0086 process.p = cms.Path(process.SiPixelCondObjAllPayloadsReader)
0087 #process.ep = cms.EndPath(process.print)
0088