library: libRint #include "TRint.h"

# TRint

class description - source file - inheritance tree (.pdf)

## class TRint : public TApplication

| Inheritance Chart:

`TObject`

`TQObject`

<-

`TApplication`

<-

`TRint`

        public:

                              TRint(const char* appClassName, int* argc, char** argv, void* options = 0, int numOptions = 0, Bool_t noLogo = kFALSE)
                              TRint(const TRint&)
                      virtual ~TRint()
               static TClass* Class()
                virtual char* GetPrompt()
               virtual Bool_t HandleTermInput()
                         void Interrupt()
              virtual TClass* IsA() const
                       TRint& operator=(const TRint&)
                 virtual void PrintLogo()
                 virtual void Run(Bool_t retrn = kFALSE)
                 virtual void SetEchoMode(Bool_t mode)
          virtual const char* SetPrompt(const char* newPrompt) const
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)
                 virtual void Terminate(int status)

### Data Members

        private:

                  Int_t fNcmd           command history number
                TString fDefaultPrompt  default prompt: "root [%d] "
                   char fPrompt[64]     interpreter prompt
                 Bool_t fInterrupt      if true macro execution will be stopped
          TFileHandler* fInputHandler   terminal input handler

## Class Description

     Rint

     Rint is the ROOT Interactive Interface. It allows interactive access
     to the ROOT system via the CINT C/C++ interpreter.

TRint(const char *appClassName, Int_t *argc, char **argv, void *options, Int_t numOptions, Bool_t noLogo) : TApplication(appClassName, argc, argv, options, numOptions)

     Create an application environment. The TRint environment provides an
     interface to the WM manager functionality and eventloop via inheritance
     of TApplication and in addition provides interactive access to
     the CINT C++ interpreter via the command line.

~TRint()

void Run(Bool_t retrn)

     Main application eventloop. First process files given on the command
     line and then go into the main application event loop, unless the -q
     command line option was specfied in which case the program terminates.
     When retrun is true this method returns even when -q was specified.

     When QuitOpt is true and retrn is false, terminate the application with
     an error code equal to either the ProcessLine error (if any) or the
     return value of the command casted to a long.

void PrintLogo()

     Print the ROOT logo on standard output.

char* GetPrompt()

     Get prompt from interpreter. Either "root [n]" or "end with '}'".

const char* SetPrompt(const char *newPrompt)

     Set a new default prompt. It returns the previous prompt.
     The prompt may contain a %d which will be replaced by the commend
     number. The default prompt is "root [%d] ". The maximum length of
     the prompt is 55 characters. To set the prompt in an interactive
     session do:
     root [0] ((TRint*)gROOT->GetApplication())->SetPrompt("aap> ")
     aap>

Bool_t HandleTermInput()

     Handle input coming from terminal.

void Terminate(Int_t status)

     Terminate the application. Reset the terminal to sane mode and call
     the logoff macro defined via Rint.Logoff environment variable.

void SetEchoMode(Bool_t mode)

     Set console mode:

      mode = kTRUE  - echo input symbols
      mode = kFALSE - noecho input symbols

### Inline Functions

                   void Interrupt()
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
                  TRint TRint(const TRint&)
                 TRint& operator=(const TRint&)

Author: Rene Brun 17/02/95
Last update: root/rint:$Name: $:$Id: TRint.cxx,v 1.47 2005/06/06 12:48:37 pcanal Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *