Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
import FWCore.ParameterSet.Config as cms

process = cms.Process("Test")
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1)
)
process.source = cms.Source("EmptySource",
#    lastRun = cms.untracked.uint32(1),
#    timetype = cms.string('runnumber'),
#    interval = cms.uint32(1),
    firstRun = cms.untracked.uint32(1)
)


process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string("siPixelLorentzAngle_histo.root")
                                   )


process.MessageLogger = cms.Service("MessageLogger",
    cerr = cms.untracked.PSet(
        enable = cms.untracked.bool(False)
    ),
    cout = cms.untracked.PSet(
        enable = cms.untracked.bool(True),
        threshold = cms.untracked.string('WARNING')
    )
)

process.Timing = cms.Service("Timing")

process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.autoCond import autoCond
process.GlobalTag.globaltag = autoCond['run2_design']
#In case you of conditions missing, or if you want to test a specific GT
#process.GlobalTag.globaltag = 'PRE_DES72_V6'

print(process.GlobalTag.globaltag)
process.load("Configuration.StandardSequences.GeometryDB_cff")

#process.load("Configuration.StandardSequences.GeometryIdeal_cff")

process.QualityReader = cms.ESSource("PoolDBESSource",
#    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
    DBParameters = cms.PSet(
        messageLevel = cms.untracked.int32(0),
        authenticationPath = cms.untracked.string('')
    ),
    toGet = cms.VPSet(
		cms.PSet(
			record = cms.string("SiPixelLorentzAngleRcd"),
			#tag = cms.string("trivial_LorentzAngle")
			#tag = cms.string("SiPixelLorentzAngle_v1")
			tag = cms.string("SiPixelLorentzAngle_2015_v2")
		),
#		cms.PSet(
#			record = cms.string("SiPixelLorentzAngleSimRcd"),
#			tag = cms.string("trivial_LorentzAngle_Sim")
#		)
	),
    connect = cms.string('sqlite_file:siPixelLorentzAngle.db')
    #connect = cms.string('sqlite_file:prova_LA_2012_IOV7.db')
    #connect = cms.string('sqlite_file:/afs/cern.ch/user/h/hidaspal/public/tracker/SiPixelLorentzAngle/pixelLorentzAngle_original_private_production_stuff/mytest/prova_LA_2012_IOV7.db')
)

process.es_prefer_QualityReader = cms.ESPrefer("PoolDBESSource","QualityReader")

process.LorentzAngleReader = cms.EDAnalyzer("SiPixelLorentzAngleReader",
    printDebug = cms.untracked.uint32(10),
    useSimRcd = cms.bool(False),
    recoLabel = cms.string(""),
    simLabel = cms.string("")
)

process.LorentzAngleSimReader = cms.EDAnalyzer("SiPixelLorentzAngleReader",
    printDebug = cms.untracked.uint32(10),
    useSimRcd = cms.bool(True),
    recoLabel = cms.string(""),
    simLabel = cms.string("")
)


#process.p = cms.Path(process.LorentzAngleReader*process.LorentzAngleSimReader)
process.p = cms.Path(process.LorentzAngleReader)