ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/bin/mergeHist.py
(Generate patch)

Comparing UserCode/MitAna/bin/mergeHist.py (file contents):
Revision 1.1 by paus, Tue Jan 25 13:52:19 2011 UTC vs.
Revision 1.2 by bendavid, Thu Mar 31 21:12:42 2011 UTC

# Line 15 | Line 15 | def usage():
15   #===================================================================================================
16   def filesExist(path,filenameExpression):
17      exists = False
18 +    
19 +    if not os.path.exists(path):
20 +      return exists;
21 +    
22      for fileName in os.listdir(path):
23          if fnmatch.fnmatch (fileName,filenameExpression):
24              exists = True
# Line 35 | Line 39 | def MergeFilesets(versionList,datasetNam
39  
40          outputMergedFilename = filenameHeader + '_' + dataset + '_' + skimNameList[n] + '.root'
41          inputFilenameRegExp  = filenameHeader + '_' + dataset + '_' + skimNameList[n] + '_????.root'
42 <        command              = setupCmsswCommand + 'hadd -f ' + outputPath + outputMergedFilename \
42 > #        command              = setupCmsswCommand + 'hadd -f ' + outputPath + outputMergedFilename \
43 >        command              = 'hadd -f7 ' + outputPath + outputMergedFilename \
44                                 + ' ' + inputPath + '/' + versionList[n] + '/' + dataset + '/' \
45                                 + inputFilenameRegExp + ' >& ./merging.tmp'
46   #        command              = 'hadd -f ' + outputPath + \
# Line 117 | Line 122 | except IOError:
122      print "Error: The specified dataset list file " + datasetListFile + " could not be opened."
123      sys.exit()
124  
125 + print datasetListFile
126   #===================================================================================================
127   # Read in list of datasets and skim names
128   #===================================================================================================
# Line 124 | Line 130 | lineNumber = 1
130   templine = inputFile.readline()
131   while len(templine.split()) > 0:
132  
133 +   # print "reading line"
134 +   # print templine
135 +
136      # ignore commented lines
137      if (templine[0] == '#'):
138          templine = inputFile.readline()
139          lineNumber += 1
140          continue;
141  
142 +
143 +   # print "processing line"
144      # check what type of list was provided and assume 'noskim' as default
145      if (len(templine.split()) == 7) :
146          tempInputList = templine.split()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines