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 |
|
|
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) |
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 |
|
|