Re: [ROOT] thread / display update

From: Joern Adamczewski (J.Adamczewski@gsi.de)
Date: Thu Oct 04 2001 - 15:22:19 MEST


Hi Peter,

the problem with the segv in your modified example vanishes
if you create the canvas outside the thread, e.g. as a
global canvas, or as a canvas belonging to a class as a member.
(see examples mhs3 and TMhs
on http://www-linux.gsi.de/~go4/HOWTOthreads/, 
where we use global graphics pads)

>From our tests in the course of these examples we always had
trouble when the TCanvas was instantiated in the thread itself;
maybe this is due to the fact that any Xaction on the canvas
is handled by the TThread timer using a thread specific data array
pointing to that canvas. However, I did not investigate that in
detail; in fact for our purposes we always use canvases which
are already existing when the threads start working on them.

Peter Christ wrote:
> 
> Hi,
> 
> I'm totally new to ROOT and I plan to use it to develop a program for
> data-aquisition. For that the data display should be updated whenever
> new data are available (rate: few/s to 1/10s).
> The problem: the display should not be locked then i.e. it should be
> possible to change ranges etc.
> Is that possible - and how?
> 
Since we use threads for a similar purpose,
you might have a look at the website of the GSI go4 project
http://go4.gsi.de/
where you can find documentation of a display which
is asynchronously updated by a remote analysis task.
Moreover, we could give you a Threadmanager library
based on the root threads which might be useful for 
development of any own threaded applications in root.
(this library  might be officially released in the
near future, but is already working).

Please let me know if there should be any further
questions and problems concerning the examples, and
your experiences with the root threads.


Best regards,

	Joern

-- 
/////////////////////////////////////////////////////////////////////
// Dr. J"orn Adamczewski                    (J.Adamczewski@gsi.de) // 
// GO4 project team                         Tel: +49-6159-71-2554  //
// Datenverarbeitung & ExperimentElektronik FAX: +49-6159-71-2986  //
// Ges. f. SchwerIonenforschung, Planckstr.1,  D-64291 Darmstadt   //



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:02 MET