Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:10:02

0001 from __future__ import print_function
0002 sampleName = "/RelValJpsiMM/CMSSW_3_5_0_pre2-STARTUP3X_V14-v1/GEN-SIM-RECO"
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process('HEAVYFLAVORVALIDATIONHARVESTING')
0007 
0008 process.load('Configuration/StandardSequences/Services_cff')
0009 process.load('FWCore/MessageService/MessageLogger_cfi')
0010 
0011 process.maxEvents = cms.untracked.PSet(
0012     input = cms.untracked.int32(-1)
0013 )
0014 
0015 process.options = cms.untracked.PSet(
0016     Rethrow = cms.untracked.vstring('ProductNotFound'),
0017     fileMode = cms.untracked.string('FULLMERGE')
0018 )
0019 
0020 process.source = cms.Source("PoolSource",
0021     processingMode = cms.untracked.string('RunsAndLumis'),
0022     fileNames = cms.untracked.vstring()
0023 )
0024 
0025 process.load('Configuration/StandardSequences/EDMtoMEAtRunEnd_cff')
0026 process.dqmSaver.dirName = '/tmp/'
0027 #process.dqmSaver.referenceHandling = 'all'
0028 process.load('HLTriggerOffline/HeavyFlavor/heavyFlavorValidationHarvestingSequence_cff')
0029 
0030 process.edmtome_step = cms.Path(process.EDMtoME)
0031 process.validationHarvesting = cms.Path(process.heavyFlavorValidationHarvestingSequence)
0032 process.dqmsave_step = cms.Path(process.DQMSaver)
0033 
0034 process.schedule = cms.Schedule(process.edmtome_step,process.validationHarvesting,process.dqmsave_step)
0035 
0036 import sys
0037 from DBSAPI.dbsApi import DbsApi
0038 from DBSAPI.dbsException import *
0039 from DBSAPI.dbsApiException import *
0040 from DBSAPI.dbsOptions import DbsOptionParser
0041 
0042 optManager  = DbsOptionParser()
0043 (opts,args) = optManager.getOpt()
0044 api = DbsApi(opts.__dict__)
0045 
0046 try :
0047     print("Files to process:")
0048     for afile in api.listDatasetFiles(datasetPath=sampleName):
0049         process.source.fileNames.append(afile['LogicalFileName'])
0050         print(afile['LogicalFileName'])
0051 
0052 except DbsApiException as ex:
0053      print("Caught API Exception %s: %s "  % (ex.getClassName(), ex.getErrorMessage() ))
0054      if ex.getErrorCode() not in (None, ""):
0055           print("DBS Exception Error Code: ", ex.getErrorCode())
0056