thanks Rene,
it works, thanks to your help
but if you have time, may i understand the following behaviour :
*one produces a dictionnary .so, for example in a "non compiled" program
with
mychain_data->Process("SelectorTest.C+")
*then, put the dependencies in the Makefile
*then the compiled program works (doesn't crash) only if i put : mychain_data->Process("SelectorTest.C+")
==>whereas if i put in the compiled program : mychain_data->Process("SelectorTest.C") // here without the "+" because the .so yet exists.
then it crashes :
would you know why ?
(just in case, full log here :
/afs/cern.ch/user/e/escalier/public/MinimalSelector
it crashes at this instruction (of the compiled program) : mychain_data->Process("SelectorTest.C")
putting some prints, i see that it doesn't do begin the "Begin" of the selector
i put a complete log : "crash.txt"
(i had to do LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. before to launch the
program
)
Inferior 1 [process 14683] will be detached.)
> Marc, > > You need to generate a dictionary for your selector class. If you do not know > how to do it, I strongly recommend to use ACLIC in teh following way that > will automatically generate the dictionary for you and also the processing > will be faster. > > Replace your main.C by mymain.C as > int mymain() > { > TChain *mychain_data=new TChain("PAUReco"); > mychain_data->Add("ntuple.root"); > > return mychain_data->Process("SelectorTest.C+"); //note the "+" > } > > and execute it with > root -l mymain.C > > Rene Brun > > Marc Escalier wrote: >> Dear Rooters, >> >> i occur a problem of compilation when using a class created with a >> MakeSelector : >> >> SelectorTest.o: In function `SelectorTest::IsA() const': >> SelectorTest.C:(.text._ZNK12SelectorTest3IsAEv[SelectorTest::IsA() >> const]+0x7): undefined reference to `SelectorTest::Class()' >> SelectorTest.o:(.rodata._ZTV12SelectorTest[vtable for SelectorTest]+0xe8): >> undefined reference to `SelectorTest::ShowMembers(TMemberInspector&, >> char*)' >> SelectorTest.o:(.rodata._ZTV12SelectorTest[vtable for SelectorTest]+0xec): >> undefined reference to `SelectorTest::Streamer(TBuffer&)' >> >> while i don't occur with one created with MakeClass() >> >> Theses members are not in the class SelectorTest but rather in the TObject >> from which SelectorTest derivates >> An expert told me that the reason would be that the class created by >> MakeSelector would derive from "TObject"... >> >> would you have an idea of what is missing in my code and/or Makefile ? >> >> To make you loose the less time possible, i provide a very minimum >> standalone example here : >> lxplus : >> >> /afs/cern.ch/user/e/escalier/public/MinimalSelector >> >> any suggestion would be appreciated >> >> Thank you >> >> ( >> just in case you would not have time to see the code on lxplus, the >> Makefile is : >> main: SelectorTest.o main.o >> /bin/rm -f main >> g++ -o main `root-config --ldflags --libs --glibs` -lRooFit >> -lRooFitCore -lMinuit main.o SelectorTest.o >> >> SelectorTest.o: SelectorTest.C >> g++ -c `root-config --cflags` SelectorTest.C >> >> main.o: main.C >> g++ -c `root-config --cflags` main.C >> >> clean: /bin/rm *.o >> ) >> > >Received on Tue Jul 13 2010 - 22:37:38 CEST
This archive was generated by hypermail 2.2.0 : Wed Jul 14 2010 - 11:50:01 CEST