ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/andersj/HcalPlotter/tests.py
(Generate patch)

Comparing UserCode/andersj/HcalPlotter/tests.py (file contents):
Revision 1.4 by andersj, Fri Oct 14 17:51:23 2011 UTC vs.
Revision 1.6 by andersj, Thu Oct 20 13:51:41 2011 UTC

# Line 1 | Line 1
1   import FWCore.ParameterSet.Config as cms
2   import sys
3 + import os
4 + import re
5  
6   process = cms.Process("Demo")
7  
# Line 28 | Line 30 | process.maxEvents = cms.untracked.PSet(
30      input = cms.untracked.int32(-1)
31   )
32  
33 + datadir = 'tb_data'
34 +
35 + files = ['file:{0}/{1}'.format(datadir,x) for x in os.listdir(datadir) \
36 +         if re.search('_{0:08d}\.\d+'.format(RUNNUMBER), x)]
37 +
38 + #print files
39 +
40   process.source = cms.Source("PoolSource",
41 <    fileNames = cms.untracked.vstring(
33 <    "file:moe5/EcalHcalCombined2011_{0:08d}.0.root".format(RUNNUMBER),
41 >    fileNames = cms.untracked.vstring(files
42      )
43   )
44  
45 + #process.source.fileNames.extend(files)
46 +
47 + print process.source.fileNames
48 +
49   process.TFileService = cms.Service("TFileService",
50      fileName = cms.string('test/tb2011_{0:08d}.root'.format(RUNNUMBER))
51   )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines