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 TPointSet3D,
20 public TPointSelectorConsumer
22 friend class PointSetArray;
30 PointSet(Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ);
31 PointSet(const Text_t* name, Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ);
32 PointSet(const Text_t* name, TTree* tree, TreeVarType_e tv_type=TVT_XYZ);
34 void Reset(Int_t n_points=0);
35 Int_t GrowFor(Int_t n_points);
37 virtual const Text_t* GetTitle() const { return fTitle; }
38 virtual void SetTitle(const Text_t* t) { fTitle = t; }
40 virtual void SetMarkerColor(Color_t col)
41 { SetMainColor(col); }
43 virtual void Paint(Option_t* option="");
45 virtual void TakeAction(TSelectorDraw*);
47 ClassDef(PointSet, 1);
48 }; // endclass GuiPointSet
50 /**************************************************************************/
52 class PointSetArray : public TNamed, public TAttMarker,
53 public RenderElementListBase,
54 public TPointSelectorConsumer
56 friend class PointSetArrayEditor;
60 Int_t fDefPointSetCapacity;
62 Double_t fMin, fCurMin;
63 Double_t fMax, fCurMax;
68 PointSetArray(const Text_t* name="PointSetArray", const Text_t* title="");
69 virtual ~PointSetArray();
71 virtual void Paint(Option_t* option="") { PaintElements(option); }
73 virtual void SetMarkerColor(Color_t tcolor=1);
74 virtual void SetMarkerStyle(Style_t mstyle=1);
75 virtual void SetMarkerSize(Size_t msize=1);
77 virtual void TakeAction(TSelectorDraw*);
80 void InitBins(TGListTreeItem* tree_item, const Text_t* quant_name,
81 Int_t nbins, Double_t min, Double_t max);
83 void Fill(Double_t x, Double_t y, Double_t z, Double_t quant);
87 Int_t GetDefPointSetCapacity() const { return fDefPointSetCapacity; }
88 void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; }
90 Int_t GetNBins() const { return fNBins; }
91 PointSet* GetBin(Int_t bin) const { return fBins[bin]; }
93 Double_t GetMin() const { return fMin; }
94 Double_t GetCurMin() const { return fCurMin; }
95 Double_t GetMax() const { return fMax; }
96 Double_t GetCurMax() const { return fCurMax; }
98 void SetRange(Double_t min, Double_t max);
100 ClassDef(PointSetArray, 1);