Display PROOF query progress

Is it possibile to display the PROOF query progress in a compiled application the runs a proof session?

Hi,

Graphically or in text mode?

In batch mode, the default function called to display the progress bar can be replaced by a call to

TProof::SetPrintProgress(PrintProgress_t pp)

the signature of PrintProgress_t is defined in TProof.h

typedef void (*PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t proctime, Long64_t bytes);

There is an example in test/stressProof.cxx .

In graphic mode you have to connect to the signal updating the standard progress bar. This is perhaps bit more complicated, depending on your experience with ROOT GUIs. The PROOF progress dialog is implemented in the class gui/sessionviewer/src/TProofProgressDialog.cxx and related classes.

Gerri

[quote=“ganis”]Hi,

Graphically or in text mode?

[/quote]

graphically. Now I have

int main(int argc, char *argv[])
{
...
p->Process(set, "src/HistoFillingProof.C+g", "", 10000);
gSystem->Exit(0);
}

and when I execute it I got a text progress bar, I would like to show the usual one displayied when I run proof from interpreted script in graphics mode.

Hi,

For that you need to initialize the graphics environment.
Perhaps the easier way is to create a dummy TApplication instance before starting PROOF.
Something like this may work:

#include "TApplication.h"
int main(int argc, char *argv[])
{

    new TApplication("myProg", 0, 0);
...
    p->Process(set, "src/HistoFillingProof.C+g", "", 10000);
    gSystem->Exit(0);
}

The standard dialog box should pop up (it will disappear at gSystem->Exit(0), though).

Gerri

perfect, thanks, it works. It’s very simple, I should first try