Proof-lite and customized class


I just start learning Proof-lite, and so this question may be trivial.

The problem is that: when I store data in a TTree/TChain object by my customized class object.
for example:

TTree* t = new TTree ( "t" , "a very simple tree" );
my_CLASS* testParticle = new my_CLASS();
t->Branch("testParticle", &testParticle );

The Proof-lite seems not able to process it, and I include the “my_CLASS.h” in the “my_selector.h”.
I print out message, and found it cannot go inside to the SlaveBegin().
I test in the sequential mode, the same script works fine.

Also, for testing, I make a simpler branch structure such as:

t->Branch( "x", &x, "x/F");

then the Proof-lite works.

I am wondering how to correctly use object from my_CLASS in the Proof-lite.

My ROOT version is 6.08

Thank you very much in advance.

Dear xination,

The PROOF-Lite workers are separate processes which need to know about the new class, and including my_CLASS.h in my_selector.h is not enough, because the class implementation is missing.
The method TProof::Load is provided for that purpose.
Can you try if doing this

  root[] proof->Load("my_CLASS.cxx+")

(or whatever is called the implementation file) helps?

This said, since you are starting with this and using v6.08, if you are only interested in running on a multicore machine, i.e. not using multi-nodes, you maybe interested in trying the new parallelisation tools we are developing in ROOT. Have a look under tutorials/multicore for examples. We maybe more precise and verbose if you are interested in trying that out.

G Ganis

Dear Ganis,

Thank you very much for your reply and help. I follow the suggestion to load the class implementation, and there is no complaint from running the script and it runs ok to the end, but I still cannot get into the SlaveBegin(); it cannot print out the message in the SlaveBegin() and Process(). ( In the sequential mode I can get these messages)

I attach my very simple scripts here. question.tar.gz (1.3 MB)
Could you please give me a hint what goes wrong.

And also thank you for mentioning multicore, I will definitely take a look.


The logs from Process, SlaveBegin and SlaveTerminate go to the workers log files.
You should be able to have access to them with

  root[] TProofLog *pl = TProof::Mgr("lite://")->GetSessionLogs(0)
  root[] pl->Display("0.1")     // example: display logs from worker '0.1'
  root[] pl->Display()     // example: display logs from all workers

In principle there is also a graphical interface, started with TProof::LogViewer(), but it does not seem to work any longer, I have to check what’s wrong.

G Ganis

Hi Ganis,

Thank you for your reply, I got what you mean (finally), and I can see the message in the log file now. thank you very much again. ~

you maybe interested in trying the new parallelisation tools we are
developing in ROOT.

Could we include a mention to these tools here: ?

1 Like

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