Problems with loop on a TClonesArray

Dear Proof experts,
I’m using Root v 5.27/06 and I’m trying to use Proof.
I created a class MyAnalysis inheriting from TSelector and a simple macro for running. If you need to look at my code, you can find it in dir /afs/, whereas if you need an input root file for test, feel free to ask me.
I’d like to analyze an input TTree, composed by some branches with leaves and some branches without.
I’m following tutorials in $ROOTSYS/tutorials/proof/ProofEventProc.h.C where in method Process(entry) there is a loop on a TClonesArray, whitch is loaded from the input root file as a branch.
I tried to do the same in my code, but when I tried to loop on a TClonesArray I obtained this error message:

[code]Info in TProofLite::MarkBad:
+++ Message from master at : marking (0.0) as bad
+++ Reason: undefined message in TProof::CollectInputFrom(…)

+++ Most likely your code crashed
+++ Please check the session logs for error messages either using
+++ the ‘Show logs’ button or executing
+++ root [] TProof::Mgr(“”)->GetSessionLogs()->Display("*")

*** Break *** segmentation violation


This is what I get when I try to loop on an input branch, regardless of the number of workers I use, whereas I can successfully menage the simple leaves of my root file and related histograms.
Any help is very welcome.

Thank you very much in advance.


There is a major difference between your implementation and ProofEventProc: in Init you create a TClonesArray object with ‘new’ while you should set the pointer to 0.
I think you have already tried that way and probably got a crash. But we should try to debug that way.

Could you post the logs of the crashes?
You get do it with TProof::LogViewer, anytime after a crash (close ROOT and restart it). See … flogviewer .

G. Ganis

I already tried with the pointer initialized to zero, but the error message is the same… :frowning:
I put the crash log (obtained using only one worker) in my dir /afs/, since the extension .log is not allowed for attachments in this forum.
I hope in good news…

Regards, Lucia.

Hi Lucia,

Ok. Could you provide a test file? Even a small one …

I will try to reproduce the problem and see if I can to solve it.

Thanks, Gerri

Hi Gerry,
I copied in the usual dir /afs/ a small root file for your tests.
If you need something else, please aks me.

Thank you very much, Lucia.

Hi Lucia,

Thanks for the file. I could reproduce the problem and understand the origin.
The main issue is that the TTree was saved in split mode and you were trying to read it in non split mode.
In split mode your branch AllMuons is split in all its components.
To see this you can create a selector from your TTree with MakeSelector: just open the file that you gave me and run Tree.MakeSelector("<sel_name>"): you will find many more branches …
To read in one go you have to remove the call to SetMakeClass(1) in Init, which basically tells the system that the TTree is in split mode.

The other issue is that just loading locally the library is not enough to have it available in the PROOF workers. For PROOF-Lite this could be the case, but unfortunately it is not yet. The best is to load the library via a PAR file. I made one for this case and added to the attached tarball.

In the attached tarball you’ll find the modification to you selector which should work, the PAR file, how to use it in the steering macro, and an example of selector created with TTree::MakeSelector.

Please try and let me know.

ProofCode.tgz (35.9 KB)