Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-17 02:42:00

0001 ##### configuration #####
0002 input_conditions = 'sqlite_file:association_config.db'  # input database
0003 run_number = 1  # used to select the IOV
0004 db_tag = 'PPSAssociationCuts_test'  # database tag
0005 #########################
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process("retrievePPSAssociationConfig")
0010 
0011 # Message Logger
0012 process.MessageLogger = cms.Service("MessageLogger",
0013                                     destinations = cms.untracked.vstring('cout'),
0014                                     cout = cms.untracked.PSet(
0015                                         threshold = cms.untracked.string('INFO')
0016                                     )
0017                                     )
0018 
0019 
0020 # Load CondDB service
0021 process.load("CondCore.CondDB.CondDB_cfi")
0022 
0023 # input database (in this case the local sqlite file)
0024 process.CondDB.connect = input_conditions
0025 
0026 # A data source must always be defined. We don't need it, so here's a dummy one.
0027 process.source = cms.Source("EmptyIOVSource",
0028                             timetype = cms.string('runnumber'),
0029                             firstValue = cms.uint64(run_number),
0030                             lastValue = cms.uint64(run_number),
0031                             interval = cms.uint64(1)
0032                             )
0033 
0034 # input service
0035 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0036                                       process.CondDB,
0037                                       toGet = cms.VPSet(cms.PSet(
0038                                           record = cms.string('PPSAssociationCutsRcd'),
0039                                           tag = cms.string(db_tag)
0040                                       ))
0041                                       )
0042 
0043 # DB object retrieve module
0044 process.retrieve_config = cms.EDAnalyzer("RetrievePPSAssociationCuts",
0045                                          toGet = cms.VPSet(cms.PSet(
0046                                              record = cms.string('PPSAssociationCutsRcd'),
0047                                              data = cms.vstring('PPSAssociationCuts')
0048                                          )),
0049                                          verbose = cms.untracked.bool(True)
0050                                          )
0051 
0052 process.path = cms.Path(process.retrieve_config)