Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TMacro.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/base:$Id$
0002 // Author: Rene Brun   16/08/2005
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TMacro
0013 #define ROOT_TMacro
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TMacro                                                               //
0018 //                                                                      //
0019 // Class supporting a collection of lines with C++ code.                //
0020 // A TMacro can be executed, saved to a ROOT file, edited, etc.         //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TNamed.h"
0025 
0026 class TList;
0027 class TObjString;
0028 class TMD5;
0029 
0030 
0031 class TMacro : public TNamed {
0032 
0033 protected:
0034    TList         *fLines;      //collection of lines
0035    TString        fParams;     //default string of macro parameters
0036 
0037    void           SaveSource(FILE *fp);
0038 
0039 public:
0040    TMacro();
0041    TMacro(const TMacro&);
0042    TMacro(const char *name, const char *title="");
0043    virtual ~TMacro();
0044    TMacro& operator=(const TMacro&);
0045    virtual TObjString  *AddLine(const char *text);
0046    void                 Browse(TBrowser *b) override;
0047    virtual TMD5        *Checksum();
0048    virtual TObjString  *GetLineWith(const char *text) const;
0049    virtual Bool_t       Load() const; //*MENU*
0050    virtual Longptr_t    Exec(const char *params = nullptr, Int_t *error = nullptr); //*MENU*
0051    TList               *GetListOfLines() const {return fLines;}
0052    void                 Paint(Option_t *option="") override;
0053    void                 Print(Option_t *option="") const override;  //*MENU*
0054    virtual Int_t        ReadFile(const char *filename);
0055    virtual void         SaveSource(const char *filename);  //*MENU*
0056    void                 SavePrimitive(std::ostream &out, Option_t *option = "") override;
0057    virtual void         SetParams(const char *params = nullptr); //*MENU*
0058 
0059    ClassDefOverride(TMacro,1)  // Class supporting a collection of lines with C++ code.
0060 };
0061 
0062 #endif