]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Reve/PointSet.h
Changed inheritance to include Reve::RenderElement; use ZTrans to store transformatio...
[u/mrichter/AliRoot.git] / EVE / Reve / PointSet.h
CommitLineData
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>
db75e62a 8#include <Reve/TTreeTools.h>
5a5a1232 9
10#include <TPointSet3D.h>
11
12class TTree;
13class TF3;
14class TGListTreeItem;
15
16namespace Reve {
17
7d42b6c2 18class PointSet : public RenderElement,
19 public TPointSet3D,
db75e62a 20 public TPointSelectorConsumer
5a5a1232 21{
22 friend class PointSetArray;
5a5a1232 23
24protected:
25 TString fTitle;
26
27public:
db75e62a 28 PointSet(Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ);
29 PointSet(const Text_t* name, Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ);
e4f80cd8 30 PointSet(const Text_t* name, TTree* tree, TreeVarType_e tv_type=TVT_XYZ);
5a5a1232 31
db75e62a 32 void Reset(Int_t n_points=0);
33 Int_t GrowFor(Int_t n_points);
5a5a1232 34
35 virtual const Text_t* GetTitle() const { return fTitle; }
36 virtual void SetTitle(const Text_t* t) { fTitle = t; }
37
38 virtual void SetMarkerColor(Color_t col)
39 { SetMainColor(col); }
40
41 virtual void Paint(Option_t* option="");
42
db75e62a 43 virtual void TakeAction(TSelectorDraw*);
44
5a5a1232 45 ClassDef(PointSet, 1);
46}; // endclass GuiPointSet
47
48/**************************************************************************/
49
7d42b6c2 50class PointSetArray : public RenderElementListBase,
51 public TNamed,
52 public TAttMarker,
53 public TPointSelectorConsumer
5a5a1232 54{
361a0daf 55 friend class PointSetArrayEditor;
56
265ecb21 57 PointSetArray(const PointSetArray&); // Not implemented
58 PointSetArray& operator=(const PointSetArray&); // Not implemented
59
5a5a1232 60protected:
61 PointSet** fBins;
e4f80cd8 62 Int_t fDefPointSetCapacity;
5a5a1232 63 Int_t fNBins;
64 Double_t fMin, fCurMin;
65 Double_t fMax, fCurMax;
66 Double_t fBinWidth;
67 TString fQuantName;
68
5a5a1232 69public:
e4f80cd8 70 PointSetArray(const Text_t* name="PointSetArray", const Text_t* title="");
5a5a1232 71 virtual ~PointSetArray();
72
7d42b6c2 73 virtual void RemoveElementLocal(RenderElement* el);
74 virtual void RemoveElements();
75
e4f80cd8 76 virtual void Paint(Option_t* option="") { PaintElements(option); }
d15308aa 77
78 virtual void SetMarkerColor(Color_t tcolor=1);
79 virtual void SetMarkerStyle(Style_t mstyle=1);
80 virtual void SetMarkerSize(Size_t msize=1);
5a5a1232 81
db75e62a 82 virtual void TakeAction(TSelectorDraw*);
83
84
7d42b6c2 85 void InitBins(const Text_t* quant_name, Int_t nbins, Double_t min, Double_t max,
86 Bool_t addRe=kTRUE);
db75e62a 87 void Fill(Double_t x, Double_t y, Double_t z, Double_t quant);
88
d15308aa 89 void CloseBins();
5a5a1232 90
e4f80cd8 91 Int_t GetDefPointSetCapacity() const { return fDefPointSetCapacity; }
92 void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; }
93
94 Int_t GetNBins() const { return fNBins; }
95 PointSet* GetBin(Int_t bin) const { return fBins[bin]; }
96
5a5a1232 97 Double_t GetMin() const { return fMin; }
98 Double_t GetCurMin() const { return fCurMin; }
99 Double_t GetMax() const { return fMax; }
100 Double_t GetCurMax() const { return fCurMax; }
101
102 void SetRange(Double_t min, Double_t max);
103
5a5a1232 104 ClassDef(PointSetArray, 1);
105};
106
107}
108
109#endif