File indexing completed on 2024-04-06 11:58:32
0001
0002
0003 produce_logs = True
0004
0005
0006
0007 harvester_debug = True
0008
0009
0010 input_distributions = 'file:dqm_run_distributions_test.root'
0011
0012
0013 reference_dataset_path = 'DQM_V0001_CalibPPS_R000314273.root'
0014
0015
0016 write_sqlite_results = False
0017
0018
0019 output_conditions = 'sqlite_file:alignment_results.db'
0020
0021
0022 output_db_tag = 'CTPPSRPAlignment_real_pcl'
0023
0024
0025 import sys
0026 import os
0027 import FWCore.ParameterSet.Config as cms
0028
0029 process = cms.Process('testDistributions')
0030
0031 process.load('FWCore.MessageService.MessageLogger_cfi')
0032 process.load("DQMServices.Core.DQMStore_cfi")
0033 process.load("CalibPPS.AlignmentGlobal.ppsAlignmentHarvester_cfi")
0034
0035 if harvester_debug:
0036 process.ppsAlignmentHarvester.debug = cms.bool(True)
0037
0038
0039 if produce_logs:
0040 process.MessageLogger = cms.Service("MessageLogger",
0041 destinations = cms.untracked.vstring('run_analysis',
0042 'cout'
0043 ),
0044 run_analysis = cms.untracked.PSet(
0045 threshold = cms.untracked.string("INFO")
0046 ),
0047 cout = cms.untracked.PSet(
0048 threshold = cms.untracked.string('WARNING')
0049 )
0050 )
0051 else:
0052 process.MessageLogger = cms.Service("MessageLogger",
0053 destinations = cms.untracked.vstring('cout'),
0054 cout = cms.untracked.PSet(
0055 threshold = cms.untracked.string('WARNING')
0056 )
0057 )
0058
0059
0060 process.load("DQMServices.Components.DQMEnvironment_cfi")
0061 process.dqmEnv.subSystemFolder = "CalibPPS"
0062 process.dqmSaver.convention = 'Offline'
0063 process.dqmSaver.workflow = "/CalibPPS/AlignmentGlobal/CMSSW_12_1_0_pre1"
0064 process.dqmSaver.saveByRun = -1
0065 process.dqmSaver.saveAtJobEnd = True
0066 process.dqmSaver.forceRunNumber = 999999
0067
0068
0069 process.source = cms.Source("DQMRootSource",
0070 fileNames = cms.untracked.vstring(input_distributions),
0071 )
0072
0073
0074 from config_cff import ppsAlignmentConfigESSource as ppsAlignmentConfigESSourceTest
0075 process.ppsAlignmentConfigESSourceTest = ppsAlignmentConfigESSourceTest
0076
0077
0078 from config_reference_cff import ppsAlignmentConfigESSource as ppsAlignmentConfigESSourceReference
0079 ppsAlignmentConfigESSourceReference.matching = cms.PSet(
0080 reference_dataset = cms.string(reference_dataset_path)
0081 )
0082 process.ppsAlignmentConfigESSourceReference = ppsAlignmentConfigESSourceReference
0083
0084
0085 if write_sqlite_results:
0086 process.load("CondCore.CondDB.CondDB_cfi")
0087 process.CondDB.connect = output_conditions
0088 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0089 process.CondDB,
0090 timetype = cms.untracked.string('runnumber'),
0091 toPut = cms.VPSet(cms.PSet(
0092 record = cms.string('CTPPSRPAlignmentCorrectionsDataRcd'),
0093 tag = cms.string(output_db_tag)
0094 ))
0095 )
0096
0097
0098 process.ppsAlignmentHarvester.write_sqlite_results = cms.bool(True)
0099
0100 process.path = cms.Path(
0101 process.ppsAlignmentHarvester
0102 )
0103
0104 process.end_path = cms.EndPath(
0105 process.dqmSaver
0106 )
0107
0108 process.schedule = cms.Schedule(
0109 process.path,
0110 process.end_path
0111 )