Print canvas without screen display

Hi Root users.

I have a C++ standalone application which generate several hundred graph and histogram. For accelerate process i would like print canvas to a file without canvas display.
Is it possible ? perhaps with batch option ?


Yes exactly:

$ root -b

@couet Ok option -b is for a ROOT script. But i have a standalone C++ application…

Ah ok, the equivalent of the -b option for the root command can be done programmatically with:


@couet : thanks. but i don’t find how i can acces to gROOT instance ?

It is enough to do:

#include <TROOT.h>

gROOT is a global variable defined in that file.

great :slight_smile: thanks a lot it’s work. I can generate several hundreds canvas in few seconds.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.