13 sampleIdentifier =
'195378'
15 maxNumberEvents = 5000
20 readFiles = cms.untracked.vstring()
21 secFiles = cms.untracked.vstring()
22 selectedEvents = cms.untracked.VEventRange()
23 selectedLumis= cms.untracked.VLuminosityBlockRange()
26 maxEvents = cms.untracked.PSet(
27 input = cms.untracked.int32(maxNumberEvents)
32 if sampleIdentifier ==
'195378' :
34 dataset =
'/MinimumBias/Run2012B-v1/RAW'
37 selectedLumis= cms.untracked.VLuminosityBlockRange(
38 '195378:1275-195378:max'
41 elif sampleIdentifier ==
'195379' :
43 dataset =
'/MinimumBias/Run2012B-v1/RAW'
47 elif sampleIdentifier ==
'195390' :
49 dataset =
'/MinimumBias/Run2012B-v1/RAW'
54 elif sampleIdentifier ==
'179828' :
56 dataset =
'/ZeroBiasHPF0/Run2011B-v1/RAW'
61 elif sampleIdentifier ==
'165633-CAFDQM' :
63 dataset =
'/ZeroBiasHPF0/Run2011B-v1/RAW'
67 'file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root'
70 elif sampleIdentifier ==
'FileStream_105760' :
73 dataType =
'FileStream'
76 'file:/lookarea_SM/MWGR_29.00105760.0001.A.storageManager.00.0000.dat'
80 print 'Error: sample identifier ', sampleIdentifier,
' not defined.\n'
81 errorUserOptions =
True
92 print " Run number: ", runNumber
93 print " Dataset: ", dataset
94 print " Data type: ", dataType
101 myQuery =
'file dataset=' + dataset +
' run=' + runNumber
102 dasClientCommand =
'das_client.py --limit=0 --format=plain --query='+
'"'+myQuery+
'"'
103 data = os.popen(dasClientCommand)
104 filePaths = data.readlines()
107 print '\n das_client using the query'
109 print ' retrieved the following files\n'
111 for line
in filePaths :
114 readFiles.extend(filePaths);
123 if dataType ==
'StreamFile' :
124 source = cms.Source(
"NewEventStreamFileReader", fileNames=readFiles)
126 source = cms.Source (
'PoolSource',
128 secondaryFileNames=secFiles,
129 lumisToProcess = selectedLumis,
130 eventsToProcess = selectedEvents