How to get TSelector-processed TTree pointer in PROOF

Dear ROOTers,

I intend to process a TChain with TSelector-inherited selector in PROOF, and need the pointer to current processed TTree in SlaveBegin(). But the argument of SlaveBegin(TTree* tree) is always 0 in PROOF. How can I get this current TTree pointer or the current TFile pointer while running job in PROOF?

–Shuwei

Hi Shuwei,

No tree is open when SlaveBegin is called in PROOF. The argument is there for historical reasons and we plan to drop it as soon as possible.

The Init(TTree *tree) is called after a new tree is loaded with a pointer to the current tree.
Can you move your initialization things in there?

Gerri

Hi Gerri,

I have already moved my initialization to Init(TTree tree). In my example, I need create a transient tree from a tree structure on the fly. It would benefit me if I can get the whole list of files to be processed at the first time when Init(TTree tree) is executed. Is that possible? Or the files to be process on one worker node is dynamic?

–Shuwei

Hi Shuwei,

There is no such concept of “the whole list of files to be processed” as the worker gets assigned dynamically portions of files to process.

But I am not sure to understand why you need that. The tree structure(s) should be the same in all the files, so any file should give you the information that you need.

Cheers,
Gerri

Hi Gerri,

Because the new “transient” TTree created on the fly is associated with the structure of the TTree from a file and the branches/leaves address, it has to be re-created once a new TTree is encountered. I will investigate how to make association between the already existing “transient” TTree and a new TTree from another file.

–Shuwei