Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:31

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 global_tag='START53_V29B::All'
0004 
0005 #customize tag for SR. Empty string to use Global tag default:
0006 #use cmscond_list_iov -c frontier://FrontierProd/CMS_COND_34X_ECAL -P/afs/cern.ch/cms/DB/conddb -a | grep EcalSRSettings
0007 #and cmscond_list_iov -c frontier://FrontierPrep/CMS_COND_ECAL -P/afs/cern.ch/cms/DB/conddb -a | grep EcalSRSettings
0008 #to list available tags. connect string in process.GlobalTag.toGet accordingly to the prod/prep database.
0009 #sr_tag = ''                                    #takes setting from global tag
0010 #sr_tag = 'EcalSRSettings_beam2010_v01_mc'      #beam09/beam10 settings
0011 #sr_tag = 'EcalSRSettings_beam2010_v01_offline' #same as EcalSRSettings_beam2010_v01_mc 
0012 #sr_tag = 'EcalSRSettings_fullreadout_v01_mc'   #full readout / 2010 heavy ion setting
0013 #sr_tag  = 'EcalSRSettings_beam7TeV_v01_mc'      #thresholds of beam09/beam10 but with "optimized" weights
0014 #sr_tag = 'EcalSRSettings_lumi1e33_v01_mc'      #setting used in MC before June 2010 (settings estimated for 2.e33cm-2s-1)
0015 #sr_tag = 'EcalSRSettings_beam7TeV_v02_mc'       #optimized weights with 300MeV threshold in EE, 80MeV in EB. Candidate for beam11 run
0016 sr_tag = 'EcalSRSettings_beam2012_option1_v00_mc' #optimized weights with 360MeV threshold in EE, 96.25MeV in EB. Candidate for beam11 run
0017 
0018 process = cms.Process("ProcessOne")
0019 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0020 
0021 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
0022 #process.CondDBCommon.connect = 'sqlite_file:' + tag + '.db'
0023 #process.CondDBCommon.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
0024 
0025 process.MessageLogger = cms.Service("MessageLogger",
0026     debugModules = cms.untracked.vstring('*')
0027 )
0028 
0029 process.maxEvents = cms.untracked.PSet(
0030     input = cms.untracked.int32(1)
0031 )
0032 process.source = cms.Source("EmptySource")
0033 
0034 # Conditions
0035 #process.GlobalTag.globaltag = global_tag
0036 from Configuration.AlCa.GlobalTag import *
0037 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup')
0038 
0039 
0040 if sr_tag != '' :
0041     process.GlobalTag.toGet = cms.VPSet(
0042         cms.PSet(record = cms.string("EcalSRSettingsRcd"),
0043              tag = cms.string(sr_tag),
0044              connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_34X_ECAL")
0045 #              connect = cms.untracked.string("frontier://FrontierPrep/CMS_COND_ECAL")
0046 #             connect = cms.untracked.string('sqlite_file:' + sr_tag + '.db')
0047     ))
0048 
0049 
0050 
0051 ## process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0052 ##                                       process.CondDBCommon,
0053 ##                                       toGet = cms.VPSet(cms.PSet(
0054 ##     record = cms.string('EcalSRSettingsRcd'),
0055 ##     tag = cms.string(sr_tag)
0056 ##     )))
0057 
0058   
0059 
0060 process.readFromDB = cms.EDAnalyzer("EcalSRCondTools",
0061     mode = cms.string("read")
0062 )
0063 
0064 process.p = cms.Path(process.readFromDB)
0065