Root2ps

A simple but useful utility.

It reads a rootfile and prints out all TCanvas, TH1 and TH2 ojects into a postscript file, each object on one page.

Can be compiled as standalone or within root utilities.

Code is based on hadd.
Standalone compiling environment/manual copied from roo2h.

Comments welcome.

Tschau,

Bjoern
root2ps.tar.gz (2.97 KB)

Hi Bjoern,

I looked at your tool. This could become a useful utility. It still requires some work to make it a bit more general. I have the following suggestions;
-adapt the tool such that sub-directories are automatically processed, like in hadd.
-give the possibility to divide the canvas into nxm pads
-name of ps file optional, ie
root2ps myfile.root
will produce automatically myfile.ps
-in addition to ps, give the possibility to produce
-a pdf file; root2ps myfile.root myfile.pdf
-animated gif file : root2ps myfile.root myfile.gif
-may be find a simple way to specify additional directives like
-style
-default options to draw TH1, TH2, TGraph, etc

Rene

Hi Rene!

Thanks for the response.

Recursive directories is already done.
Optional ps name is easy to do in a few minutess.
Parameter processing is as always… hm … work.

I will post a modified version when finished.

Tschau,

Bjoern

Bjoern,

I did not succeed with files having sub-directories and I had no time to investigate why ::slight_smile:

Rene

Maybe because I did not post the newest code version yet. sorry.
Here it is.

about pdf output:
Why is the this Print(“filename.ps[”) opening scheme not supported for pdfs but only for ps?

Tschau,

Bjoern

root2ps.cxx (2.34 KB)

Cumulating images using () or [] in an output file is implemented for PS and EPS outputs only. It is much more complex to do it for PDF due to the internal structure of the PDF files. To be done.

Hi!

An updated version of root2ps.

Added some things quiet some while ago.
Even so not all requested feature are added I think ist time to share it.

Tschau,

Bjoern
root2ps.tar.gz (3.9 KB)

Hi Bjoern,

Thanks for your update. I will look at it in view to include it in the ROOT distribution. Also I’ll try to see if we can do the same for PDF files. I’ll let you know.

Cheers, Olivier

Hi Bjoern,

When I run your root2ps program it says:

Is that something we really want ? Other applications like h2root do not have a such startup file. What is/are the reason(s) why we would like to have a such startup file ? Moreover, calling it rootlogon.C, even if it sits in a special hidden directory, might be confusing with the real rootlogon.C.
What do you think ?

Cheers, Olivier

[quote=“couet”]Hi Bjoern,

When I run your root2ps program it says:

Is that something we really want ? Other applications like h2root do not have a such startup file. What is/are the reason(s) why we would like to have a such startup file ? Moreover, calling it rootlogon.C, even if it sits in a special hidden directory, might be confusing with the real rootlogon.C.
What do you think ?
[/quote]

The idea behind was that you can define colors, styles, etc seperatly without having the trouble to parse this by command line.
Using the “global” file might be a better solution. But I would like to set it seperatly. Anyway, if the file is not existing, it does not matter.

Using the standard rootlogon.C has another disadvantage. You never know where it is. For example, it could be always in “.”. In that case, root2ps will behave differntly depending on where it was executed. This would be a very surprising behaviour.

Any ideas?

Tschau,

Bjoern

see rootprint.