Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:38

0001 import FWCore.ParameterSet.Config as cms 
0002 
0003 process = cms.Process('TauJecSQLliteWriter') 
0004 
0005 process.source = cms.Source('EmptySource')
0006 
0007 process.maxEvents = cms.untracked.PSet(
0008     input = cms.untracked.int32(1)
0009 )
0010 
0011 process.load('CondCore.DBCommon.CondDBCommon_cfi')
0012 
0013 process.CondDBCommon.connect = 'sqlite_file:TauJec11_V1.db'
0014 
0015 payloads = [
0016     # generic tau-jet energy corrections parameters,
0017     # not specific to any reconstructed tau decay mode 
0018     'AK5tauHPSlooseCombDBcorr',
0019     # tau-jet energy corrections parameters specific to one-prong, no pi0 decay mode
0020     'AK5tauHPSlooseCombDBcorrOneProng0Pi0',
0021     # tau-jet energy corrections parameters specific to one-prong, one pi0 decay mode
0022     'AK5tauHPSlooseCombDBcorrOneProng1Pi0',
0023     # tau-jet energy corrections parameters specific to one-prong, two pi0 decay mode
0024     'AK5tauHPSlooseCombDBcorrOneProng2Pi0',
0025     # tau-jet energy corrections parameters specific to three-prong, no pi0 decay mode
0026     'AK5tauHPSlooseCombDBcorrThreeProng0Pi0'
0027 ]    
0028 
0029 process.dbWriterSequence = cms.Sequence()
0030 
0031 PoolDBOutputService_toPut = []
0032 
0033 for payload in payloads:
0034     dbWriter = cms.EDAnalyzer('JetCorrectorDBWriter', 
0035         era  = cms.untracked.string('TauJec11V1'), 
0036         algo = cms.untracked.string(payload) 
0037     )
0038     dbWriterName = "dbWriter%s" % payload
0039     setattr(process, dbWriterName, dbWriter)
0040     process.dbWriterSequence += getattr(process, dbWriterName)
0041 
0042     PoolDBOutputService_toPut.append(cms.PSet(
0043         record = cms.string(payload),
0044         tag    = cms.string('JetCorrectorParametersCollection_TauJec11_V1_%s' % payload), 
0045         label  = cms.string(payload)
0046     ))
0047 
0048 process.PoolDBOutputService = cms.Service('PoolDBOutputService', 
0049     process.CondDBCommon, 
0050     toPut = cms.VPSet(PoolDBOutputService_toPut)
0051 ) 
0052 
0053 process.p = cms.Path(process.dbWriterSequence)