[ROOT] Extending TRint

From: Mark Messier (messier@huhepl.harvard.edu)
Date: Wed Dec 20 2000 - 16:42:50 MET


Hi,

I am currently working on an command line interface for the MINOS
experiement. I would like to provide users an interactive way to setup,
run, and examine reconstruction and analysis jobs. For this I need to
accept certain "MINOS specific" commands from the terminal, but would also
like to give the users full access to root for histogram plotting etc.
etc.

One way I thought to do this would be to create a derived class from TRint
and replace the HandleTermInput method. This basically works, but is
clumsy as I have to copy a lot of code from the TRint class into my own
class and lack of access to private data TRint::fNcmd and
TRint::fInterrupt is awkward.

Would it be possible to provide a method like:

virtual int TRint::DerivedProcessLine(const char *s) { return 0; }

so the command processing in TRint would look like:

if (!this->DerivedProcessLine(s)) ProcessLine(s);

Then users could easily extend the TRint interface to command languages
beyond rint and cint, but fall back on rint/cint if they are unable to
process the commands.

Perhaps someone can think of a better way?

Thank you,
Mark
========================================================================
Mark Messier                          e-mail: messier@huhepl.harvard.edu
Harvard University                  http://www.hepl.harvard.edu/~messier
42 Oxford Street                                     Tel. (617) 496-2361
Cambridge, MA 02138 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:40 MET