Re: [ROOT] methods called by signals/timer = THREAD ???

From: Brett Viren (bv@bnl.gov)
Date: Fri Mar 08 2002 - 17:04:59 MET


Anton Fokin writes:
 > Some time ago I heard someone was trying to interface
 > http://libsigc.sourceforge.net/ direct callback signals/slot library
 > (direct calls via template mechanism). Any news?

I guess that is me.

For an event display I am writing I am wrapping the subset of TG
classes I need in order to provide memory management, better
sig/slots, IMO, by using libsigc++ 1.1.  Additionally I hide some of
the "warts" in the TG classes, eg, the need to explicitly create and
manage layout hints.  Most of the ideas in these wrappers are stolen
from Gtkmm.  (The good ones anyways, the bad ones are all mine).

The one downside to using libsigc++ (one that doesn't effect me) is
that there is no way to connect an interpreted slot to a compiled
signal or vice versa.  In fact, it is probably impossible to use
libsigc++ in CINT at all due to less than 100% support for templates.
This is pure supposition as I haven't actually tried it.

Since the root team graciously changed all Rt signal emitter methods
to be virtual it is fairly trivial to plug in libsigc++ signals in
root signal emitting classes.

My attempt isn't really packaged up for external use, but you can
browse what I have at:

http://minos.phy.bnl.gov/~bviren/minos/software/MIDAD-X/

Look at the Gui* classes.  

The wrapping approach I took is a little bit awkward since I don't
know of a good way to mirror inheritance in the ROOT classes while
still having inheritance in my Gui* classes.

If anyone actually digs into these, I would be happy to discuss them
further.

-Brett.



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