Re: TMinuit help system

Rene Brun (Rene.Brun@cern.ch)
Tue, 27 Oct 1998 12:52:32 +0100


Hi Alexander,
I have implemented your suggestions in the coming version 2.00/13

Rene Brun

Alexander Zvyagin wrote:
>
> IHEP, Protvino, Russia, 25-OCT-1998
>
> Dear ROOTers and ROOT developers!
>
> It seems that TMinuit help system is difficalt in usage. (I faild to get help
> about MIGRAD Minuit command via function TMinuit::mnhelp). Some very simple
> requests are wrong:
> gMinuit->mnhelp();
> gMinuit->mnhelp("");
> gMinuit->mnhelp("?");
> gMinuit->mnhelp("help");
> gMinuit->mnhelp("HELP");
> gMinuit->mnhelp("MIGRAD");
> .....
>
> Below I propose some improvements in mnhelp function (I think so...). Current
> code is marked
> "OLD:" at the beginning of line.
>
> 1.
> class TMinuit : public TNamed {
> ...
> OLD: void mnhelp(TString comd);
> NEW:
> void mnhelp(TString comd=""); // Set default value
>
> 2.
> void TMinuit::mnhelp(TString comd)
> {
> .....
> //*-*.......................................................................
> //*-*
> //*-* Global HELP: Summary of all commands
> //*-* ====================================
> //*-*
> OLD: if (comd == '*')
> NEW:
> comd.ToUpper(); // convert all symbols to uppercase
>
> if( comd=='*' || comd=='?' || comd=="" || comd=="HELP" )
> {
> Printf(.....);
> ...
> Printf(.....);
> }
>
> if( !strncmp(comd.Data(),"CLE",3) ) {
> ....
> }
>
> if( !strncmp(comd.Data(),"MINI",4) ) {
> ...
> }
>
> And so on for all commands (comparision only first several symbols).
> The implemination is simple and greatly improve help system of TMinuit.
>
> May be it will be better to introduce function
>
> TString::CompareNTo(char* cs, int N, TString::ECaseCompare cmp = kExact)
>
> for comparing only first N symbols.
>
> With best wishes,
> Alexander.