ROOT logo
// @(#)root/tree:$Id$
// Author: Rene Brun   30/08/99

/*************************************************************************
 * Copyright (C) 1995-2000, 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_TVirtualTreePlayer
#define ROOT_TVirtualTreePlayer


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TVirtualTreePlayer                                                   //
//                                                                      //
// Abstract base class for Tree players.                                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

class TClass;
class TTree;
class TH1;
class TTreeFormula;
class TSQLResult;
class TSelector;
class TPrincipal;
class TVirtualIndex;


class TVirtualTreePlayer : public TObject {

private:
   static TClass              *fgPlayer;  //Pointer to class of Tree player
   static TVirtualTreePlayer  *fgCurrent; //Pointer to current Tree player

public:
   TVirtualTreePlayer() { }
   virtual ~TVirtualTreePlayer();
   virtual TVirtualIndex *BuildIndex(const TTree *T, const char *majorname, const char *minorname) = 0;
   virtual TTree         *CopyTree(const char *selection, Option_t *option=""
                                   ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
   virtual Long64_t       DrawScript(const char *wrapperPrefix,
                                     const char *macrofilename, const char *cutfilename,
                                     Option_t *option, Long64_t nentries, Long64_t firstentry) = 0;
   virtual Long64_t       DrawSelect(const char *varexp, const char *selection, Option_t *option
                                     ,Long64_t nentries, Long64_t firstentry) = 0;
   virtual Int_t          Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,Option_t *goption
                              ,Long64_t nentries, Long64_t firstentry) = 0;
   virtual Int_t          GetDimension() const = 0;
   virtual TH1           *GetHistogram() const = 0;
   virtual Int_t          GetNfill() const = 0;
   virtual Long64_t       GetEntries(const char *) = 0;
   virtual Long64_t       GetSelectedRows() const = 0;
   virtual TTreeFormula  *GetSelect() const = 0;
   virtual TTreeFormula  *GetVar(Int_t) const = 0;
   virtual TTreeFormula  *GetVar1() const = 0;
   virtual TTreeFormula  *GetVar2() const = 0;
   virtual TTreeFormula  *GetVar3() const = 0;
   virtual TTreeFormula  *GetVar4() const = 0;
   virtual Double_t      *GetVal(Int_t) const = 0;
   virtual Double_t      *GetV1() const = 0;
   virtual Double_t      *GetV2() const = 0;
   virtual Double_t      *GetV3() const = 0;
   virtual Double_t      *GetV4() const = 0;
   virtual Double_t      *GetW() const = 0;
   virtual Int_t          MakeClass(const char *classname, const char *option) = 0;
   virtual Int_t          MakeCode(const char *filename) = 0;
   virtual Int_t          MakeProxy(const char *classname,
                                    const char *macrofilename = 0, const char *cutfilename = 0,
                                    const char *option = 0, Int_t maxUnrolling = 3) = 0;
   virtual TPrincipal    *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
                                    ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
   virtual Long64_t       Process(const char *filename,Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
   virtual Long64_t       Process(TSelector *selector,Option_t *option="",  Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
   virtual Long64_t       Scan(const char *varexp, const char *selection, Option_t *option
                               ,Long64_t nentries, Long64_t firstentry) = 0;
   virtual TSQLResult    *Query(const char *varexp, const char *selection, Option_t *option
                                ,Long64_t nentries, Long64_t firstentry) = 0;
   virtual void           SetEstimate(Long64_t n) = 0;
   virtual void           SetTree(TTree *t) = 0;
   virtual void           StartViewer(Int_t ww, Int_t wh) = 0;
   virtual Int_t          UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
                                      ,Long64_t nentries, Long64_t firstentry) = 0;
   virtual void           UpdateFormulaLeaves() = 0;

   static  TVirtualTreePlayer *GetCurrentPlayer();
   static  TVirtualTreePlayer *TreePlayer(TTree *obj);
   static void        SetPlayer(const char *player);

   ClassDef(TVirtualTreePlayer,0);  //Abstract interface for Tree players
};

#endif
 TVirtualTreePlayer.h:1
 TVirtualTreePlayer.h:2
 TVirtualTreePlayer.h:3
 TVirtualTreePlayer.h:4
 TVirtualTreePlayer.h:5
 TVirtualTreePlayer.h:6
 TVirtualTreePlayer.h:7
 TVirtualTreePlayer.h:8
 TVirtualTreePlayer.h:9
 TVirtualTreePlayer.h:10
 TVirtualTreePlayer.h:11
 TVirtualTreePlayer.h:12
 TVirtualTreePlayer.h:13
 TVirtualTreePlayer.h:14
 TVirtualTreePlayer.h:15
 TVirtualTreePlayer.h:16
 TVirtualTreePlayer.h:17
 TVirtualTreePlayer.h:18
 TVirtualTreePlayer.h:19
 TVirtualTreePlayer.h:20
 TVirtualTreePlayer.h:21
 TVirtualTreePlayer.h:22
 TVirtualTreePlayer.h:23
 TVirtualTreePlayer.h:24
 TVirtualTreePlayer.h:25
 TVirtualTreePlayer.h:26
 TVirtualTreePlayer.h:27
 TVirtualTreePlayer.h:28
 TVirtualTreePlayer.h:29
 TVirtualTreePlayer.h:30
 TVirtualTreePlayer.h:31
 TVirtualTreePlayer.h:32
 TVirtualTreePlayer.h:33
 TVirtualTreePlayer.h:34
 TVirtualTreePlayer.h:35
 TVirtualTreePlayer.h:36
 TVirtualTreePlayer.h:37
 TVirtualTreePlayer.h:38
 TVirtualTreePlayer.h:39
 TVirtualTreePlayer.h:40
 TVirtualTreePlayer.h:41
 TVirtualTreePlayer.h:42
 TVirtualTreePlayer.h:43
 TVirtualTreePlayer.h:44
 TVirtualTreePlayer.h:45
 TVirtualTreePlayer.h:46
 TVirtualTreePlayer.h:47
 TVirtualTreePlayer.h:48
 TVirtualTreePlayer.h:49
 TVirtualTreePlayer.h:50
 TVirtualTreePlayer.h:51
 TVirtualTreePlayer.h:52
 TVirtualTreePlayer.h:53
 TVirtualTreePlayer.h:54
 TVirtualTreePlayer.h:55
 TVirtualTreePlayer.h:56
 TVirtualTreePlayer.h:57
 TVirtualTreePlayer.h:58
 TVirtualTreePlayer.h:59
 TVirtualTreePlayer.h:60
 TVirtualTreePlayer.h:61
 TVirtualTreePlayer.h:62
 TVirtualTreePlayer.h:63
 TVirtualTreePlayer.h:64
 TVirtualTreePlayer.h:65
 TVirtualTreePlayer.h:66
 TVirtualTreePlayer.h:67
 TVirtualTreePlayer.h:68
 TVirtualTreePlayer.h:69
 TVirtualTreePlayer.h:70
 TVirtualTreePlayer.h:71
 TVirtualTreePlayer.h:72
 TVirtualTreePlayer.h:73
 TVirtualTreePlayer.h:74
 TVirtualTreePlayer.h:75
 TVirtualTreePlayer.h:76
 TVirtualTreePlayer.h:77
 TVirtualTreePlayer.h:78
 TVirtualTreePlayer.h:79
 TVirtualTreePlayer.h:80
 TVirtualTreePlayer.h:81
 TVirtualTreePlayer.h:82
 TVirtualTreePlayer.h:83
 TVirtualTreePlayer.h:84
 TVirtualTreePlayer.h:85
 TVirtualTreePlayer.h:86
 TVirtualTreePlayer.h:87
 TVirtualTreePlayer.h:88
 TVirtualTreePlayer.h:89
 TVirtualTreePlayer.h:90
 TVirtualTreePlayer.h:91
 TVirtualTreePlayer.h:92
 TVirtualTreePlayer.h:93
 TVirtualTreePlayer.h:94
 TVirtualTreePlayer.h:95
 TVirtualTreePlayer.h:96
 TVirtualTreePlayer.h:97
 TVirtualTreePlayer.h:98
 TVirtualTreePlayer.h:99
 TVirtualTreePlayer.h:100
 TVirtualTreePlayer.h:101