Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:20:49

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("HLTBTAG")
0003 process.load("L1TriggerConfig.L1GtConfigProducers.L1GtConfig_cff")
0004 process.load("DQMServices.Components.EDMtoMEConverter_cff")
0005 
0006 process.load("HLTriggerOffline.Btag.HltBtagValidation_cff")
0007 #process.load("HLTriggerOffline.Btag.HltBtagValidationFastSim_cff")
0008 process.load("HLTriggerOffline.Btag.HltBtagPostValidation_cff")
0009 
0010 #process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(500)   )
0011 
0012 process.DQM_BTag = cms.Path(    process.hltbtagValidationSequence + process.HltBTagPostVal + process.dqmSaver)
0013 
0014 import sys
0015 import Utilities.General.cmssw_das_client as cmssw_das_client
0016 def add_rawRelVals(process, inputName):   
0017    query='dataset='+inputName 
0018    dataset = cmssw_das_client.get_data(query, limit = 0)
0019    if not dataset:
0020       raise RuntimeError(
0021          'Das returned no dataset parent of the input file: %s \n'
0022          'The parenthood is needed to add RAW secondary input files' % process.source.fileNames[0]
0023          )
0024    for i in dataset['data']:
0025     try: n_files = i['dataset'][0]['num_file']
0026     except: pass
0027    raw_files = cmssw_das_client.get_data('file '+query, limit = 0)
0028    files = []
0029    for i in raw_files['data']:
0030     files.append( i['file'][0]['name'])
0031    
0032    raw_files = ['root://cms-xrd-global.cern.ch/'+str(i) for i in files]
0033    process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(raw_files))
0034    return process
0035 
0036 add_rawRelVals(process, str(sys.argv[-1]))
0037 
0038 #process.source = cms.Source("PoolSource",
0039 #   fileNames = cms.untracked.vstring(
0040 #'root://cms-xrd-global.cern.ch//store/user/mdefranc/RelValTTbar_13/ttbarRelVal_noPU_3/180715_094624/0000/step2_50.root',
0041 #)
0042 #)
0043 
0044 
0045 
0046 #Settings equivalent to 'RelVal' convention:
0047 process.dqmSaver.convention = 'Offline'
0048 process.dqmSaver.saveByRun = cms.untracked.int32(-1)
0049 process.dqmSaver.saveAtJobEnd = cms.untracked.bool(True)
0050 process.dqmSaver.forceRunNumber = cms.untracked.int32(1)
0051 process.dqmSaver.workflow = "/test/RelVal/TrigVal"
0052 process.DQMStore.verbose=0
0053 process.options = cms.untracked.PSet(
0054     wantSummary = cms.untracked.bool( True ),
0055     fileMode    = cms.untracked.string('FULLMERGE'),
0056     SkipEvent   = cms.untracked.vstring('ProductNotFound')
0057 )
0058