KaliVeda
Toolkit for HIC analysis
KVGraph.h
1 
4 #ifndef __KVGRAPH_H
5 #define __KVGRAPH_H
6 
7 #include "TGraphErrors.h"
8 
16 class KVGraph : public TGraphErrors {
17 protected:
22 
24 
25  virtual void init();
26  void HideAxis(TAxis* ax);
27  Double_t* GetBinArray(Int_t& nbins, Bool_t xAxis = kTRUE);
28 
29 public:
30 
31  enum CropOption {
35  kCropMin
36  };
37 
38  KVGraph();
39  KVGraph(Int_t n);
48 
49  virtual ~KVGraph();
50  void Draw(Option_t* chopt = "");
51 
52  void SetDisplayDivX(Int_t ndiv, Double_t* div = 0)
53  {
54  fNDivX = ndiv;
55  fDisplayDivX = div;
56  }
57  void SetDisplayDivY(Int_t ndiv, Double_t* div = 0)
58  {
59  fNDivY = ndiv;
60  fDisplayDivY = div;
61  }
62 
64  {
65  fCropMode = crop;
66  }
67  void SetUseX(Bool_t usex = kTRUE)
68  {
69  fUseX = usex;
70  }
71  void SetUseY(Bool_t usey = kTRUE)
72  {
73  fUseY = usey;
74  }
75 
76 
77  ClassDef(KVGraph, 1) //TGraph with new draw option
78 };
79 
80 #endif
int Int_t
bool Bool_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Extension of TGraph class with new draw option.
Definition: KVGraph.h:16
Double_t * fDisplayDivX
Definition: KVGraph.h:18
void SetCropMode(Int_t crop=kCropOnGraph)
Definition: KVGraph.h:63
Int_t fNDivY
Definition: KVGraph.h:20
Int_t fNDivX
Definition: KVGraph.h:20
void SetDisplayDivY(Int_t ndiv, Double_t *div=0)
Definition: KVGraph.h:57
CropOption
Definition: KVGraph.h:31
@ kNoCrop
Definition: KVGraph.h:32
@ kCropOnGraph
Definition: KVGraph.h:34
@ kCropOnDiv
Definition: KVGraph.h:33
@ kCropMin
Definition: KVGraph.h:35
Bool_t fUseX
Definition: KVGraph.h:21
void HideAxis(TAxis *ax)
Definition: KVGraph.cpp:217
Double_t * GetBinArray(Int_t &nbins, Bool_t xAxis=kTRUE)
Definition: KVGraph.cpp:229
Double_t * fDisplayDivY
Definition: KVGraph.h:19
virtual void init()
Definition: KVGraph.cpp:251
KVGraph()
Default constructor.
Definition: KVGraph.cpp:19
Bool_t fUseY
Definition: KVGraph.h:21
void Draw(Option_t *chopt="")
Definition: KVGraph.cpp:126
virtual ~KVGraph()
Destructor.
Definition: KVGraph.cpp:117
void SetUseY(Bool_t usey=kTRUE)
Definition: KVGraph.h:71
Int_t fCropMode
Definition: KVGraph.h:23
void SetDisplayDivX(Int_t ndiv, Double_t *div=0)
Definition: KVGraph.h:52
void SetUseX(Bool_t usex=kTRUE)
Definition: KVGraph.h:67