ROOT  6.06/09
Reference Guide
TVirtualTreePlayer.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 30/08/99
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TVirtualTreePlayer
13 #define ROOT_TVirtualTreePlayer
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TVirtualTreePlayer //
19 // //
20 // Abstract base class for Tree players. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 
28 #include <limits>
29 
30 class TClass;
31 class TTree;
32 class TH1;
33 class TTreeFormula;
34 class TSQLResult;
35 class TSelector;
36 class TPrincipal;
37 class TVirtualIndex;
38 
39 
40 class TVirtualTreePlayer : public TObject {
41 
42 private:
43  static TClass *fgPlayer; //Pointer to class of Tree player
44  static TVirtualTreePlayer *fgCurrent; //Pointer to current Tree player
45 
46 public:
48 
50  virtual ~TVirtualTreePlayer();
51  virtual TVirtualIndex *BuildIndex(const TTree *T, const char *majorname, const char *minorname) = 0;
52  virtual TTree *CopyTree(const char *selection, Option_t *option=""
53  ,Long64_t nentries=kMaxEntries, Long64_t firstentry=0) = 0;
54  virtual Long64_t DrawScript(const char *wrapperPrefix,
55  const char *macrofilename, const char *cutfilename,
56  Option_t *option, Long64_t nentries, Long64_t firstentry) = 0;
57  virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option
58  ,Long64_t nentries, Long64_t firstentry) = 0;
59  virtual Int_t Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,Option_t *goption
60  ,Long64_t nentries, Long64_t firstentry) = 0;
61  virtual Int_t GetDimension() const = 0;
62  virtual TH1 *GetHistogram() const = 0;
63  virtual Int_t GetNfill() const = 0;
64  virtual Long64_t GetEntries(const char *) = 0;
65  virtual Long64_t GetSelectedRows() const = 0;
66  virtual TTreeFormula *GetSelect() const = 0;
67  virtual TTreeFormula *GetVar(Int_t) const = 0;
68  virtual TTreeFormula *GetVar1() const = 0;
69  virtual TTreeFormula *GetVar2() const = 0;
70  virtual TTreeFormula *GetVar3() const = 0;
71  virtual TTreeFormula *GetVar4() const = 0;
72  virtual Double_t *GetVal(Int_t) const = 0;
73  virtual Double_t *GetV1() const = 0;
74  virtual Double_t *GetV2() const = 0;
75  virtual Double_t *GetV3() const = 0;
76  virtual Double_t *GetV4() const = 0;
77  virtual Double_t *GetW() const = 0;
78  virtual Int_t MakeClass(const char *classname, const char *option) = 0;
79  virtual Int_t MakeCode(const char *filename) = 0;
80  virtual Int_t MakeProxy(const char *classname,
81  const char *macrofilename = 0, const char *cutfilename = 0,
82  const char *option = 0, Int_t maxUnrolling = 3) = 0;
83  virtual Int_t MakeReader(const char *classname, Option_t *option) = 0;
84  virtual TPrincipal *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
85  ,Long64_t nentries=kMaxEntries, Long64_t firstentry=0) = 0;
86  virtual Long64_t Process(const char *filename,Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) = 0;
87  virtual Long64_t Process(TSelector *selector,Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) = 0;
88  virtual Long64_t Scan(const char *varexp, const char *selection, Option_t *option
89  ,Long64_t nentries, Long64_t firstentry) = 0;
90  virtual TSQLResult *Query(const char *varexp, const char *selection, Option_t *option
91  ,Long64_t nentries, Long64_t firstentry) = 0;
92  virtual void SetEstimate(Long64_t n) = 0;
93  virtual void SetTree(TTree *t) = 0;
94  virtual void StartViewer(Int_t ww, Int_t wh) = 0;
95  virtual Int_t UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
96  ,Long64_t nentries, Long64_t firstentry) = 0;
97  virtual void UpdateFormulaLeaves() = 0;
98 
101  static void SetPlayer(const char *player);
102 
103  ClassDef(TVirtualTreePlayer,0); //Abstract interface for Tree players
104 };
105 
106 #endif
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 void SetTree(TTree *t)=0
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
Principal Components Analysis (PCA)
Definition: TPrincipal.h:28
long long Long64_t
Definition: RtypesCore.h:69
Abstract interface for Tree Index.
Definition: TVirtualIndex.h:31
virtual TTreeFormula * GetVar1() const =0
virtual Int_t MakeReader(const char *classname, Option_t *option)=0
static constexpr Long64_t kMaxEntries
virtual Int_t MakeCode(const char *filename)=0
const char Option_t
Definition: RtypesCore.h:62
double T(double x)
Definition: ChebyshevPol.h:34
virtual Double_t * GetV3() const =0
virtual TH1 * GetHistogram() const =0
static const char * filename()
virtual TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual TTreeFormula * GetVar(Int_t) const =0
int Int_t
Definition: RtypesCore.h:41
virtual Double_t * GetV4() const =0
virtual Long64_t GetEntries(const char *)=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 TTreeFormula * GetSelect() const =0
static TClass * fgPlayer
virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual TTreeFormula * GetVar3() const =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 Int_t MakeClass(const char *classname, const char *option)=0
static TVirtualTreePlayer * GetCurrentPlayer()
Static function: return the current player (if any)
virtual Double_t * GetW() const =0
Used to pass a selection expression to the Tree drawing routine.
Definition: TTreeFormula.h:64
static TVirtualTreePlayer * TreePlayer(TTree *obj)
static TVirtualTreePlayer * fgCurrent
virtual TTreeFormula * GetVar4() const =0
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual void UpdateFormulaLeaves()=0
virtual Double_t * GetV2() const =0
ClassDef(TVirtualTreePlayer, 0)
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual Double_t * GetVal(Int_t) const =0
virtual void SetEstimate(Long64_t n)=0
virtual void StartViewer(Int_t ww, Int_t wh)=0
double Double_t
Definition: RtypesCore.h:55
int nentries
Definition: THbookFile.cxx:89
The TH1 histogram class.
Definition: TH1.h:80
virtual Int_t UnbinnedFit(const char *formula, const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
Mother of all ROOT objects.
Definition: TObject.h:58
static void SetPlayer(const char *player)
Static function to set an alternative Tree player.
virtual Long64_t Scan(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual Long64_t GetSelectedRows() const =0
Abstract base class defining the interface for the plugins that implement Draw, Scan, Process, MakeProxy, etc.
virtual TTreeFormula * GetVar2() const =0
A TTree object has a header with a name and a title.
Definition: TTree.h:94
virtual TVirtualIndex * BuildIndex(const TTree *T, const char *majorname, const char *minorname)=0
virtual TSQLResult * Query(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:39
TObject * obj
virtual ~TVirtualTreePlayer()
Common destructor.
const Int_t n
Definition: legend1.C:16
virtual Int_t GetNfill() const =0
virtual Int_t GetDimension() const =0
virtual Double_t * GetV1() const =0