TMacro.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TMacro.h 20877 2007-11-19 11:17:07Z rdm $
00002 // Author: Rene Brun   16/08/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TMacro
00013 #define ROOT_TMacro
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TMacro                                                               //
00018 //                                                                      //
00019 // Class supporting a collection of lines with C++ code.                //
00020 // A TMacro can be executed, saved to a ROOT file, edited, etc.         //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027 
00028 class TList;
00029 class TObjString;
00030 class TMD5;
00031 
00032 
00033 class TMacro : public TNamed {
00034 
00035 protected:
00036    TList         *fLines;      //collection of lines
00037    TString        fParams;     //default string of macro parameters
00038 
00039 public:
00040    TMacro();
00041    TMacro(const TMacro&);
00042    TMacro(const char *name, const char *title="");
00043    virtual ~TMacro();
00044    TMacro& operator=(const TMacro&);
00045    virtual TObjString  *AddLine(const char *text);
00046    virtual void         Browse(TBrowser *b);
00047    virtual TMD5        *Checksum();
00048    virtual TObjString  *GetLineWith(const char *text) const;
00049    virtual Long_t       Exec(const char *params = 0, Int_t* error = 0); //*MENU*
00050    TList               *GetListOfLines() const {return fLines;}
00051    virtual void         Paint(Option_t *option="");
00052    virtual void         Print(Option_t *option="") const;  //*MENU*
00053    virtual Int_t        ReadFile(const char *filename);
00054    virtual void         SaveSource(const char *filename);  //*MENU*
00055    virtual void         SavePrimitive(ostream &out, Option_t *option = "");
00056    virtual void         SetParams(const char *params=0); //*MENU*
00057 
00058    ClassDef(TMacro,1)  // Class supporting a collection of lines with C++ code.
00059 };
00060 
00061 #endif

Generated on Tue Jul 5 14:10:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1