]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #ifndef REVE_GuiPointSet_H | |
4 | #define REVE_GuiPointSet_H | |
5 | ||
6 | #include <Reve/PODs.h> | |
7 | #include <Reve/RenderElement.h> | |
8 | ||
9 | #include <TPointSet3D.h> | |
10 | ||
11 | class TTree; | |
12 | class TF3; | |
13 | class TGListTreeItem; | |
14 | ||
15 | namespace Reve { | |
16 | ||
17 | class PointSet : public TPointSet3D, public RenderElement | |
18 | { | |
19 | friend class PointSetArray; | |
20 | ||
21 | private: | |
22 | void Init(); | |
23 | ||
24 | protected: | |
25 | TString fTitle; | |
26 | ||
27 | public: | |
28 | enum TreeVarType_e { TVT_XYZ, TVT_RPhiZ }; | |
29 | ||
30 | PointSet(Int_t n_points=0); | |
31 | PointSet(const Text_t* name, Int_t n_points=0); | |
32 | PointSet(const Text_t* name, TTree* tree, | |
33 | TreeVarType_e tv_type=TVT_XYZ); | |
34 | ||
35 | void Reset(Int_t n_points=0); | |
36 | ||
37 | virtual const Text_t* GetTitle() const { return fTitle; } | |
38 | virtual void SetTitle(const Text_t* t) { fTitle = t; } | |
39 | ||
40 | virtual void SetMarkerColor(Color_t col) | |
41 | { SetMainColor(col); } | |
42 | ||
43 | virtual void Paint(Option_t* option=""); | |
44 | ||
45 | ClassDef(PointSet, 1); | |
46 | }; // endclass GuiPointSet | |
47 | ||
48 | /**************************************************************************/ | |
49 | ||
d15308aa | 50 | class PointSetArray : public TNamed, public TAttMarker, |
51 | public RenderElementListBase | |
5a5a1232 | 52 | { |
361a0daf | 53 | friend class PointSetArrayEditor; |
54 | ||
5a5a1232 | 55 | protected: |
56 | PointSet** fBins; | |
57 | Int_t fNBins; | |
58 | Double_t fMin, fCurMin; | |
59 | Double_t fMax, fCurMax; | |
60 | Double_t fBinWidth; | |
61 | TString fQuantName; | |
62 | ||
5a5a1232 | 63 | public: |
64 | enum TreeVarType_e { TVT_XYZ, TVT_RPhiZ }; | |
65 | ||
66 | PointSetArray(const Text_t* name="PointSetArray", | |
67 | const Text_t* title=""); | |
68 | virtual ~PointSetArray(); | |
69 | ||
d15308aa | 70 | virtual void Paint(Option_t* option = "") { PaintElements(option); } |
71 | ||
72 | virtual void SetMarkerColor(Color_t tcolor=1); | |
73 | virtual void SetMarkerStyle(Style_t mstyle=1); | |
74 | virtual void SetMarkerSize(Size_t msize=1); | |
5a5a1232 | 75 | |
76 | void InitBins(TGListTreeItem* tree_item, const Text_t* quant_name, | |
77 | Int_t nbins, Double_t min, Double_t max); | |
78 | void Fill(Double_t quant, Double_t x, Double_t y, Double_t z); | |
79 | void Fill(TF3* formula, TTree* tree, TreeVarType_e tv_type=TVT_XYZ); | |
d15308aa | 80 | void CloseBins(); |
5a5a1232 | 81 | |
82 | Double_t GetMin() const { return fMin; } | |
83 | Double_t GetCurMin() const { return fCurMin; } | |
84 | Double_t GetMax() const { return fMax; } | |
85 | Double_t GetCurMax() const { return fCurMax; } | |
86 | ||
87 | void SetRange(Double_t min, Double_t max); | |
88 | ||
89 | void MakeScrollbar(); // *MENU* | |
90 | void HandleScrollEvent(); | |
91 | ||
92 | ClassDef(PointSetArray, 1); | |
93 | }; | |
94 | ||
95 | } | |
96 | ||
97 | #endif |