ROOT logo
// @(#)root/base:$Id: TMacro.h 20877 2007-11-19 11:17:07Z rdm $
// Author: Rene Brun   16/08/2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TMacro
#define ROOT_TMacro

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TMacro                                                               //
//                                                                      //
// Class supporting a collection of lines with C++ code.                //
// A TMacro can be executed, saved to a ROOT file, edited, etc.         //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TList;
class TObjString;
class TMD5;


class TMacro : public TNamed {

protected:
   TList         *fLines;      //collection of lines
   TString        fParams;     //default string of macro parameters

public:
   TMacro();
   TMacro(const TMacro&);
   TMacro(const char *name, const char *title="");
   virtual ~TMacro();
   TMacro& operator=(const TMacro&);
   virtual TObjString  *AddLine(const char *text);
   virtual void         Browse(TBrowser *b);
   virtual TMD5        *Checksum();
   virtual TObjString  *GetLineWith(const char *text) const;
   virtual Long_t       Exec(const char *params = 0, Int_t* error = 0); //*MENU*
   TList               *GetListOfLines() const {return fLines;}
   virtual void         Paint(Option_t *option="");
   virtual void         Print(Option_t *option="") const;  //*MENU*
   virtual Int_t        ReadFile(const char *filename);
   virtual void         SaveSource(const char *filename);  //*MENU*
   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
   virtual void         SetParams(const char *params=0); //*MENU*

   ClassDef(TMacro,1)  // Class supporting a collection of lines with C++ code.
};

#endif
 TMacro.h:1
 TMacro.h:2
 TMacro.h:3
 TMacro.h:4
 TMacro.h:5
 TMacro.h:6
 TMacro.h:7
 TMacro.h:8
 TMacro.h:9
 TMacro.h:10
 TMacro.h:11
 TMacro.h:12
 TMacro.h:13
 TMacro.h:14
 TMacro.h:15
 TMacro.h:16
 TMacro.h:17
 TMacro.h:18
 TMacro.h:19
 TMacro.h:20
 TMacro.h:21
 TMacro.h:22
 TMacro.h:23
 TMacro.h:24
 TMacro.h:25
 TMacro.h:26
 TMacro.h:27
 TMacro.h:28
 TMacro.h:29
 TMacro.h:30
 TMacro.h:31
 TMacro.h:32
 TMacro.h:33
 TMacro.h:34
 TMacro.h:35
 TMacro.h:36
 TMacro.h:37
 TMacro.h:38
 TMacro.h:39
 TMacro.h:40
 TMacro.h:41
 TMacro.h:42
 TMacro.h:43
 TMacro.h:44
 TMacro.h:45
 TMacro.h:46
 TMacro.h:47
 TMacro.h:48
 TMacro.h:49
 TMacro.h:50
 TMacro.h:51
 TMacro.h:52
 TMacro.h:53
 TMacro.h:54
 TMacro.h:55
 TMacro.h:56
 TMacro.h:57
 TMacro.h:58
 TMacro.h:59
 TMacro.h:60
 TMacro.h:61