Re: [ROOT] Tree MakeSelector problem

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Feb 15 2002 - 14:44:44 MET


Hi Jacek,

It seems that you have a problem in one of your Selector functions.
The Warning: "Interpreted class z1selector derived from precompiled class"
is OK. The procedure works unless you redefine (it is unlikely) one
of the TObject virtual functions.

Note that the TSelector class can be used directly with CINT or the compiler.
          nSM->Process("z1selector.C","250");    
or
          nSM->Process("z1selector.C++","250");   

In case you want to use the same TSelector for many Trees, it might be better
to use the alternative TTree::Process(TSelector *selector,..)
You can do for example:

TSelector *sel = TSelector::GetSelector("z1selector.C");
or
TSelector *sel = TSelector::GetSelector("z1selector.C++");

          nSM->Process(sel,"250");  
          nNS->Process(sel,"250");   


Rene Brun

Jacek M. Holeczek wrote:
> 
> Hi,
> I admit I haven't used the MakeSelector up to now, but ...
> The root is 3.02/07 on a RH6.2/i386 and egcs-1.1.2.
> The source codes "z1selector.[Ch]" have been created from an TNtuple :
>         SM->MakeSelector("z1selector")
> Then my small script z1b.cxx contains something like :
>         void z1b(void)
>         {
>           TFile *f = new TFile("BlaBla.root");          // line 17
>           TNtuple *nSM = (TNtuple *)f->Get("SM");
>           TNtuple *nNS = (TNtuple *)f->Get("NS");
>         (...)
>           nSM->Process("z1selector.C","250");           // line 36
>           nNS->Process("z1selector.C","250");           // line 37
>         (...)                                           // line 38
>         }
> and I get :
> -------------------
> (...)
> root [0] .x z1b.cxx
> Warning: Interpreted class z1selector derived from precompiled class TSelector FILE:z1selector.h LINE:17
> !!!There are some limitations regarding compiled/interpreted class inheritance
> Function z1b() busy. loaded after "/......././z1b.cxx"
> Error: G__unloadfile() Can not unload "/......././z1b.cxx", file busy FILE:z1b.cxx LINE:37
> *** Interpreter error recovered ***
> Function z1b() busy. loaded after "/......././z1b.cxx"
> Error: G__unloadfile() Can not unload "/......././z1b.cxx", file busy FILE:z1b.cxx LINE:38
> *** Interpreter error recovered ***
> (...)
> -------------------
> Is this normal ? For the beginning I did not change anything in the
> MakeSelector generated files.
> Thanks in advance,
> Jacek.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET