Re: Tree Questions

Valery Fine (fine@bnl.gov)
Tue, 12 Jan 1999 11:23:26 -0500


On 12 Jan 99 at 13:13, Norbert Danneberg wrote:

> Hi Root Fans,
>
> I agree completely with the statement of S. P. Wakely. At PSI we are
> doing online monitoring as well as offline analysis with custom
> applications based on root. I personally encountered the problem of
> accessing memberfunctions in splitmode already a few times. Having
> the possibilty to access memeberfunctions would improve the
> efficiency of datanalysis drastically. Instead of wirting analysis
> code based on the TTree->MakeCode one could use the TTree->Draw
> functionality accessing memberfunctions.
>
> Memberfunction could replace a lot of anlysis macros wich do the
> more comlex jobs right now.
>
> Peace & Freedom ,

Hi dear ROOT users

I'd like to call an attention of the ROOT users on two methods of
TObject:

void TObject::Execute(Text_t *method, Text_t *params)
and
void TObject::Execute(TMethod *method, TObjArray *params)

Another useful method is Int_t Calc(char* line). One can
access it via "gInterpreter" ROOT global pointer as follows ("char
*line" is C++ "simple" expression):

gInterpreter->Calc("printf(\"%f\n\",3.14+sin(2.21))")

Somehow you may do the trick you are dreaming about with no
Tree:Draw just "looping" yourself over some container with your
objects right away.

One note: one has to be careful the methods above are not "thread"
save, but

TInterpreter::ProcessLine

is save (under Windows NT at least).

The method below can be used as an example how some method can be
done "thread save" under NT (not perfect but work ;-)

http://root.cern.ch/root/html/TContextMenu.html#TContextMenu:Action

Hope this helps,
Valery
=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 7806
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su