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

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeYieldsTables.py (file contents):
Revision 1.3 by lantonel, Fri Aug 16 14:45:45 2013 UTC vs.
Revision 1.4 by lantonel, Fri Aug 16 14:57:24 2013 UTC

# Line 29 | Line 29 | parser.remove_option("--2D")
29   parser.remove_option("-y")
30   parser.remove_option("-p")
31  
32 + parser.add_option("-s", "--standAlone", action="store_true", dest="standAlone", default=False,
33 +                  help="adds the necessary header to be able to compile it")
34 +
35  
36   (arguments, args) = parser.parse_args()
37  
# Line 118 | Line 121 | for sample in processed_datasets:
121   for channel in channels:
122      outputFile = condor_dir + "/yields_" + plainTextString(channel) + ".tex"
123      fout = open (outputFile, "w")
124 +    if(arguments.standAlone):
125 +        fout.write("\\documentclass{article}"+newLine+"\\begin{document}"+newLine)
126      fout.write ("\\makebox[0pt]{\\renewcommand{\\arraystretch}{1.2}\\begin{tabular}{lr}"+newLine+hLine)
127  
128      fout.write("Event Source & Event Yield $\pm$ 1$\sigma$ (stat.)"+endLine+newLine+hLine)
# Line 148 | Line 153 | for channel in channels:
153          label = rawlabel.replace("#","\\").replace("\\rightarrow","{\\rightarrow}").replace(" ","\\ ")
154          fout.write(label + " & " + yields[sample][channel] + " $\pm$ " + errors[sample][channel] + endLine + newLine)
155                                              
156 <    fout.write("\\end{tabular}}")
156 >    fout.write("\\end{tabular}}"+newLine)
157 >    if(arguments.standAlone):
158 >        fout.write("\\end{document}"+newLine)
159 >
160      fout.close()
161  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines