]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Reve/TTreeTools.h
- Compute parameter covariances including absorber dispersion effects
[u/mrichter/AliRoot.git] / EVE / Reve / TTreeTools.h
CommitLineData
5a5a1232 1// $Header
2
3#ifndef REVE_TTreeTools_H
4#define REVE_TTreeTools_H
5
6#include <TSelectorDraw.h>
7#include <TEventList.h>
8
9/**************************************************************************/
10// TSelectorToEventList
11/**************************************************************************/
12
13class TSelectorToEventList : public TSelectorDraw
14{
265ecb21 15 TSelectorToEventList(const TSelectorToEventList&); // Not implemented
16 TSelectorToEventList& operator=(const TSelectorToEventList&); // Not implemented
17
5a5a1232 18protected:
19 TEventList* fEvList;
20 TList fInput;
21public:
22 TSelectorToEventList(TEventList* evl, const Text_t* sel);
23
9ce3a7e7 24 virtual Int_t Version() const { return 1; }
5a5a1232 25 virtual Bool_t Process(Long64_t entry);
5a5a1232 26
27 ClassDef(TSelectorToEventList, 1)
28};
29
30/**************************************************************************/
31// TTreeQuery
32/**************************************************************************/
33
34class TTreeQuery : public TEventList
35{
36public:
37 TTreeQuery() : TEventList() {}
38
39 Int_t Select(TTree* t, const Text_t* selection);
40
41 ClassDef(TTreeQuery, 1)
42};
43
9ce3a7e7 44/**************************************************************************/
45// TPointSelectorConsumer, TPointSelector
46/**************************************************************************/
47
48class TPointSelector;
49
50class TPointSelectorConsumer
51{
52public:
53 enum TreeVarType_e { TVT_XYZ, TVT_RPhiZ };
54
55protected:
eb1c2e64 56 TreeVarType_e fSourceCS; // Coordinate-System of the source tree variables
9ce3a7e7 57
58public:
59 TPointSelectorConsumer(TreeVarType_e cs=TVT_XYZ) :fSourceCS(cs) {}
60 virtual ~TPointSelectorConsumer() {}
61
32e219c2 62 virtual void InitFill(Int_t /*subIdNum*/) {}
63 virtual void TakeAction(TPointSelector*) = 0;
9ce3a7e7 64
65 TreeVarType_e GetSourceCS() const { return fSourceCS; }
66 void SetSourceCS(TreeVarType_e cs) { fSourceCS = cs; }
67
68 ClassDef(TPointSelectorConsumer, 1);
69};
70
71class TPointSelector : public TSelectorDraw
72{
265ecb21 73 TPointSelector(const TPointSelector&); // Not implemented
74 TPointSelector& operator=(const TPointSelector&); // Not implemented
75
9ce3a7e7 76protected:
77 TTree *fTree;
78 TPointSelectorConsumer *fConsumer;
79
80 TString fVarexp;
81 TString fSelection;
82
32e219c2 83 TString fSubIdExp;
84 Int_t fSubIdNum;
85
9ce3a7e7 86 TList fInput;
87
88public:
89 TPointSelector(TTree* t=0, TPointSelectorConsumer* c=0,
90 const Text_t* vexp="", const Text_t* sel="");
91 virtual ~TPointSelector() {}
92
93 virtual Long64_t Select(const Text_t* selection=0);
94 virtual Long64_t Select(TTree* t, const Text_t* selection=0);
95 virtual void TakeAction();
96
97
98 TTree* GetTree() const { return fTree; }
99 void SetTree(TTree* t) { fTree = t; }
100
101 TPointSelectorConsumer* GetConsumer() const { return fConsumer; }
102 void SetConsumer(TPointSelectorConsumer* c) { fConsumer = c; }
103
104 const Text_t* GetVarexp() const { return fVarexp; }
105 void SetVarexp(const Text_t* v) { fVarexp = v; }
106
107 const Text_t* GetSelection() const { return fSelection; }
108 void SetSelection(const Text_t* s) { fSelection = s; }
109
32e219c2 110 const Text_t* GetSubIdExp() const { return fSubIdExp; }
111 void SetSubIdExp(const Text_t* s) { fSubIdExp = s; }
112
113 Int_t GetSubIdNum() const { return fSubIdNum; }
114
9ce3a7e7 115 ClassDef(TPointSelector, 1);
116};
117
5a5a1232 118/**************************************************************************/
119/**************************************************************************/
120
121#endif