1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
5 import os,sys,getopt,glob,cx_Oracle,subprocess
7 cmsswbase = os.path.expandvars(
"$CMSSW_BASE/")
8 inputPath =
'/raid/fff'
10 conn_str = os.path.expandvars(
"$CONFDB")
11 conn = cx_Oracle.connect(conn_str)
13 e.execute(
'select RUNMODE from run where runnumber = RUNNUMBER')
14 runmode = e.fetchall()
16 for result
in runmode:
17 runtype =
int(result[0]);
20 process = cms.Process(
"SRCEDM")
22 process.load(
"DQM.SiStripCommon.MessageLogger_cfi")
23 process.load(
"DQM.SiStripCommon.DaqMonitorROOTBackEnd_cfi")
25 process.load(
"OnlineDB.SiStripConfigDb.SiStripConfigDb_cfi")
26 process.SiStripConfigDb.UsingDb =
True
27 process.SiStripConfigDb.ConfDb =
'user/password@account'
28 process.SiStripConfigDb.Partitions.PrimaryPartition.PartitionName =
'DBPART'
29 process.SiStripConfigDb.Partitions.PrimaryPartition.RunNumber = RUNNUMBER
30 process.SiStripConfigDb.TNS_ADMIN =
'/etc'
32 process.SiStripCondObjBuilderFromDb = cms.Service(
"SiStripCondObjBuilderFromDb")
33 process.SiStripCondObjBuilderFromDb.SiStripDetInfoFile = cms.FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat")
34 process.SiStripCondObjBuilderFromDb.UseFEC = cms.untracked.bool(
True)
35 process.SiStripCondObjBuilderFromDb.UseFED = cms.untracked.bool(
True)
37 process.FedCablingFromConfigDb = cms.ESSource(
"SiStripFedCablingBuilderFromDb",
38 CablingSource = cms.untracked.string(
'UNDEFINED')
41 process.PedestalsFromConfigDb = cms.ESSource(
"SiStripPedestalsBuilderFromDb")
42 process.NoiseFromConfigDb = cms.ESSource(
"SiStripNoiseBuilderFromDb")
43 process.sistripconn = cms.ESProducer(
"SiStripConnectivity")
45 process.load(
"Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
46 process.load(
"Geometry.TrackerNumberingBuilder.trackerTopology_cfi")
47 process.load(
"Geometry.TrackerGeometryBuilder.trackerParameters_cfi")
49 process.FastMonitoringService = cms.Service(
"FastMonitoringService",
50 sleepTime = cms.untracked.int32(1),
51 microstateDefPath = cms.untracked.string( cmsswbase+
'/src/EventFilter/Utilities/plugins/microstatedef.jsd'),
52 fastMicrostateDefPath = cms.untracked.string( cmsswbase+
'/src/EventFilter/Utilities/plugins/microstatedeffast.jsd'),
53 fastName = cms.untracked.string(
'fastmoni' ),
54 slowName = cms.untracked.string(
'slowmoni' )
57 process.EvFDaqDirector = cms.Service(
"EvFDaqDirector",
58 runNumber = cms.untracked.uint32(RUNNUMBER),
59 buBaseDir = cms.untracked.string(inputPath),
60 directorIsBu = cms.untracked.bool(
False),
61 testModeNoBuilderUnit = cms.untracked.bool(
False)
64 infilename =
"file:"+inputPath+
"/runRUNNUMBER/runRUNNUMBER.root"
65 process.source = cms.Source(
"PoolSource",
66 fileNames = cms.untracked.vstring(infilename)
69 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
73 process.load(
"EventFilter.SiStripRawToDigi.FedChannelDigis_cfi")
74 process.FedChannelDigis.UnpackBadChannels = cms.bool(
True)
75 process.FedChannelDigis.DoAPVEmulatorCheck = cms.bool(
True)
76 process.FedChannelDigis.LegacyUnpacker = cms.bool(
False)
77 process.FedChannelDigis.ProductLabel = cms.InputTag(
"rawDataCollector")
79 process.load(
'DQM.SiStripMonitorHardware.SiStripSpyUnpacker_cfi')
80 process.load(
'DQM.SiStripMonitorHardware.SiStripSpyDigiConverter_cfi')
81 process.load(
'DQM.SiStripMonitorHardware.SiStripSpyEventSummaryProducer_cfi')
83 process.SiStripSpyUnpacker.FEDIDs = cms.vuint32()
84 process.SiStripSpyUnpacker.InputProductLabel = cms.InputTag(
'rawDataCollector')
85 process.SiStripSpyUnpacker.AllowIncompleteEvents =
True
86 process.SiStripSpyUnpacker.StoreCounters =
True
87 process.SiStripSpyUnpacker.StoreScopeRawDigis = cms.bool(
True)
89 process.SiStripSpyDigiConverter.InputProductLabel = cms.InputTag(
'SiStripSpyUnpacker',
'ScopeRawDigis')
90 process.SiStripSpyDigiConverter.StorePayloadDigis =
True
91 process.SiStripSpyDigiConverter.StoreReorderedDigis =
True
92 process.SiStripSpyDigiConverter.StoreModuleDigis =
True
93 process.SiStripSpyDigiConverter.StoreAPVAddress =
True
94 process.SiStripSpyDigiConverter.MinDigiRange = 100
95 process.SiStripSpyDigiConverter.MaxDigiRange = 1024
96 process.SiStripSpyDigiConverter.MinZeroLight = 0
97 process.SiStripSpyDigiConverter.MaxZeroLight = 1024
98 process.SiStripSpyDigiConverter.MinTickHeight = 0
99 process.SiStripSpyDigiConverter.MaxTickHeight = 1024
100 process.SiStripSpyDigiConverter.ExpectedPositionOfFirstHeaderBit = 0
101 process.SiStripSpyDigiConverter.DiscardDigisWithWrongAPVAddress =
False
102 process.SiStripSpyEventSummary.RawDataTag = cms.InputTag(
'rawDataCollector')
105 process.load(
"DQM.SiStripCommissioningSources.CommissioningHistos_cfi")
106 process.CommissioningHistos.CommissioningTask =
'UNDEFINED'
107 process.CommissioningHistos.PedsFullNoiseParameters.NrEvToSkipAtStart = 100
108 process.CommissioningHistos.PedsFullNoiseParameters.NrEvForPeds = 3000
109 process.CommissioningHistos.PedsFullNoiseParameters.FillNoiseProfile =
True
112 process.p = cms.Path(process.FedChannelDigis*process.CommissioningHistos)
115 process.SiStripSpyEventSummary.RunType = cms.uint32(runtype)
116 process.CommissioningHistos.InputModuleLabel =
'SiStripSpyDigiConverter'
117 process.CommissioningHistos.InputModuleLabelAlt = cms.string(
'SiStripSpyUnpacker')
118 process.CommissioningHistos.SummaryInputModuleLabel =
'SiStripSpyEventSummary'
119 process.CommissioningHistos.isSpy = cms.bool(
True)
120 process.CommissioningHistos.PartitionName = cms.string(
'DBPART')
122 process.p = cms.Path(process.SiStripSpyUnpacker*process.SiStripSpyDigiConverter*process.SiStripSpyEventSummary*process.CommissioningHistos)