File indexing completed on 2024-10-08 05:12:06
0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003
0004 import os
0005 import sys
0006 import re
0007
0008 class config: pass
0009 config.runNumber = int(sys.argv[1])
0010 print(config.runNumber)
0011
0012 for arg in sys.argv:
0013 print(arg)
0014
0015 readFiles = cms.untracked.vstring()
0016
0017 matchRootFile = re.compile("\S*\.root$")
0018 for argument in sys.argv[2:]:
0019 if matchRootFile.search(argument):
0020 fileToRead = "file:"+argument
0021 readFiles.append(fileToRead)
0022
0023 print("readFiles : \n", readFiles)
0024
0025 print(config.runNumber)
0026
0027
0028
0029 process = cms.Process('HARVESTING')
0030
0031
0032 process.load('Configuration.StandardSequences.Services_cff')
0033 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0034 process.load('FWCore.MessageService.MessageLogger_cfi')
0035 process.load('Configuration.EventContent.EventContent_cff')
0036 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0037 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0038 process.load('Configuration.StandardSequences.EDMtoMEAtRunEnd_cff')
0039 process.load('Configuration.StandardSequences.Harvesting_cff')
0040 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0041
0042 process.load("DQMServices.Core.DQM_cfg")
0043 process.load("DQMServices.Components.DQMEnvironment_cfi")
0044
0045 process.maxEvents = cms.untracked.PSet(
0046 input = cms.untracked.int32(100)
0047 )
0048
0049 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0050 from Configuration.AlCa.autoCond import autoCond
0051
0052 from Configuration.AlCa.GlobalTag import GlobalTag
0053 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run1_data', '')
0054
0055 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0056 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0057
0058
0059 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0060
0061
0062
0063
0064
0065
0066
0067 process.source = cms.Source("DQMRootSource",
0068 fileNames = readFiles,
0069 filterOnRun = cms.untracked.uint32(config.runNumber)
0070 )
0071 process.options = cms.untracked.PSet(
0072 Rethrow = cms.untracked.vstring('ProductNotFound'),
0073 fileMode = cms.untracked.string('FULLMERGE')
0074 )
0075
0076
0077
0078
0079 cmssw_version = os.environ.get('CMSSW_VERSION','CMSSW_X_Y_Z')
0080 Workflow = '/HcalValidation/'+'Harvesting/'+str(cmssw_version)
0081 process.dqmSaver.workflow = Workflow
0082
0083
0084
0085
0086
0087
0088
0089
0090 process.dqmSaver.convention = 'Offline'
0091 process.dqmSaver.saveByRun = -1
0092 process.dqmSaver.saveAtJobEnd = True
0093 process.dqmSaver.forceRunNumber = config.runNumber
0094
0095 process.calotowersClient = DQMEDHarvester("CaloTowersClient",
0096 outputFile = cms.untracked.string('CaloTowersHarvestingME.root'),
0097 DQMDirName = cms.string("/")
0098 )
0099
0100 process.noiseratesClient = DQMEDHarvester("NoiseRatesClient",
0101 outputFile = cms.untracked.string('NoiseRatesHarvestingME.root'),
0102 DQMDirName = cms.string("/")
0103 )
0104
0105 process.hcalrechitsClient = DQMEDHarvester("HcalRecHitsClient",
0106 outputFile = cms.untracked.string('HcalRecHitsHarvestingME.root'),
0107 DQMDirName = cms.string("/")
0108 )
0109
0110
0111 process.calotowersDQMClient = DQMEDHarvester("CaloTowersDQMClient",
0112 outputFile = cms.untracked.string('CaloTowersHarvestingME.root'),
0113
0114 DQMDirName = cms.string("/")
0115 )
0116 process.hcalNoiseRatesClient = DQMEDHarvester("HcalNoiseRatesClient",
0117 outputFile = cms.untracked.string('NoiseRatesHarvestingME.root'),
0118
0119 DQMDirName = cms.string("/")
0120 )
0121 process.hcalRecHitsDQMClient = DQMEDHarvester("HcalRecHitsDQMClient",
0122 outputFile = cms.untracked.string('HcalRecHitsHarvestingME.root'),
0123
0124 DQMDirName = cms.string("/")
0125 )
0126
0127
0128
0129
0130
0131
0132
0133
0134 process.edmtome_step = cms.Path(process.EDMtoME)
0135 process.validationHarvesting = cms.Path(process.calotowersClient + process.noiseratesClient + process.hcalrechitsClient + process.calotowersDQMClient + process.hcalNoiseRatesClient + process.hcalRecHitsDQMClient)
0136 process.dqmsave_step = cms.Path(process.DQMSaver)
0137
0138
0139 process.schedule = cms.Schedule(process.edmtome_step,process.validationHarvesting,process.dqmsave_step)