I usually save plots in .pdf format because I can reasonably assume when I email them to colleagues, they will be able to open them. Unfortunately the same cannot be said for .C or .root files (the colleagues may not have ROOT installed). Thus I often end up saving parallel .C and .pdf when using the TCanva::SaveAs method.
Unfortunately I get lazy (as anyone would) and usually just save in .pdf form, but then when I later need to edit the plot (e.g. my supervisor says my colours are ugly, or font size is hard to read, or change label), this is now difficult. Sometimes the exact script that made the plot is available to be re-run, but sometimes it is not (or it is expensive to run).
My proposal is this: when saving a plot in a graphical format like .pdf or .(e)ps, is it possible to also embed the “.C” format in the same file? Then ROOT could be configured to look for the .C format information if you ask it to open a .pdf or .eps file.
Note:
- am fully aware that this is me looking for a technical solution to a human-organization problem, but maybe others think this is a good idea
- I don’t really know how much the .pdf file size would be inflated by this procedure. Certainly it would be optional (e.g. SaveAs(“foo.pdf+C”) or some such syntax) to avoid making everyone’s pdfs bigger.
- I don’t know enough about graphical file formats to know when this is actually possible. Certainly for ps/eps, the “.C” information could be contained in specially-formatted comments for example.
Jean-François