Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:22

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 """ This python cfg converts a plain DQM root file in a EDM file that can be used to run the SiStrip bad channel calibration as done @ Tier0"""
0005 
0006 
0007 
0008 process = cms.Process("CONV")
0009 
0010 #process.load("DQMServices.Core.test.MessageLogger_cfi")
0011 process.load('Configuration.EventContent.EventContent_cff')
0012 process.load("DQMServices.Core.DQM_cfg")
0013 
0014 
0015 
0016 process.fileReader = cms.EDAnalyzer("DQMRootFileReader",
0017                                     RootFileName = cms.untracked.string
0018                                     ('/build/cerminar/debugpcl/CMSSW_5_3_16/src/Calibration/TkAlCaRecoProducers/test/DQM_V0001_R000160819__StreamExpress__Run2011A-Express-v1__DQM.root')
0019                                     )
0020 
0021 process.maxEvents = cms.untracked.PSet(
0022     input = cms.untracked.int32(1)
0023     )
0024 
0025 
0026 runNumber = int(process.fileReader.RootFileName.value().split('/')[-1].split('_')[2].lstrip("R"))
0027 print("Run number extracted from file name:",runNumber)
0028 
0029 process.source = cms.Source("EmptySource",
0030                             firstRun = cms.untracked.uint32(runNumber),
0031                             )
0032 
0033 
0034 
0035 
0036 process.ALCARECOStreamSiStripPCLHistos = cms.OutputModule("PoolOutputModule",
0037                                                           outputCommands = cms.untracked.vstring('drop *', 
0038                                                                                                  'keep *_MEtoEDMConvertSiStrip_*_*'),
0039                                                           fileName = cms.untracked.string('SiStripPCLHistos.root'),
0040                                                           dataset = cms.untracked.PSet(
0041                                                               filterName = cms.untracked.string(''),
0042                                                               dataTier = cms.untracked.string('ALCARECO')
0043                                                               ),
0044                                                           eventAutoFlushCompressedSize = cms.untracked.int32(5242880)
0045                                                           )
0046 
0047 process.MEtoEDMConvertSiStrip = cms.EDProducer("MEtoEDMConverter",
0048                                                Verbosity = cms.untracked.int32(0),
0049                                                Frequency = cms.untracked.int32(50),
0050                                                Name = cms.untracked.string('MEtoEDMConverter'),
0051                                                MEPathToSave = cms.untracked.string('AlCaReco/SiStrip')
0052                                                )
0053 
0054 
0055 
0056 process.path = cms.Path(process.fileReader)
0057 process.ALCARECOStreamSiStripPCLHistosOutPath = cms.EndPath(process.ALCARECOStreamSiStripPCLHistos)
0058 process.endjob_step = cms.EndPath(process.MEtoEDMConvertSiStrip)
0059 
0060 
0061 process.schedule = cms.Schedule(process.path, process.endjob_step, process.ALCARECOStreamSiStripPCLHistosOutPath)