File indexing completed on 2024-04-06 12:08:32
0001 import FWCore.ParameterSet.Config as cms
0002 import os,sys,getopt,glob,cx_Oracle,subprocess
0003
0004 conn_str = os.path.expandvars("$CONFDB")
0005 conn = cx_Oracle.connect(conn_str)
0006 e = conn.cursor()
0007 e.execute('select RUNMODE from run where runnumber = RUNNUMBER')
0008 runmode = e.fetchall()
0009 runtype = -1;
0010 for result in runmode:
0011 runtype = int(result[0]);
0012 conn.close()
0013
0014 process = cms.Process("SiStripCommissioningOfflineDbClient")
0015
0016 process.load("DQM.SiStripCommon.MessageLogger_cfi")
0017
0018 process.load("DQM.SiStripCommon.DaqMonitorROOTBackEnd_cfi")
0019
0020 process.load("OnlineDB.SiStripConfigDb.SiStripConfigDb_cfi")
0021 process.SiStripConfigDb.UsingDb = True
0022 process.SiStripConfigDb.ConfDb = 'overwritten/by@confdb'
0023 process.SiStripConfigDb.Partitions.PrimaryPartition.PartitionName = 'DBPART'
0024 process.SiStripConfigDb.Partitions.PrimaryPartition.RunNumber = RUNNUMBER
0025 process.SiStripConfigDb.TNS_ADMIN = '/etc'
0026
0027
0028 process.source = cms.Source("EmptySource")
0029 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(2) )
0030
0031 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0032 process.load("Geometry.TrackerNumberingBuilder.trackerTopology_cfi")
0033 process.load("Geometry.TrackerGeometryBuilder.trackerParameters_cfi")
0034
0035 process.load("DQM.SiStripCommissioningDbClients.OfflineDbClient_cff")
0036 process.db_client.FilePath = cms.untracked.string('DATALOCATION')
0037 process.db_client.RunNumber = cms.untracked.uint32(RUNNUMBER)
0038 process.db_client.UseClientFile = cms.untracked.bool(CLIENTFLAG)
0039 process.db_client.UploadHwConfig = cms.untracked.bool(DBUPDATE)
0040 process.db_client.UploadAnalyses = cms.untracked.bool(ANALUPDATE)
0041 process.db_client.DisableDevices = cms.untracked.bool(DISABLEDEVICES)
0042 process.db_client.DisableBadStrips = cms.untracked.bool(DISABLEBADSTRIPS)
0043 process.db_client.SaveClientFile = cms.untracked.bool(SAVECLIENTFILE)
0044
0045 if runtype == 15:
0046 process.db_client.PartitionName = cms.string("DBPART")
0047
0048 process.db_client.ApvTimingParameters.SkipFecUpdate = cms.bool(True)
0049 process.db_client.ApvTimingParameters.SkipFedUpdate = cms.bool(False)
0050
0051 process.db_client.ApvTimingParameters.TargetDelay = cms.int32(-1)
0052
0053 process.db_client.OptoScanParameters.SkipGainUpdate = cms.bool(False)
0054
0055 process.db_client.PedestalsParameters.KeepStripsDisabled = cms.bool(True)
0056
0057 process.db_client.DaqScopeModeParameters.DisableBadStrips = cms.bool(False)
0058 process.db_client.DaqScopeModeParameters.KeepStripsDisabled = cms.bool(True)
0059 process.db_client.DaqScopeModeParameters.SkipPedestalUpdate = cms.bool(False)
0060 process.db_client.DaqScopeModeParameters.SkipTickUpdate = cms.bool(False)
0061
0062
0063 process.db_client.PedsFullNoiseParameters.DisableBadStrips = cms.bool(True)
0064 process.db_client.PedsFullNoiseParameters.KeepStripsDisabled = cms.bool(True)
0065 process.db_client.PedsFullNoiseParameters.UploadOnlyStripBadChannelBit = cms.bool(True)
0066 process.db_client.PedsFullNoiseParameters.SkipEmptyStrips = cms.bool(True)
0067 process.db_client.PedsFullNoiseParameters.UploadPedsFullNoiseDBTable = cms.bool(False)
0068
0069 process.p = cms.Path(process.db_client)