PROOF freezes when starting query

I have a TSelector class (attached) that reads a tree (also attached).

If I run:

TFile* TreeFile = new TFile("./small.root","READ"); TTree* TreeVar = (TTree*) TreeFile->Get("TreeVar"); TreeVar->Process("miselector.C+");
Everything goes right.

If I want to use all CPUs with proof, I tried:

TProof *plite= TProof::Open("lite://"); TChain* chain = new TChain("TreeVar"); chain->Add("./small.root"); chain->SetProof(); chain->Process("miselector.C+");

But then, PROOF window freezes before processing any event and I have to type Ctrl+C in the terminal because the buttons don’t work. The message of the terminal is:

+++ Starting PROOF-Lite with 4 workers +++ Opening connections to workers: OK (4 workers) Setting up worker servers: OK (4 workers) PROOF set to parallel mode (4 workers) Info in <TProofLite::SetQueryRunning>: starting query: 1
And there it freezes without permitting typing anything but Ctrl+C to interrupt.

I use ROOT 5.26

Can you indicate me what am I doing wrong? Thank you in advance.
small.root (1.97 MB)
miselector.C (4.32 KB)
miselector.h (7.78 KB)

Hi,
Sorry for the late reply.
Two things:

  1. The special protocol “lite://” was only introduced in 5.30 as part of a re-organization of TProof::Open. For previous versions this has the effect to try to initialize PROOF at a non-existing master.
  2. The file paths must be full, because the PROOF processes are independent processes with their own working dirs

Try the following:

TProof *plite= TProof::Open("");
TChain* chain = new TChain("TreeVar");
chain->Add(Form("%s/small.root", gSystem->WorkingDirectory());
chain->SetProof();
chain->Process("miselector.C+");

Two additional things:

  1. The PROOF overhead for a single small file is probably such that you’ll see no speed-up; it will be probably slower than direct TTree local processing.
  2. PROOF is in constant eveolution. Unless you have strong constraints, you should really move away from 5.26 to a more recent version.

G. Ganis