Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #! /usr/bin/env cmsRun
0002 # Author: Marco Musich (May 2020)
0003 from __future__ import print_function
0004 import os, shlex, shutil, getpass
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 process = cms.Process("TEST")
0008 
0009 ###################################################################
0010 # Messages
0011 ###################################################################
0012 process.load('FWCore.MessageService.MessageLogger_cfi')   
0013 process.MessageLogger.cerr.enable = False
0014 process.MessageLogger.SiPhase2OuterTrackerLorentzAngleWriter=dict()  
0015 process.MessageLogger.SiPhase2OuterTrackerLorentzAngle=dict()
0016 process.MessageLogger.cout = cms.untracked.PSet(
0017     enable    = cms.untracked.bool(True),
0018     enableStatistics = cms.untracked.bool(True),
0019     threshold = cms.untracked.string("INFO"),
0020     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),                       
0021     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0022                                    reportEvery = cms.untracked.int32(1000)
0023                                    ),                                                      
0024   SiPhase2OuterTrackerLorentzAngleWriter = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0025   SiPhase2OuterTrackerLorentzAngle = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0026 )
0027 
0028 tag = 'SiPhase2OuterTrackerLorentzAngle_T15'
0029 suffix = 'v0'
0030 outfile = tag+'_'+suffix+'.db'
0031 outdb = 'sqlite_file:'+outfile
0032 
0033 if os.path.exists(outfile):
0034   oldfile = outfile.replace(".db","_old.db")
0035   print(">>> Backing up locally existing '%s' -> '%s'"%(outfile,oldfile))
0036   shutil.move(outfile,oldfile)
0037 
0038 process.load("CondCore.CondDB.CondDB_cfi")
0039 process.CondDB.connect = cms.string(outdb)
0040 
0041 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0042 process.load('Configuration.Geometry.GeometryExtended2026D49_cff')
0043 
0044 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0045 from Configuration.AlCa.GlobalTag import GlobalTag
0046 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic')
0047 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0048 
0049 process.source = cms.Source("EmptyIOVSource",
0050     lastValue = cms.uint64(1),
0051     timetype = cms.string('Run'),
0052     firstValue = cms.uint64(1),
0053     interval = cms.uint64(1)
0054 )
0055 
0056 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0057     process.CondDB,
0058     timetype = cms.untracked.string('Run'),
0059     toPut = cms.VPSet(cms.PSet(
0060         record = cms.string('SiPhase2OuterTrackerLorentzAngleRcd'),
0061         tag = cms.string(tag)
0062     ))
0063 )
0064 
0065 process.LAPayload = cms.EDAnalyzer("SiPhase2OuterTrackerLorentzAngleWriter")
0066 process.LAPayload.tag = cms.string(tag)
0067 
0068 process.p = cms.Path(process.LAPayload)
0069