CMS 3D CMS Logo

datasetToSource.py
Go to the documentation of this file.
1 import os
2 from dataset import Dataset, CMSDataset, LocalDataset, createDataset, PrivateDataset, createMyDataset
3 
4 import FWCore.ParameterSet.Config as cms
5 
6 def datasetToSource( user, dataset, pattern='.*root', readCache=False):
7 
8  # print user, dataset, pattern
9  data = createDataset(user, dataset, pattern, readCache)
10 
11  source = cms.Source(
12  "PoolSource",
13  noEventSort = cms.untracked.bool(True),
14  duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
15  fileNames = cms.untracked.vstring()
16  )
17 
18  source.fileNames.extend( data.listOfGoodFiles() )
19 
20  return source
21 
22 ### MM
23 def myDatasetToSource( user, dataset, pattern='.*root', dbsInstance=None, readCache=False):
24 
25  #print user, dataset, pattern, dbsInstance
26  data = createMyDataset(user, dataset, pattern, dbsInstance, readCache)
27 
28  source = cms.Source(
29  "PoolSource",
30  noEventSort = cms.untracked.bool(True),
31  duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
32  fileNames = cms.untracked.vstring()
33  )
34 
35  #print data.listOfGoodFiles()
36  source.fileNames.extend( data.listOfGoodFiles() )
37 
38  return source
39 ### MM
def myDatasetToSource(user, dataset, pattern='.*root', dbsInstance=None, readCache=False)
MM.
def createDataset(user, dataset, pattern, readcache=False, basedir=None, run_range=None)
Definition: dataset.py:427
def datasetToSource(user, dataset, pattern='.*root', readCache=False)
def createMyDataset(user, dataset, pattern, dbsInstance, readcache=False)
if user == 'CMS': data = CMSDataset( dataset ) elif user == 'LOCAL': if basedir is None: basedir = os...
Definition: dataset.py:468