PROOF begining help

Before anything, thanks by your great work, it’s been awesome work with ROOT/PROOF.

I have in “my hands” a analysis code that was doing the loop over the events with a simple for, I successfully ported the code to use TSelector API.

Here is a the core part of the main function:

[code]int main(int argc, const char *argv[]) {
// some arg tests
// creates TChain
TChain * m_fchain = new TChain(“mini”);
// Add files to chain
// …

// m_fchain->SetProof();

// Creates TSelector derived class
mini2 validation(argv[1],argv[2]);
// Process
m_fchain->Process(&validation);

return 0;

}[/code]

This code e trouble happens when I try to activate Proof-Lite for this code, I got this warning:

I did something wrong?

I have tried to use my Selector in root console like explained here:

[quote]root [] TProof *proof = TProof::Open("")
root [] proof->Load(“MySelector.C+”) // Load locally and on the cluster
root [] MySelector *mysel = new MySelector(arg1, arg2)
root [] mysel->setMyParms(par1, par2, par3)
root [] proof->Process(mysel, 1000000)[/quote]

It can not compile the Selector because I’m using libraries that the compiler don’t know about, is there a way that I could configure the “+” compiler call?

Hi,

Sorry for the late reply.
Selector processing by object in PROOF is only available starting with ROOT 5.34.
Which ROOT version are you using?

The best is probably to load your selector via a PAR file:
root.cern.ch/drupal/content/work … -par-files .
There in BUILD.sh you can do what you wish. Of course you need to setup correctly the environment in SETUP.C .

G. Ganis

I was using ROOT 5.32, now I changed to 5.34.
I managed to configure the environment with LD_LIBRARY_PATH and CPLUS_INCLUDE_PATH, but now PROOF is complaining of this:

How can I properly initialize TDSet?

I’m using PROOF like this:

TProof::Open(""); TChain *c = new TChain("../inputs/BBS_atl_all_VLQ_all.root"); c->SetProof(); c->Process("mini.cxx+"); .q

I already try the non-interactive way, but also didn’t work:

Using the interactive PROOF initialization, described bellow, I got this error:

This is my program:

[code]
//usual includes
#include <TProof.h>

//lots of code

int main(int argc, const char *argv[]) {

TChain * m_fchain = new TChain("mini");
// Add files to chain

TProof *p = TProof::Open("");
m_fchain->SetProof();

mini2 validation(argv[1],argv[2]);
m_fchain->Process(&validation);

return 0;

}[/code]

Thanks!

TChain requires the name of the TTree in the constructor, not the file name:
root.cern.ch/root/html/TChain.html .

Try with

TProof::Open("");
TChain *c = new TChain("mini");
c->AddFile("../inputs/BBS_atl_all_VLQ_all.root");
c->SetProof();
c->Process("mini.cxx+");

[quote=“RSFalcon7”]Using the interactive PROOF initialization, described bellow, I got this error:
CODE: SELECT ALL
undefined reference to `TProof::Open(char const*, char const*, char const*, int)’
[/quote]
Your code sample contains a main function, so you must be compiling and linking it to make an executable:
how do you do that?

G. Ganis

Thanks by your fast reply!

On the interactive mode, now I have a trouble loading my libs, if I didn’t manage to configure with the environment vars, then I’m will learn to use a PAR file.

On the non-interactive mode, I’m using a makefile. All the ROOT flags were to come from root-config.

Following a tip from here I managed to add -lProof the linker flags which seems to work.

Nevertheless, now I have a segmentation fault, this is stack trace:

[code]===========================================================
There was a crash.
This is the entire stack trace of all threads:

#0 0x00007ffc78cc443e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffc78c4a29e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffc7b26d8b7 in TUnixSystem::StackTrace() () from /home/rafael/.bin/root/lib/libCore.so
#3 0x00007ffc7b270193 in TUnixSystem::DispatchSignals(ESignals) () from /home/rafael/.bin/root/lib/libCore.so
#4
#5 0x00007ffc74e178e6 in TGCompositeFrame::TGCompositeFrame(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /home/rafael/.bin/root/lib/libGui.so
#6 0x00007ffc74e17d0b in TGMainFrame::TGMainFrame(TGWindow const*, unsigned int, unsigned int, unsigned int) () from /home/rafael/.bin/root/lib/libGui.so
#7 0x00007ffc74e18a80 in TGTransientFrame::TGTransientFrame(TGWindow const*, TGWindow const*, unsigned int, unsigned int, unsigned int) () from /home/rafael/.bin/root/lib/libGui.so
#8 0x00007ffc74939ffe in TProofProgressDialog::TProofProgressDialog(TProof*, char const*, int, long long, long long) () from /home/rafael/.bin/root/lib/libSessionViewer.so
#9 0x00007ffc7497ddf6 in G__G__SessionViewer_136_0_2(G__value*, char const*, G__param*, int) () from /home/rafael/.bin/root/lib/libSessionViewer.so
#10 0x00007ffc780e77af in Cint::G__CallFunc::Execute(void*) () from /home/rafael/.bin/root/lib/libCint.so
#11 0x00007ffc7b22f1d1 in TCint::CallFunc_ExecInt(void*, void*) const () from /home/rafael/.bin/root/lib/libCore.so
#12 0x00007ffc7b257777 in TMethodCall::Execute(void*, long&) () from /home/rafael/.bin/root/lib/libCore.so
#13 0x00007ffc7b1c8cd3 in TPluginHandler::ExecPlugin(int, …) () from /home/rafael/.bin/root/lib/libCore.so
#14 0x00007ffc7a1d3df9 in TProofLite::Process(TDSet*, char const*, char const*, long long, long long) () from /home/rafael/.bin/root/lib/libProof.so
#15 0x00007ffc7a19d4d4 in TProof::Process(TDSet*, TSelector*, char const*, long long, long long) () from /home/rafael/.bin/root/lib/libProof.so
#16 0x000000000040fb44 in main (argc=, argv=0x7fff848cc938) at mini2.cxx:283

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00007ffc74e178e6 in TGCompositeFrame::TGCompositeFrame(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) () from /home/rafael/.bin/root/lib/libGui.so
#6 0x00007ffc74e17d0b in TGMainFrame::TGMainFrame(TGWindow const*, unsigned int, unsigned int, unsigned int) () from /home/rafael/.bin/root/lib/libGui.so
#7 0x00007ffc74e18a80 in TGTransientFrame::TGTransientFrame(TGWindow const*, TGWindow const*, unsigned int, unsigned int, unsigned int) () from /home/rafael/.bin/root/lib/libGui.so
#8 0x00007ffc74939ffe in TProofProgressDialog::TProofProgressDialog(TProof*, char const*, int, long long, long long) () from /home/rafael/.bin/root/lib/libSessionViewer.so

[/code]

Rafael

Most probably you have a problem with missing graphic/gui libraries. Try to use ‘root-config --glibs’ instead of ‘root-config --libs’.
Also, if you really want to have your standalone application, you should terminate it using ‘gSystem->Exit(0)’ for properly ordered clean-up. There may be other things to care about.

G. Ganis

I’m using both root-config --glibs and root-config --libs.

Thanks by your fast reply,

Rafael

I disable the progress dialog, by following your instructions from [url=https://root-forum.cern.ch/t/disable-gui-in-proof-lite/10388/1 and I’m finally getting errors in my Selector.

Thanks!