ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py
(Generate patch)

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeCutFlows.py (file contents):
Revision 1.5 by lantonel, Tue Feb 5 10:49:41 2013 UTC vs.
Revision 1.6 by ahart, Wed Feb 6 00:28:41 2013 UTC

# Line 122 | Line 122 | for channel in channels: # loop over fin
122      fout.write ("\\section{" + channel + " channel}\n\n")
123      fout.close ()
124  
125 <    args = ""
126 <    hist = channel + "CutFlow"
125 >    cutFlowArgs = ""
126 >    selectionArgs = ""
127 >    minusOneArgs = ""
128      #print hist
129      for dataset in processed_datasets:
130              dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset)
131              #print dataset_file
132 <            args = args + " " + dataset_file
133 <            args = args + " " + hist
132 >            cutFlowArgs = cutFlowArgs + " " + dataset_file
133 >            selectionArgs = selectionArgs + " " + dataset_file
134 >            minusOneArgs = minusOneArgs + " " + dataset_file
135 >            cutFlowArgs = cutFlowArgs + " " + channel + "CutFlow"
136 >            selectionArgs = selectionArgs + " " + channel + "Selection"
137 >            minusOneArgs = minusOneArgs + " " + channel + "MinusOne"
138  
139              rawlabel = "$" + labels[dataset] + "$"
140              label = rawlabel.replace("#","\\")
141              label = "'" + label + "'"
142              #print label
143 <            args = args + " " + label
143 >            cutFlowArgs = cutFlowArgs + " " + label
144 >            selectionArgs = selectionArgs + " " + label
145 >            minusOneArgs = minusOneArgs + " " + label
146  
147  
148      #make cutFlowTable objects
149 <    os.system("cutFlowTable -l %g %s >> %s" % (intLumi,args,texfile))
149 >    fout = open (texfile, "a")
150 >    fout.write ("\\subsection{Cut Flow}\n\n")
151 >    fout.close ()
152 >    os.system("cutFlowTable -l %g %s >> %s" % (intLumi,cutFlowArgs,texfile))
153 >    fout = open (texfile, "a")
154 >    fout.write ("\\pagebreak\n\n")
155 >    fout.write ("\\subsection{Individual Selection}\n\n")
156 >    fout.close ()
157 >    os.system("cutFlowTable -l %g %s >> %s" % (intLumi,selectionArgs,texfile))
158 >    fout = open (texfile, "a")
159 >    fout.write ("\\pagebreak\n\n")
160 >    fout.write ("\\subsection{Minus One}\n\n")
161 >    fout.close ()
162 >    os.system("cutFlowTable -l %g %s >> %s" % (intLumi,minusOneArgs,texfile))
163  
164   for dataset in processed_datasets:
165      dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines