From 40c574a85d4d855e31ff8cc84d25c8285fc31cca Mon Sep 17 00:00:00 2001 From: Yutaro Date: Thu, 31 Jul 2014 17:30:01 +0200 Subject: [PATCH] Loading inputsource_cfi --- .../test/ecal_dqm_sourceclient-live_cfg.py | 44 +++---------------- .../ecalcalib_dqm_sourceclient-live_cfg.py | 35 +-------------- 2 files changed, 9 insertions(+), 70 deletions(-) diff --git a/DQM/Integration/python/test/ecal_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/test/ecal_dqm_sourceclient-live_cfg.py index e113f0c1353e1..721afbdfb2872 100644 --- a/DQM/Integration/python/test/ecal_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/test/ecal_dqm_sourceclient-live_cfg.py @@ -1,21 +1,6 @@ ### AUTO-GENERATED CMSRUN CONFIGURATION FOR ECAL DQM ### -from FWCore.ParameterSet.VarParsing import VarParsing -options = VarParsing('analysis') -options.register('runkey', default = 'pp_run', mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.string, info = 'Run Keys of CMS') -options.register('runNumber', default = 194533, mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.int, info = "Run number.") -options.register('runInputDir', default = '/fff/BU0/test', mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.string, info = "Directory where the DQM files will appear.") -options.register('skipFirstLumis', default = False, mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.bool, info = "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing.") - -options.parseArguments() - - -from DQM.Integration.test.dqmPythonTypes import * -runType = RunType(['pp_run','cosmic_run','hi_run','hpu_run']) -if not options.runkey.strip(): - options.runkey = 'pp_run' - -runType.setRunType(options.runkey.strip()) +import FWCore.ParameterSet.Config as cms process = cms.Process("process") @@ -40,6 +25,7 @@ process.load("DQM.Integration.test.environment_cfi") process.load("FWCore.Modules.preScaler_cfi") process.load("DQM.Integration.test.FrontierCondition_GT_cfi") +process.load("DQM.Integration.test.inputsource_cfi") ### Individual module setups ### @@ -111,18 +97,6 @@ destinations = cms.untracked.vstring('cerr') ) -process.source = cms.Source("DQMStreamerReader", - streamLabel = cms.untracked.string('_streamDQM_StorageManager'), - delayMillis = cms.untracked.uint32(500), - runNumber = cms.untracked.uint32(0), - endOfRunKills = cms.untracked.bool(True), - runInputDir = cms.untracked.string(''), - minEventsPerLumi = cms.untracked.int32(1), - deleteDatFiles = cms.untracked.bool(False), - SelectEvents = cms.untracked.vstring('*'), - skipFirstLumis = cms.untracked.bool(False) -) - process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) @@ -184,24 +158,20 @@ process.schedule = cms.Schedule(process.ecalMonitorPath,process.ecalClientPath,process.dqmEndPath,process.dqmOutputPath) -### Setup source ### -process.source.runNumber = options.runNumber -process.source.runInputDir = options.runInputDir -process.source.skipFirstLumis = options.skipFirstLumis - ### Run type specific ### referenceFileName = process.DQMStore.referenceFileName.pythonValue() -if runType.getRunType() == runType.pp_run: +runTypeName = process.runType.getRunTypeName() +if runTypeName == 'pp_run': process.DQMStore.referenceFileName = referenceFileName.replace('.root', '_pp.root') -elif runType.getRunType() == runType.cosmic_run: +elif runTypeName == 'cosmic_run': process.DQMStore.referenceFileName = referenceFileName.replace('.root', '_cosmic.root') # process.dqmEndPath.remove(process.dqmQTest) process.ecalMonitorTask.workers = ['EnergyTask', 'IntegrityTask', 'OccupancyTask', 'RawDataTask', 'TrigPrimTask', 'PresampleTask', 'SelectiveReadoutTask'] process.ecalMonitorClient.workers = ['IntegrityClient', 'OccupancyClient', 'PresampleClient', 'RawDataClient', 'SelectiveReadoutClient', 'TrigPrimClient', 'SummaryClient'] process.ecalMonitorClient.workerParameters.SummaryClient.params.activeSources = ['Integrity', 'RawData', 'Presample', 'TriggerPrimitives', 'HotCell'] -elif runType.getRunType() == runType.hi_run: +elif runTypeName == runType.hi_run: process.DQMStore.referenceFileName = referenceFileName.replace('.root', '_hi.root') -elif runType.getRunType() == runType.hpu_run: +elif runTypeName == runType.hpu_run: process.DQMStore.referenceFileName = referenceFileName.replace('.root', '_hpu.root') process.source.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('*')) diff --git a/DQM/Integration/python/test/ecalcalib_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/test/ecalcalib_dqm_sourceclient-live_cfg.py index ddd6b3b3f79db..578bde263de4c 100644 --- a/DQM/Integration/python/test/ecalcalib_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/test/ecalcalib_dqm_sourceclient-live_cfg.py @@ -1,21 +1,6 @@ ### AUTO-GENERATED CMSRUN CONFIGURATION FOR ECAL DQM ### -from FWCore.ParameterSet.VarParsing import VarParsing -options = VarParsing('analysis') -options.register('runkey', default = 'pp_run', mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.string, info = 'Run Keys of CMS') -options.register('runNumber', default = 194533, mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.int, info = "Run number.") -options.register('runInputDir', default = '/fff/BU0/test', mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.string, info = "Directory where the DQM files will appear.") -options.register('skipFirstLumis', default = False, mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.bool, info = "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing.") - -options.parseArguments() - - -from DQM.Integration.test.dqmPythonTypes import * -runType = RunType(['pp_run','cosmic_run','hi_run','hpu_run']) -if not options.runkey.strip(): - options.runkey = 'pp_run' - -runType.setRunType(options.runkey.strip()) +import FWCore.ParameterSet.Config as cms process = cms.Process("process") @@ -37,6 +22,7 @@ process.load("DQM.Integration.test.environment_cfi") process.load("FWCore.Modules.preScaler_cfi") process.load("DQM.Integration.test.FrontierCondition_GT_cfi") +process.load("DQM.Integration.test.inputsource_cfi") ### Individual module setups ### @@ -139,18 +125,6 @@ memUnpacking = cms.bool(True) ) -process.source = cms.Source("DQMStreamerReader", - streamLabel = cms.untracked.string('_streamDQM_StorageManager'), - delayMillis = cms.untracked.uint32(500), - runNumber = cms.untracked.uint32(0), - endOfRunKills = cms.untracked.bool(True), - runInputDir = cms.untracked.string(''), - minEventsPerLumi = cms.untracked.int32(1), - deleteDatFiles = cms.untracked.bool(False), - SelectEvents = cms.untracked.vstring('*'), - skipFirstLumis = cms.untracked.bool(False) -) - process.ecalCalibrationFilter = cms.EDFilter("EcalMonitorPrescaler", laserPrescaleFactor = cms.untracked.int32(1), testpulsePrescaleFactor = cms.untracked.int32(1), @@ -212,8 +186,3 @@ ### Schedule ### process.schedule = cms.Schedule(process.ecalLaserLedPath,process.ecalTestPulsePath,process.ecalPedestalPath,process.ecalClientPath,process.dqmEndPath,process.dqmOutputPath) - -### Setup source ### -process.source.runNumber = options.runNumber -process.source.runInputDir = options.runInputDir -process.source.skipFirstLumis = options.skipFirstLumis