Opening a TFile within Proof


I’ve started using Proof and have been looking at the tutorials.

As an example, I wanted to modify the macro ProofSimple.C to open a local file (hardcoded for the sake of argument). So I added the command

TFile *f = new TFile(“test1.root”, “read”);

to the end of the function ProofSimple::SlaveBegin

When the macro is run in Proof (using runProof), I get the error message

Error in TFile::TFile: file test1.root does not exist

It seems like somewhere the search directory is being changed away from the local directory. Where is this done? How can I get it to point to the local directory. There are directory parameters set in getProof but I’m a bit confused by what is happening there.

I am using root 5.22/00 on RH 4

thanks in advance

Dear Peter,

The PROOF workers have their own working directories which are not the local directory, so you need to specify the full path to the files that you want to open.

Note, however, that if test1.root contains the tree that you want to analyse, you better specify it via a TChain in such a way that PROOF can handle the opening and work distribution for you, something like:

    TChain *mychain = new TChain("<tree_name>")
    TProof *p = TProof::Open("")

Gerri Ganis

PS: please post questions about PROOF on the PROOF section of the forum