Logo ROOT  
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 #include "TObject.h"
25 
26 #include <limits>
27 
28 class TClass;
29 class TTree;
30 class TH1;
31 class TTreeFormula;
32 class TSQLResult;
33 class TSelector;
34 class TPrincipal;
35 class TVirtualIndex;
36 
37 
38 class TVirtualTreePlayer : public TObject {
39 
40 private:
41  static TClass *fgPlayer; ///< Pointer to class of Tree player
42  static TVirtualTreePlayer *fgCurrent; ///< Pointer to current Tree player
43 
44 public:
45  static constexpr Long64_t kMaxEntries = std::numeric_limits<Long64_t>::max();
46 
48  virtual ~TVirtualTreePlayer();
49  virtual TVirtualIndex *BuildIndex(const TTree *T, const char *majorname, const char *minorname) = 0;
50  virtual TTree *CopyTree(const char *selection, Option_t *option=""
51  ,Long64_t nentries=kMaxEntries, Long64_t firstentry=0) = 0;
52  virtual Long64_t DrawScript(const char *wrapperPrefix,
53  const char *macrofilename, const char *cutfilename,
54  Option_t *option, Long64_t nentries, Long64_t firstentry) = 0;
55  virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option
56  ,Long64_t nentries, Long64_t firstentry) = 0;
57  virtual Int_t Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,Option_t *goption
58  ,Long64_t nentries, Long64_t firstentry) = 0;
59  virtual Int_t GetDimension() const = 0;
60  virtual TH1 *GetHistogram() const = 0;
61  virtual Int_t GetNfill() const = 0;
62  virtual Long64_t GetEntries(const char *) = 0;
63  virtual Long64_t GetSelectedRows() const = 0;
64  virtual TSelector *GetSelector() const = 0;
65  virtual TSelector *GetSelectorFromFile() 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 
100  static TVirtualTreePlayer *TreePlayer(TTree *obj);
101  static void SetPlayer(const char *player);
102 
103  ClassDef(TVirtualTreePlayer,0); //Abstract interface for Tree players
104 };
105 
106 #endif
TVirtualTreePlayer::MakeCode
virtual Int_t MakeCode(const char *filename)=0
TVirtualTreePlayer::GetSelect
virtual TTreeFormula * GetSelect() const =0
TVirtualTreePlayer::~TVirtualTreePlayer
virtual ~TVirtualTreePlayer()
Common destructor.
Definition: TVirtualTreePlayer.cxx:58
TVirtualTreePlayer::UpdateFormulaLeaves
virtual void UpdateFormulaLeaves()=0
n
const Int_t n
Definition: legend1.C:16
TVirtualTreePlayer::UnbinnedFit
virtual Int_t UnbinnedFit(const char *formula, const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
TVirtualTreePlayer::CopyTree
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
TVirtualTreePlayer::GetVar
virtual TTreeFormula * GetVar(Int_t) const =0
TSelector
Definition: TSelector.h:31
TVirtualTreePlayer::GetNfill
virtual Int_t GetNfill() const =0
TVirtualIndex
Definition: TVirtualIndex.h:30
TVirtualTreePlayer::fgCurrent
static TVirtualTreePlayer * fgCurrent
Pointer to current Tree player.
Definition: TVirtualTreePlayer.h:42
TVirtualTreePlayer::Process
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
TVirtualTreePlayer::GetSelectorFromFile
virtual TSelector * GetSelectorFromFile() const =0
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TVirtualTreePlayer::TreePlayer
static TVirtualTreePlayer * TreePlayer(TTree *obj)
Static function returning a pointer to a Tree player.
Definition: TVirtualTreePlayer.cxx:35
TTree
Definition: TTree.h:79
TVirtualTreePlayer::Principal
virtual TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
TVirtualTreePlayer::GetVar2
virtual TTreeFormula * GetVar2() const =0
TVirtualTreePlayer::GetVar4
virtual TTreeFormula * GetVar4() const =0
TVirtualTreePlayer::GetV4
virtual Double_t * GetV4() const =0
Int_t
int Int_t
Definition: RtypesCore.h:45
nentries
int nentries
Definition: THbookFile.cxx:91
TVirtualTreePlayer::GetHistogram
virtual TH1 * GetHistogram() const =0
TVirtualTreePlayer::DrawSelect
virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
TSQLResult
Definition: TSQLResult.h:32
TVirtualTreePlayer::GetVar1
virtual TTreeFormula * GetVar1() const =0
TVirtualTreePlayer::GetDimension
virtual Int_t GetDimension() const =0
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TVirtualTreePlayer::SetEstimate
virtual void SetEstimate(Long64_t n)=0
TVirtualTreePlayer::MakeClass
virtual Int_t MakeClass(const char *classname, const char *option)=0
TVirtualTreePlayer::GetCurrentPlayer
static TVirtualTreePlayer * GetCurrentPlayer()
Static function: return the current player (if any)
Definition: TVirtualTreePlayer.cxx:69
TVirtualTreePlayer
Definition: TVirtualTreePlayer.h:38
TPrincipal
Definition: TPrincipal.h:21
TVirtualTreePlayer::fgPlayer
static TClass * fgPlayer
Pointer to class of Tree player.
Definition: TVirtualTreePlayer.h:41
TVirtualTreePlayer::BuildIndex
virtual TVirtualIndex * BuildIndex(const TTree *T, const char *majorname, const char *minorname)=0
TTreeFormula
Definition: TTreeFormula.h:58
TVirtualTreePlayer::MakeReader
virtual Int_t MakeReader(const char *classname, Option_t *option)=0
TVirtualTreePlayer::StartViewer
virtual void StartViewer(Int_t ww, Int_t wh)=0
TVirtualTreePlayer::SetPlayer
static void SetPlayer(const char *player)
Static function to set an alternative Tree player.
Definition: TVirtualTreePlayer.cxx:77
TVirtualTreePlayer::Scan
virtual Long64_t Scan(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
TVirtualTreePlayer::GetW
virtual Double_t * GetW() const =0
TVirtualTreePlayer::DrawScript
virtual Long64_t DrawScript(const char *wrapperPrefix, const char *macrofilename, const char *cutfilename, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject.h
TVirtualTreePlayer::kMaxEntries
static constexpr Long64_t kMaxEntries
Definition: TVirtualTreePlayer.h:45
TClass
Definition: TClass.h:80
TVirtualTreePlayer::GetV2
virtual Double_t * GetV2() const =0
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TVirtualTreePlayer::TVirtualTreePlayer
TVirtualTreePlayer()
Definition: TVirtualTreePlayer.h:47
TVirtualTreePlayer::Query
virtual TSQLResult * Query(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
TH1
Definition: TH1.h:57
TVirtualTreePlayer::GetVar3
virtual TTreeFormula * GetVar3() const =0
TVirtualTreePlayer::SetTree
virtual void SetTree(TTree *t)=0
TVirtualTreePlayer::GetV1
virtual Double_t * GetV1() const =0
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:52
TVirtualTreePlayer::GetSelectedRows
virtual Long64_t GetSelectedRows() const =0
TVirtualTreePlayer::GetSelector
virtual TSelector * GetSelector() const =0
TVirtualTreePlayer::Fit
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
TVirtualTreePlayer::GetVal
virtual Double_t * GetVal(Int_t) const =0
TVirtualTreePlayer::GetV3
virtual Double_t * GetV3() const =0
TVirtualTreePlayer::GetEntries
virtual Long64_t GetEntries(const char *)=0
TVirtualTreePlayer::MakeProxy
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=0, const char *cutfilename=0, const char *option=0, Int_t maxUnrolling=3)=0