25 useRelValSample =
False
31 if useRelValSample ==
False :
35 globalTag =
'auto:com10'
40 sampleIdentifier =
'165633-CAFDQM'
49 globalTag =
'auto:startup'
54 sampleFromRelease =
'CMSSW_5_2_3'
61 dataset =
'RelValLM1_sfts'
75 overrideGlobalTag =
False
78 if overrideGlobalTag ==
True :
79 myGlobalTag =
'GR_P_V28'
84 errorUserOptions =
False
87 readFiles = cms.untracked.vstring()
88 secFiles = cms.untracked.vstring()
89 selectedEvents = cms.untracked.VEventRange()
90 selectedLumis= cms.untracked.VLuminosityBlockRange()
94 if (useRelValSample ==
True)
and (useLocalFiles ==
False) :
99 print " Release: ", sampleFromRelease
100 print " Dataset: ", dataset
101 print " Data type: ", dataType
112 myQuery =
'dataset release=' + sampleFromRelease
113 dasClientCommand =
'das_client.py --limit=0 --format=plain --query='+
'"'+myQuery+
'"'
114 datasets = os.popen(dasClientCommand)
118 dataset =
'/' + dataset +
'/'
119 sampleFromRelease = sampleFromRelease +
'-'
121 if 'start' in globalTag :
123 elif 'mc' in globalTag :
128 for line
in datasets.readlines() :
130 if sampleFromRelease
in line :
132 if dataType
in line :
133 if 'ALCA' not in line :
134 datasetName = line.strip(
' \n')
139 if datasetName ==
'' :
140 errorUserOptions =
True
142 if not errorUserOptions :
144 myQuery =
'file dataset=' +
'"' + datasetName +
'"'
145 dasClientCommand =
'das_client.py --limit=0 --format=plain --query=' +
'"' + myQuery +
'"'
146 data = os.popen(dasClientCommand)
147 filePaths = data.readlines()
150 print '\n das_client using the query'
152 print ' retrieved the following files\n'
154 for line
in filePaths :
157 readFiles.extend(filePaths);
167 elif (useRelValSample ==
False)
and (useLocalFiles ==
False) :
171 if sampleIdentifier ==
'191833_RAW' :
173 dataset =
'/DoubleElectron/Run2012A-v1/RAW'
176 selectedLumis= cms.untracked.VLuminosityBlockRange(
179 selectedEvents = cms.untracked.VEventRange(
185 elif sampleIdentifier ==
'191833_RECO' :
187 dataset =
'/DoubleElectron/Run2012A-PromptReco-v1/RECO'
190 selectedLumis= cms.untracked.VLuminosityBlockRange(
193 selectedEvents = cms.untracked.VEventRange(
198 elif sampleIdentifier ==
'191833_AOD' :
200 dataset =
'/DoubleElectron/Run2012A-PromptReco-v1/AOD'
203 selectedLumis= cms.untracked.VLuminosityBlockRange(
206 selectedEvents = cms.untracked.VEventRange(
212 elif sampleIdentifier ==
'187858' :
214 dataset =
'/Commissioning/Commissioning12-v1/RAW'
217 selectedLumis= cms.untracked.VLuminosityBlockRange(
221 selectedEvents = cms.untracked.VEventRange(
227 elif sampleIdentifier ==
'179828' :
229 dataset =
'/ZeroBiasHPF0/Run2011B-v1/RAW'
234 elif sampleIdentifier ==
'165633-CAFDQM' :
236 dataset =
'/ZeroBiasHPF0/Run2011B-v1/RAW'
240 'file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root'
244 elif sampleIdentifier ==
'137028' :
246 dataset =
'/Run2010A/ZeroBias/RECO-v2'
250 '/store/data/Run2010A/ZeroBias/RECO/v2/000/137/028/08BF857D-2471-DF11-9CEB-003048D2BBF0.root'
254 elif sampleIdentifier ==
'StreamFile_105760' :
257 dataType =
'StreamFile'
260 'file:/lookarea_SM/MWGR_29.00105760.0001.A.storageManager.00.0000.dat'
264 elif sampleIdentifier ==
'205666.A.storageManager' :
266 dataset =
'A.storageManager'
267 dataType =
'StreamFile'
270 selectedEvents = cms.untracked.VEventRange(
271 '205666:101:125069341',
272 '205666:161:238160322',
273 '205666:281:443371795',
274 '205666:341:537654884',
275 '205666:361:567121052'
284 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0101.A.storageManager.05.0000.dat',
287 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0161.A.storageManager.08.0000.dat',
293 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0281.A.storageManager.14.0000.dat',
296 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0341.A.storageManager.01.0000.dat',
297 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0361.A.storageManager.02.0000.dat',
315 'file:/afs/cern.ch/user/g/ghete/work/L1Trigger/data/Data.00205666.0721.A.storageManager.04.0000.dat'
320 print 'Error: sample identifier ', sampleIdentifier,
' not defined.\n'
321 errorUserOptions =
True
332 print " Run number: ", runNumber
333 print " Dataset: ", dataset
334 print " Data type: ", dataType
341 myQuery =
'file dataset=' + dataset +
' run=' + runNumber
342 dasClientCommand =
'das_client.py --limit=0 --format=plain --query='+
'"'+myQuery+
'"'
343 data = os.popen(dasClientCommand)
344 filePaths = data.readlines()
347 print '\n das_client using the query'
349 print ' retrieved the following files\n'
351 for line
in filePaths :
354 readFiles.extend(filePaths);
367 if sampleIdentifier ==
'dummy' :
370 'file:/afs/cern.ch/user/g/ghete/scratch0/CmsswTestFiles/LocalFile_source.root'
376 print 'Local file(s)', readFiles
378 if overrideGlobalTag ==
True :
379 globalTag = myGlobalTag
381 if globalTag.count(
'auto') :
382 from Configuration.AlCa.autoCond
import autoCond
383 useGlobalTag = autoCond[globalTag.replace(
'auto:',
'')]
385 useGlobalTag = globalTag+
'::All'
387 print "\n Using global tag ", useGlobalTag,
"\n"