Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("ProcessOne")
0004 
0005 import FWCore.ParameterSet.VarParsing as VarParsing
0006 options = VarParsing.VarParsing()
0007 options.register('conditionsDB',
0008                  'sqlite_file:SiPixelStatusScenarios_2017StuckTBM.db', #default value
0009                  VarParsing.VarParsing.multiplicity.singleton,
0010                  VarParsing.VarParsing.varType.string,
0011                  "input conditions DB")
0012 options.register('inputTag',
0013                  'SiPixelFEDChannelContainer_StuckTBM_2017_v1_mc', #default value
0014                  VarParsing.VarParsing.multiplicity.singleton,
0015                  VarParsing.VarParsing.varType.string,
0016                  "input conditions tag")
0017 options.parseArguments()
0018 
0019 ##
0020 ## MessageLogger
0021 ##
0022 process.load('FWCore.MessageService.MessageLogger_cfi')   
0023 process.MessageLogger.cerr.enable = False
0024 process.MessageLogger.SiPixelFEDChannelContainerTestReader=dict()  
0025 process.MessageLogger.SiPixelFEDChannelContainer=dict()  
0026 process.MessageLogger.cout = cms.untracked.PSet(
0027     enable    = cms.untracked.bool(True),
0028     enableStatistics = cms.untracked.bool(True),
0029     threshold = cms.untracked.string("INFO"),
0030     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),                       
0031     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0032                                    reportEvery = cms.untracked.int32(1000)
0033                                    ),                                                      
0034     SiPixelFEDChannelContainerTestReader = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0035     SiPixelFEDChannelContainer           = cms.untracked.PSet( limit = cms.untracked.int32(-1))
0036     )
0037 
0038 ##
0039 ## Empty Source
0040 ##
0041 process.source = cms.Source("EmptyIOVSource",
0042                             timetype = cms.string('runnumber'),
0043                             firstValue = cms.uint64(315708),
0044                             lastValue = cms.uint64(315708),
0045                             interval = cms.uint64(1)
0046                             )
0047 ##
0048 ## Get the payload
0049 ##
0050 from CondCore.CondDB.CondDB_cfi import *
0051 CondDBQualityCollection = CondDB.clone(connect = cms.string(options.conditionsDB))
0052 
0053 process.dbInput = cms.ESSource("PoolDBESSource",
0054                                CondDBQualityCollection,
0055                                toGet = cms.VPSet(cms.PSet(record = cms.string('SiPixelStatusScenariosRcd'),
0056                                                           tag = cms.string(options.inputTag) # choose tag you want
0057                                                           )
0058                                                  )
0059                                )
0060 ##
0061 ## Retrieve it and check it's available in the ES
0062 ##
0063 process.get = cms.EDAnalyzer("EventSetupRecordDataGetter",
0064                              toGet = cms.VPSet(cms.PSet(record = cms.string('SiPixelStatusScenariosRcd'),
0065                                                         data = cms.vstring('SiPixelFEDChannelContainer')
0066                                                         )
0067                                                ),
0068                              verbose = cms.untracked.bool(True)
0069                              )
0070 ##
0071 ## Read it back
0072 ##
0073 process.ReadDB = cms.EDAnalyzer("SiPixelFEDChannelContainerTestReader")
0074 process.ReadDB.printDebug = cms.untracked.bool(True)
0075 process.ReadDB.outputFile = cms.untracked.string('SiPixelFEDChannelContainer.log')
0076 
0077 process.p = cms.Path(process.get+process.ReadDB)