Re: embedding ROOT (question 2)

From: Fons Rademakers (rdm)
Date: Sat Sep 27 1997 - 11:29:05 MEST


Hi Pasha,

   concerning all your mails about embedding ROOT.

- the idea is to only once create an TApplication or TRint object.
  Since the ctor removes the TApplication specific arguments from the
  argv the second call wil not work as expected (unless you first
  save the argv vector). Anyway, not much will be gained from creating
  and deleting multiple times the TApplication object.

- I agree however that only when entering Run() stty options should be set
  and restored when exiting (currently this happens in the ctor).
  I'll fix this.

- Also I'll give you access to the array of batch files to be executed
  when entering Run().

These new features should be available in the next week version.

Cheers, Fons.

 
> 
> 
> 	As it has been discussed before (see thread "TRint and stty") TRint 
> redefines tty settings. It happens in the constructor. For ROOT running in embedded
> mode for this reason it is not possible to declare 
> 
> TRint* theApp;
> 
> as a global variable and then just construct this variable somewhere during the
> global initialization - this immediately screws up dialog with the application
> into which ROOT is embedded.
> However it seems, that one needs redefined tty parameters only in TRint::Run.
> If this is true, then having TRint::Run, which redefines tty and 
> restores it on exit, would simplify using ROOT in embedded mode (however there
> might be consequences I'm not aware of...). 
> 
> The second question is also related to tty redefinition. For quite a while I've 
> been using Python interpreter in exactly the same embedded mode and never had
> a problem with tty settings being screwed up. Python also supports command line 
> editing and command history, so it looks like it is possible to restore tty 
> settings correctly even in case of abnormal termination. Python source codes
> are freely available (see http://www.python.org), so may be it deserves to take 
> a look at them.
> 
> 					Regards, Pasha.
> 


-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET