KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVGraph.h
Go to the documentation of this file.
1 
4 #ifndef __KVGRAPH_H
5 #define __KVGRAPH_H
6 
7 #include "TGraphErrors.h"
8 
15 class KVGraph : public TGraphErrors {
16 protected:
21 
23 
24  virtual void init();
25  void HideAxis(TAxis* ax);
26  Double_t* GetBinArray(Int_t& nbins, Bool_t xAxis = kTRUE);
27 
28 public:
29 
30  enum CropOption {
34  kCropMin
35  };
36 
37  KVGraph();
38  KVGraph(Int_t n);
47 
48  virtual ~KVGraph();
49  void Draw(Option_t* chopt = "");
50 
51  void SetDisplayDivX(Int_t ndiv, Double_t* div = 0)
52  {
53  fNDivX = ndiv;
54  fDisplayDivX = div;
55  }
56  void SetDisplayDivY(Int_t ndiv, Double_t* div = 0)
57  {
58  fNDivY = ndiv;
59  fDisplayDivY = div;
60  }
61 
63  {
64  fCropMode = crop;
65  }
66  void SetUseX(Bool_t usex = kTRUE)
67  {
68  fUseX = usex;
69  }
70  void SetUseY(Bool_t usey = kTRUE)
71  {
72  fUseY = usey;
73  }
74 
75 
76  ClassDef(KVGraph, 1) //TGraph with new draw option
77 };
78 
79 #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:15
Double_t * fDisplayDivX
Definition: KVGraph.h:17
void SetCropMode(Int_t crop=kCropOnGraph)
Definition: KVGraph.h:62
Int_t fNDivY
Definition: KVGraph.h:19
Int_t fNDivX
Definition: KVGraph.h:19
void SetDisplayDivY(Int_t ndiv, Double_t *div=0)
Definition: KVGraph.h:56
CropOption
Definition: KVGraph.h:30
@ kNoCrop
Definition: KVGraph.h:31
@ kCropOnGraph
Definition: KVGraph.h:33
@ kCropOnDiv
Definition: KVGraph.h:32
@ kCropMin
Definition: KVGraph.h:34
Bool_t fUseX
Definition: KVGraph.h:20
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:18
virtual void init()
Definition: KVGraph.cpp:251
KVGraph()
Default constructor.
Definition: KVGraph.cpp:19
Bool_t fUseY
Definition: KVGraph.h:20
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:70
Int_t fCropMode
Definition: KVGraph.h:22
void SetDisplayDivX(Int_t ndiv, Double_t *div=0)
Definition: KVGraph.h:51
void SetUseX(Bool_t usex=kTRUE)
Definition: KVGraph.h:66