3 #ifndef REVE_GuiPointSet_H
4 #define REVE_GuiPointSet_H
7 #include <Reve/RenderElement.h>
8 #include <Reve/TTreeTools.h>
10 #include <TPointSet3D.h>
18 class PointSet : public RenderElement,
20 public TPointSelectorConsumer
22 friend class PointSetArray;
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);
30 PointSet(const Text_t* name, TTree* tree, TreeVarType_e tv_type=TVT_XYZ);
32 void Reset(Int_t n_points=0);
33 Int_t GrowFor(Int_t n_points);
35 virtual const Text_t* GetTitle() const { return fTitle; }
36 virtual void SetTitle(const Text_t* t) { fTitle = t; }
38 virtual void SetMarkerColor(Color_t col)
39 { SetMainColor(col); }
41 virtual void Paint(Option_t* option="");
43 virtual void TakeAction(TSelectorDraw*);
45 ClassDef(PointSet, 1);
46 }; // endclass GuiPointSet
48 /**************************************************************************/
50 class PointSetArray : public RenderElementListBase,
53 public TPointSelectorConsumer
55 friend class PointSetArrayEditor;
57 PointSetArray(const PointSetArray&); // Not implemented
58 PointSetArray& operator=(const PointSetArray&); // Not implemented
62 Int_t fDefPointSetCapacity;
64 Double_t fMin, fCurMin;
65 Double_t fMax, fCurMax;
70 PointSetArray(const Text_t* name="PointSetArray", const Text_t* title="");
71 virtual ~PointSetArray();
73 virtual void RemoveElementLocal(RenderElement* el);
74 virtual void RemoveElements();
76 virtual void Paint(Option_t* option="") { PaintElements(option); }
78 virtual void SetMarkerColor(Color_t tcolor=1);
79 virtual void SetMarkerStyle(Style_t mstyle=1);
80 virtual void SetMarkerSize(Size_t msize=1);
82 virtual void TakeAction(TSelectorDraw*);
85 void InitBins(const Text_t* quant_name, Int_t nbins, Double_t min, Double_t max,
87 void Fill(Double_t x, Double_t y, Double_t z, Double_t quant);
91 Int_t GetDefPointSetCapacity() const { return fDefPointSetCapacity; }
92 void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; }
94 Int_t GetNBins() const { return fNBins; }
95 PointSet* GetBin(Int_t bin) const { return fBins[bin]; }
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; }
102 void SetRange(Double_t min, Double_t max);
104 ClassDef(PointSetArray, 1);