Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:30

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 process = cms.Process("SiPixelGenErrorDBObjectReaderTest")
0005 process.load("CondCore.DBCommon.CondDBSetup_cfi")
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 process.load("Configuration.StandardSequences.MagneticField_cff")
0008 # process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0009 
0010 process.source = cms.Source("EmptySource")
0011 
0012 process.maxEvents = cms.untracked.PSet(
0013     input = cms.untracked.int32(1)
0014     )
0015 
0016 testGlobalTag = False
0017 if testGlobalTag :
0018 #old DB, to be removed soon
0019 #    process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0020 #    process.GlobalTag.globaltag = "GR_R_72_V5::All"
0021 #    process.GlobalTag.globaltag = "POSTLS172_V9::All"
0022 #    process.GlobalTag.globaltag = "DESIGN72_V5::All"
0023 #    process.GlobalTag.globaltag = "MC_72_V3::All"
0024 #    process.GlobalTag.globaltag = "START72_V3::All"
0025 
0026 #use GTs without ::All with the next line
0027     process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0028     from Configuration.AlCa.autoCond import autoCond
0029     #use autocond, see:
0030     #https://github.com/cms-sw/cmssw/blob/CMSSW_7_3_X/Configuration/AlCa/python/autoCond.py
0031     #process.GlobalTag.globaltag = autoCond['run2_data']
0032     process.GlobalTag.globaltag = autoCond['run2_mc']
0033     #or set GT by hand
0034     process.GlobalTag.globaltag = "GR_R_72_V5"
0035 
0036     
0037 # for local sqlite files
0038 else:
0039     process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0040         process.CondDBSetup,
0041         toGet = cms.VPSet(
0042           cms.PSet(
0043             record = cms.string('SiPixelGenErrorDBObjectRcd'),
0044 #            tag = cms.string('SiPixelGenErrorDBObject38TV10')
0045             tag = cms.string('SiPixelGenErrorDBObject38Tv1')
0046           )),
0047         timetype = cms.string('runnumber'),
0048         #connect = cms.string('sqlite_file:../../../../../DB/siPixelGenErrors38T_v1_mc.db')
0049         #connect = cms.string('sqlite_file:../../../../../DB/siPixelGenErrors38T_2012_IOV7_v1.db')
0050         connect = cms.string('sqlite_file:siPixelGenErrors38Tv1.db')
0051     )
0052     process.PoolDBESSource.DBParameters.authenticationPath='.'
0053     process.PoolDBESSource.DBParameters.messageLevel=0
0054 
0055 
0056 process.reader = cms.EDAnalyzer("SiPixelGenErrorDBObjectReader",
0057 #                     siPixelGenErrorCalibrationLocation = cms.string("./"),
0058                      siPixelGenErrorCalibrationLocation = cms.string(""),
0059 #Change to True if you would like a more detailed error output
0060 #wantDetailedOutput = False
0061 #Change to True if you would like to output the full GenError database object
0062 #wantFullOutput = False
0063                      wantDetailedGenErrorDBErrorOutput = cms.bool(True),
0064                      wantFullGenErrorDBOutput = cms.bool(True)
0065                  )
0066 
0067 process.p = cms.Path(process.reader)
0068 
0069 
0070 
0071 
0072 
0073