12 #ifndef ROOT_TTreePlayer
13 #define ROOT_TTreePlayer
37 class TTreePlayer :
public TVirtualTreePlayer {
40 TTreePlayer(
const TTreePlayer &) =
delete;
41 TTreePlayer& operator=(
const TTreePlayer &) =
delete;
46 const char *fScanFileName;
48 Long64_t fSelectedRows;
50 TSelectorDraw *fSelector;
51 TSelector *fSelectorFromFile;
52 TClass *fSelectorClass;
55 TSelector *fSelectorUpdate;
58 const char *GetNameByIndex(TString &varexp, Int_t *index,Int_t colindex);
59 void DeleteSelectorFromFile();
63 virtual ~TTreePlayer();
64 virtual TVirtualIndex *BuildIndex(
const TTree *T,
const char *majorname,
const char *minorname);
65 virtual TTree *CopyTree(
const char *selection, Option_t *option
66 ,Long64_t nentries, Long64_t firstentry);
67 virtual Long64_t DrawScript(
const char* wrapperPrefix,
68 const char *macrofilename,
const char *cutfilename,
69 Option_t *option, Long64_t nentries, Long64_t firstentry);
70 virtual Long64_t DrawSelect(
const char *varexp,
const char *selection, Option_t *option
71 ,Long64_t nentries, Long64_t firstentry);
72 virtual Int_t Fit(
const char *formula ,
const char *varexp,
const char *selection,Option_t *option ,
73 Option_t *goption ,Long64_t nentries, Long64_t firstentry);
74 virtual Int_t GetDimension()
const {
return fDimension;}
75 TH1 *GetHistogram()
const {
return fHistogram;}
76 virtual Long64_t GetEntries(
const char *selection);
77 virtual Long64_t GetEntriesToProcess(Long64_t firstentry, Long64_t nentries)
const;
78 virtual Int_t GetNfill()
const {
return fSelector->GetNfill();}
79 const char *GetScanFileName()
const {
return fScanFileName;}
80 TTreeFormula *GetSelect()
const {
return fSelector->GetSelect();}
81 virtual Long64_t GetSelectedRows()
const {
return fSelectedRows;}
82 TSelector *GetSelector()
const {
return fSelector;}
83 TSelector *GetSelectorFromFile()
const {
return fSelectorFromFile;}
85 TTreeFormula *GetVar(Int_t i)
const {
return fSelector->GetVar(i);};
87 TTreeFormula *GetVar1()
const {
return fSelector->GetVar1();}
89 TTreeFormula *GetVar2()
const {
return fSelector->GetVar2();}
91 TTreeFormula *GetVar3()
const {
return fSelector->GetVar3();}
93 TTreeFormula *GetVar4()
const {
return fSelector->GetVar4();}
95 virtual Double_t *GetVal(Int_t i)
const {
return fSelector->GetVal(i);};
97 virtual Double_t *GetV1()
const {
return fSelector->GetV1();}
99 virtual Double_t *GetV2()
const {
return fSelector->GetV2();}
101 virtual Double_t *GetV3()
const {
return fSelector->GetV3();}
103 virtual Double_t *GetV4()
const {
return fSelector->GetV4();}
104 virtual Double_t *GetW()
const {
return fSelector->GetW();}
105 virtual Int_t MakeClass(
const char *classname, Option_t *option);
106 virtual Int_t MakeCode(
const char *filename);
107 virtual Int_t MakeProxy(
const char *classname,
108 const char *macrofilename = 0,
const char *cutfilename = 0,
109 const char *option = 0, Int_t maxUnrolling = 3);
110 virtual Int_t MakeReader(
const char *classname, Option_t *option);
111 TPrincipal *Principal(
const char *varexp,
const char *selection, Option_t *option
112 ,Long64_t nentries, Long64_t firstentry);
113 virtual Long64_t Process(
const char *filename,Option_t *option, Long64_t nentries, Long64_t firstentry);
114 virtual Long64_t Process(TSelector *selector,Option_t *option, Long64_t nentries, Long64_t firstentry);
115 virtual void RecursiveRemove(TObject *obj);
116 virtual Long64_t Scan(
const char *varexp,
const char *selection, Option_t *option
117 ,Long64_t nentries, Long64_t firstentry);
118 Bool_t ScanRedirected() {
return fScanRedirect;}
119 virtual TSQLResult *Query(
const char *varexp,
const char *selection, Option_t *option
120 ,Long64_t nentries, Long64_t firstentry);
121 virtual void SetEstimate(Long64_t n);
122 void SetScanRedirect(Bool_t on=kFALSE) {fScanRedirect = on;}
123 void SetScanFileName(
const char *name) {fScanFileName=name;}
124 virtual void SetTree(TTree *t) {fTree = t;}
125 virtual void StartViewer(Int_t ww, Int_t wh);
126 virtual Int_t UnbinnedFit(
const char *formula ,
const char *varexp,
const char *selection,Option_t *option
127 ,Long64_t nentries, Long64_t firstentry);
128 virtual void UpdateFormulaLeaves();
130 ClassDef(TTreePlayer,3);