ROOT_Application
2.0
C++ Core modules and GUIStock
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src_gui_root
CommonXAxis.h
Go to the documentation of this file.
1
16
#ifndef _ROOT_COMMONXAXIS_H
17
#define _ROOT_COMMONXAXIS_H
18
19
#include <iostream>
20
21
#ifndef ROOT_TH1
22
#include "TAxis.h"
23
#endif
24
25
// It is just a structure *TAxis and shift and...shift_left ??
26
// Do not derive of TAxis, but encapsulate
27
//
28
// Or real Axis and then derive
29
class
CommonXAxis
30
{
31
private
:
32
TAxis *
fcommon_axis
;
33
34
//shift keep the shift in "bin" between the max axis bin and the data in ListDataStock
35
//if >0 show "futur", e.g., to see the crossing of line in the futur
36
//if <0 gives automatically the shift between the last bin to print and the last data, will simplify Painter
37
// negative not used, only futur is used
38
Int_t
shift
;
39
40
public
:
41
//should initialze
42
CommonXAxis
() :
fcommon_axis
(0),
shift
(0) {
43
#ifdef DEBUG_CONT_FRAME
44
std::cout <<
" Constructor Common XAxis "
<< std::endl;
45
std::cout <<
"this "
<<
this
<< std::endl;
46
#endif
47
}
48
~CommonXAxis
() {
49
#ifdef DEBUG_CONT_FRAME
50
std::cout <<
" Destructor Common XAxis "
<< std::endl;
51
#endif
52
}
53
54
TAxis *
GetXAxis
() {
return
fcommon_axis
;}
55
void
SetCommonXAxis
( TAxis *xaxis ) {
56
#ifdef DEBUG_CONT_FRAME
57
std::cout <<
" CommonXaxis SetCommonXaxis from TAxis * "
<< std::endl;
58
std::cout <<
"\t xaxis first, last "
<< xaxis->GetFirst() <<
" "
<< xaxis->GetLast() << std::endl;
59
#endif
60
fcommon_axis
= xaxis;
61
//std::cout << "\t after referencing first, last " << GetFirst() << " " << GetLast() << std::endl;
62
shift
= 0;
63
}
64
65
// new added
66
// coming from CanvasStock, old name UpdateCommonAxis
68
void
UpdateCommonAxis
(
int
new_size );
69
70
//copy not necessary I think
71
Int_t
GetShift
()
const
{
return
shift
; }
72
void
SetShift
( UInt_t new_shift ) {
shift
= new_shift; }
73
void
IncrShift
() {
shift
+=1 ; }
74
void
DecrShift
() {
shift
-=1 ; }
75
76
//Can make some shortcut for most common Axis function members
77
Int_t
GetNbins
() {
if
(
fcommon_axis
==0 )
return
-1;
return
fcommon_axis
->GetNbins(); }
78
Int_t
GetFirst
() {
return
fcommon_axis
->GetFirst(); }
79
Int_t
GetLast
() {
return
fcommon_axis
->GetLast(); }
80
// new added
81
//void IncrLast() { fLast += 1;}
82
83
//for dictionary, no need to write
84
//ClassDef(CommonXAxis,0);
85
};
86
87
#endif
/* _ROOT_COMMONXAXIS_H */
88
CommonXAxis::UpdateCommonAxis
void UpdateCommonAxis(int new_size)
for Update of CSV, increase size of the axis
CommonXAxis::IncrShift
void IncrShift()
Definition:
CommonXAxis.h:73
CommonXAxis::GetLast
Int_t GetLast()
Definition:
CommonXAxis.h:79
CommonXAxis::SetShift
void SetShift(UInt_t new_shift)
Definition:
CommonXAxis.h:72
CommonXAxis::~CommonXAxis
~CommonXAxis()
Definition:
CommonXAxis.h:48
CommonXAxis::shift
Int_t shift
Definition:
CommonXAxis.h:38
CommonXAxis::GetXAxis
TAxis * GetXAxis()
Definition:
CommonXAxis.h:54
CommonXAxis::SetCommonXAxis
void SetCommonXAxis(TAxis *xaxis)
Definition:
CommonXAxis.h:55
CommonXAxis::DecrShift
void DecrShift()
Definition:
CommonXAxis.h:74
CommonXAxis
Definition:
CommonXAxis.h:29
CommonXAxis::fcommon_axis
TAxis * fcommon_axis
Definition:
CommonXAxis.h:32
CommonXAxis::GetNbins
Int_t GetNbins()
Definition:
CommonXAxis.h:77
CommonXAxis::GetShift
Int_t GetShift() const
Definition:
CommonXAxis.h:71
CommonXAxis::CommonXAxis
CommonXAxis()
Definition:
CommonXAxis.h:42
CommonXAxis::GetFirst
Int_t GetFirst()
Definition:
CommonXAxis.h:78
Generated on Mon May 25 2015 20:35:30 for ROOT_Application by
1.8.6