#ifndef ROOT_TParallelCoordVar
#define ROOT_TParallelCoordVar
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
class TParallelCoord;
class TParallelCoordSelect;
class TParallelCoordRange;
class TH1F;
class TParallelCoordVar : public TNamed, public TAttLine, public TAttFill {
public:
enum {
kLogScale =BIT(14),
kShowBox =BIT(15),
kShowBarHisto =BIT(16)
};
private:
Int_t fNbins;
Int_t fHistoLW;
Int_t fId;
Long64_t fNentries;
Double_t fX1;
Double_t fX2;
Double_t fY1;
Double_t fY2;
Double_t fMinInit;
Double_t fMaxInit;
Double_t fMean;
Double_t fMinCurrent;
Double_t fMaxCurrent;
Double_t fMed;
Double_t fQua1;
Double_t fQua3;
Double_t fHistoHeight;
Double_t *fVal;
TList *fRanges;
TParallelCoord *fParallel;
TH1F *fHistogram;
public:
TParallelCoordVar();
TParallelCoordVar(Double_t *val, const char* title,Int_t id, TParallelCoord* gram);
~TParallelCoordVar();
void AddRange(TParallelCoordRange* range);
void AddRange() {AddRange(NULL);}
void DeleteVariable();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option="");
Bool_t Eval(Long64_t evtidx, TParallelCoordSelect *select);
virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py);
Bool_t GetBarHisto() {return TestBit(kShowBarHisto);}
Bool_t GetBoxPlot() {return TestBit(kShowBox);}
TH1F *GetHistogram();
Int_t GetId() {return fId;}
Bool_t GetLogScale() const {return TestBit (kLogScale);}
Int_t GetHistBinning() const {return fNbins;}
Double_t GetCurrentMin() const {return fMinCurrent;}
Double_t GetCurrentMax() const {return fMaxCurrent;}
Double_t GetCurrentAverage() const {return fMean;}
void GetEntryXY(Long64_t n, Double_t & x, Double_t & y);
Int_t GetEntryWeight(Long64_t evtidx);
Double_t GetHistHeight() {return fHistoHeight;}
Int_t GetHistLineWidth() {return fHistoLW;}
void GetMinMaxMean();
void GetQuantiles();
Double_t GetX() {return fX1;}
Double_t GetY() {return fY1;}
Int_t GetNbins() {return fNbins;}
Long64_t GetNentries() const {return fNentries;}
virtual char *GetObjectInfo(Int_t px, Int_t py) const;
TParallelCoord* GetParallel() {return fParallel;}
TList *GetRanges() {return fRanges;}
Double_t *GetValues() {return fVal;}
Double_t GetValuefromXY(Double_t x,Double_t y);
Bool_t GetVert() {return fX1 == fX2;}
void GetXYfromValue(Double_t value, Double_t & x, Double_t & y);
void Init();
virtual void Paint(Option_t* option="");
void PaintBoxPlot();
void PaintHistogram();
void PaintLabels();
virtual void Print(Option_t* option="") const;
void SavePrimitive(ostream & out, Option_t *options);
void SetBoxPlot(Bool_t box);
void SetBarHisto(Bool_t h) {SetBit(kShowBarHisto,h);}
void SetHistogramLineWidth(Int_t lw=2) {fHistoLW = lw;}
void SetHistogramHeight(Double_t h=0);
void SetHistogramBinning(Int_t n=100);
void SetCurrentLimits(Double_t min, Double_t max);
void SetCurrentMin(Double_t min);
void SetCurrentMax(Double_t max);
void SetInitMin(Double_t min) {fMinInit = min;}
void SetInitMax(Double_t max) {fMaxInit = max;}
void SetLiveRangesUpdate(Bool_t on);
void SetLogScale(Bool_t log);
void SetTitle(const char* ) {}
void SetValues(Long64_t length, Double_t* val);
void SetX(Double_t x, Bool_t gl);
void SetY(Double_t y, Bool_t gl);
void Unzoom() {SetCurrentLimits(fMinInit,fMaxInit);}
ClassDef(TParallelCoordVar,1);
};
#endif