Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:31

0001 from __future__ import absolute_import
0002 import os
0003 from .dataset import Dataset, CMSDataset, LocalDataset, createDataset, PrivateDataset, createMyDataset
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 def datasetToSource( user, dataset, pattern='.*root', readCache=False):
0008 
0009     # print user, dataset, pattern
0010     data = createDataset(user, dataset, pattern, readCache)
0011     
0012     source = cms.Source(
0013     "PoolSource",
0014     noEventSort = cms.untracked.bool(True),
0015     duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0016     fileNames = cms.untracked.vstring()
0017         )
0018     
0019     source.fileNames.extend( data.listOfGoodFiles() )
0020 
0021     return source
0022 
0023 ### MM
0024 def myDatasetToSource( user, dataset, pattern='.*root', dbsInstance=None, readCache=False):
0025 
0026     #print user, dataset, pattern, dbsInstance
0027     data = createMyDataset(user, dataset, pattern, dbsInstance, readCache)
0028 
0029     source = cms.Source(
0030         "PoolSource",
0031         noEventSort = cms.untracked.bool(True),
0032         duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0033         fileNames = cms.untracked.vstring()
0034         )
0035 
0036     #print data.listOfGoodFiles()
0037     source.fileNames.extend( data.listOfGoodFiles() )
0038 
0039     return source
0040 ### MM