test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 createDataset
Definition: dataset.py:426
def createMyDataset
if user == 'CMS': data = CMSDataset( dataset ) elif user == 'LOCAL': if basedir is None: basedir = os...
Definition: dataset.py:467
def myDatasetToSource
MM.