22 |
|
help="plot as hollow histograms instead of error bar crosses") |
23 |
|
parser.add_option("--line-width", dest="line_width", |
24 |
|
help="set line width (default is 2)") |
25 |
+ |
parser.add_option("--pdf", action="store_true", dest="plot_savePdf", default=False, |
26 |
+ |
help="save plot as pdf in addition") |
27 |
|
|
28 |
|
|
29 |
|
(arguments, args) = parser.parse_args() |
147 |
|
|
148 |
|
outputFile.cd() |
149 |
|
Canvas.Write() |
150 |
< |
|
150 |
> |
|
151 |
> |
if arguments.plot_savePdf: |
152 |
> |
pdfFileName = outputFileName.replace(".root", ".pdf") |
153 |
> |
Canvas.SaveAs(pdfFileName) |
154 |
> |
print "Saved file: " + pdfFileName |
155 |
|
|
156 |
|
|
157 |
|
for dataset in datasets_needed: |
159 |
|
os.remove(dataset_file) |
160 |
|
|
161 |
|
outputFile.Close() |
162 |
+ |
print "Saved plot in file: " + outputFileName |