Hi Mark,
I think you can do what you want already. Just derive from TRint
and override the TApplication::ProcessLine() method in your class.
In this method do something like:
MyRint::ProcessLine(const char *line, Bool_t sync)
{
// Minos stuff
if (!minos)
TRint::ProcessLine(); //standard command processing
}
Cheers, Fons.
Mark Messier wrote:
>
> 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
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:40 MET