00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ROOT_TTreeTableInterface
00012 #define ROOT_TTreeTableInterface
00013
00014 #ifndef ROOT_TVirtualTableInterface
00015 #include "TVirtualTableInterface.h"
00016 #endif
00017
00018 class TTree;
00019 class TObjArray;
00020 class TTreeFormula;
00021 class TTreeFormulaManager;
00022 class TSelectorDraw;
00023 class TEntryList;
00024 class TList;
00025
00026
00027 class TTreeTableInterface : public TVirtualTableInterface {
00028
00029 private:
00030 TTree *fTree;
00031 TList *fFormulas;
00032 Long64_t fEntry;
00033 Long64_t fNEntries;
00034 Long64_t fFirstEntry;
00035 TTreeFormulaManager *fManager;
00036 TTreeFormula *fSelect;
00037 TSelectorDraw *fSelector;
00038 TList *fInput;
00039 Bool_t fForceDim;
00040 TEntryList *fEntries;
00041 UInt_t fNRows;
00042 UInt_t fNColumns;
00043
00044 void SetVariablesExpression(const char *varexp);
00045 void SyncFormulas();
00046 void InitEntries();
00047
00048 protected:
00049
00050 public:
00051 TTreeTableInterface(TTree *tree = 0, const char *varexp = 0,
00052 const char *selection = 0, Option_t *option = 0,
00053 Long64_t nentries = 0, Long64_t firstentry = 0);
00054 virtual ~TTreeTableInterface();
00055
00056 virtual Double_t GetValue(UInt_t row, UInt_t column);
00057 virtual const char *GetValueAsString(UInt_t row, UInt_t column);
00058 virtual const char *GetRowHeader(UInt_t row);
00059 virtual const char *GetColumnHeader(UInt_t column);
00060 virtual UInt_t GetNRows();
00061 virtual UInt_t GetNColumns();
00062 virtual TEntryList *GetEntryList() { return fEntries; }
00063
00064 virtual void AddColumn(const char *expression, UInt_t position);
00065 virtual void AddColumn(TTreeFormula *formula, UInt_t position);
00066 virtual void RemoveColumn(UInt_t position);
00067 virtual void SetFormula(TTreeFormula *formula, UInt_t position);
00068 virtual void SetSelection(const char *selection);
00069 virtual void SetEntryList(TEntryList *entrylist = 0);
00070
00071 ClassDef(TTreeTableInterface, 0)
00072 };
00073
00074 #endif