00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TParallelCoordVar
00013 #define ROOT_TParallelCoordVar
00014
00015 #ifndef ROOT_TAttLine
00016 #include "TAttLine.h"
00017 #endif
00018 #ifndef ROOT_TNamed
00019 #include "TNamed.h"
00020 #endif
00021 #ifndef ROOT_TAttFill
00022 #include "TAttFill.h"
00023 #endif
00024
00025 class TParallelCoord;
00026 class TParallelCoordSelect;
00027 class TParallelCoordRange;
00028 class TH1F;
00029
00030 class TParallelCoordVar : public TNamed, public TAttLine, public TAttFill {
00031 public:
00032 enum {
00033 kLogScale =BIT(14),
00034 kShowBox =BIT(15),
00035 kShowBarHisto =BIT(16)
00036 };
00037 private:
00038 Int_t fNbins;
00039 Int_t fHistoLW;
00040 Int_t fId;
00041 Long64_t fNentries;
00042 Double_t fX1;
00043 Double_t fX2;
00044 Double_t fY1;
00045 Double_t fY2;
00046 Double_t fMinInit;
00047 Double_t fMaxInit;
00048 Double_t fMean;
00049 Double_t fMinCurrent;
00050 Double_t fMaxCurrent;
00051 Double_t fMed;
00052 Double_t fQua1;
00053 Double_t fQua3;
00054 Double_t fHistoHeight;
00055 Double_t *fVal;
00056 TList *fRanges;
00057 TParallelCoord *fParallel;
00058 TH1F *fHistogram;
00059
00060 public:
00061 TParallelCoordVar();
00062 TParallelCoordVar(Double_t *val, const char* title,Int_t id, TParallelCoord* gram);
00063 ~TParallelCoordVar();
00064
00065 void AddRange(TParallelCoordRange* range);
00066 void AddRange() {AddRange(NULL);}
00067 void DeleteVariable();
00068 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00069 virtual void Draw(Option_t *option="");
00070 Bool_t Eval(Long64_t evtidx, TParallelCoordSelect *select);
00071 virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py);
00072 Bool_t GetBarHisto() {return TestBit(kShowBarHisto);}
00073 Bool_t GetBoxPlot() {return TestBit(kShowBox);}
00074 TH1F *GetHistogram();
00075 Int_t GetId() {return fId;}
00076 Bool_t GetLogScale() const {return TestBit (kLogScale);}
00077 Int_t GetHistBinning() const {return fNbins;}
00078 Double_t GetCurrentMin() const {return fMinCurrent;}
00079 Double_t GetCurrentMax() const {return fMaxCurrent;}
00080 Double_t GetCurrentAverage() const {return fMean;}
00081 void GetEntryXY(Long64_t n, Double_t & x, Double_t & y);
00082 Int_t GetEntryWeight(Long64_t evtidx);
00083 Double_t GetHistHeight() {return fHistoHeight;}
00084 Int_t GetHistLineWidth() {return fHistoLW;}
00085 void GetMinMaxMean();
00086 void GetQuantiles();
00087 Double_t GetX() {return fX1;}
00088 Double_t GetY() {return fY1;}
00089 Int_t GetNbins() {return fNbins;}
00090 Long64_t GetNentries() const {return fNentries;}
00091 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00092 TParallelCoord* GetParallel() {return fParallel;}
00093 TList *GetRanges() {return fRanges;}
00094 Double_t *GetValues() {return fVal;}
00095 Double_t GetValuefromXY(Double_t x,Double_t y);
00096 Bool_t GetVert() {return fX1 == fX2;}
00097 void GetXYfromValue(Double_t value, Double_t & x, Double_t & y);
00098 void Init();
00099 virtual void Paint(Option_t* option="");
00100 void PaintBoxPlot();
00101 void PaintHistogram();
00102 void PaintLabels();
00103 virtual void Print(Option_t* option="") const;
00104 void SavePrimitive(ostream & out, Option_t *options);
00105 void SetBoxPlot(Bool_t box);
00106 void SetBarHisto(Bool_t h) {SetBit(kShowBarHisto,h);}
00107 void SetHistogramLineWidth(Int_t lw=2) {fHistoLW = lw;}
00108 void SetHistogramHeight(Double_t h=0);
00109 void SetHistogramBinning(Int_t n=100);
00110 void SetCurrentLimits(Double_t min, Double_t max);
00111 void SetCurrentMin(Double_t min);
00112 void SetCurrentMax(Double_t max);
00113 void SetInitMin(Double_t min) {fMinInit = min;}
00114 void SetInitMax(Double_t max) {fMaxInit = max;}
00115 void SetLiveRangesUpdate(Bool_t on);
00116 void SetLogScale(Bool_t log);
00117 void SetTitle(const char* ) {}
00118 void SetValues(Long64_t length, Double_t* val);
00119 void SetX(Double_t x, Bool_t gl);
00120 void SetY(Double_t y, Bool_t gl);
00121 void Unzoom() {SetCurrentLimits(fMinInit,fMaxInit);}
00122
00123 ClassDef(TParallelCoordVar,1);
00124 };
00125
00126 #endif