ROOT_Application
2.0
C++ Core modules and GUIStock
|
Owns a vector of THStock. More...
#include <CanvasStock.h>
Public Member Functions | |
CanvasStock () | |
used this constructor ?? may be usefull for test code ?? I/ O need default constructor anyway More... | |
CanvasStock (const char *name, Int_t ww, Int_t wh, Int_t winid) | |
call by THStockFrame, specific call for EmbeddedCanvas ( winid ), used by GUI More... | |
CanvasStock (const char *name, const char *title, Int_t ww, Int_t wh) | |
make a constructor for direct use ( without GUI) More... | |
virtual | ~CanvasStock () |
destructor More... | |
CommonXAxis * | GetCommonAxis () const |
void | UpdateTHStock () |
to redefine More... | |
void | SetRangeCommonAxis (Double_t MinPos, Double_t MaxPos) |
interface to CommonXaxis. More... | |
void | UpdateCommonAxis (int new_size) |
Resize CommonXaxis, increase size of the axis Update the range (bins) of the Axis (fFirst,fLast) if needed after an update. More... | |
void | HideListData (std::string fullname, Int_t npad, bool toDelete=false) |
Used for showing listdatastock indicator. More... | |
void | ShowListData (std::string fullname, Int_t npad) |
Used for Hide and Delete, with option. More... | |
Int_t | AddListDataStockToMap (ListDataStockBase *, Int_t npad=0) |
Add a ListDataStock, decide if new pad is created Add a pointeur to the new ListDataStock now decides here which pad to paint, if forcepad is zero name of listdata maybe wrong, taken by default from the indicator. More... | |
void | CreateNPad () |
clean all and recreate all pads, can improve More... | |
void | SetColor (UInt_t npad, std::string fullname, unsigned long color) |
new version with fname, really Needed ?? GetPad ( nb_pad ) from Controller not so good, GUI more dependent More... | |
void | UpdateAllPad () |
group function to update all thstock More... | |
void | PrintVector () |
for info More... | |
ClassDef (CanvasStock, 0) | |
Private Types | |
typedef std::vector< THStock * > ::iterator | it_vthstock |
define typedef for the vector More... | |
typedef std::vector< THStock * > ::const_iterator | it_c_vthstock |
Private Member Functions | |
UInt_t | GetNPadToPaint () const |
function to return the number of pad needed More... | |
void | DeleteOneTHStock (Int_t npad) |
delete a complete Pad More... | |
Private Attributes | |
CommonXAxis * | fcommon_xaxis_cs |
owns a common axis More... | |
std::vector< THStock * > | vecTHStock |
store the THStocks. More... | |
Owns a vector of THStock.
but do not store any information, pointer on what is draw and in which pad.
Associated to THistPainterStock
Definition at line 53 of file CanvasStock.h.
|
private |
Definition at line 58 of file CanvasStock.h.
|
private |
define typedef for the vector
Definition at line 57 of file CanvasStock.h.
|
inline |
used this constructor ?? may be usefull for test code ?? I/ O need default constructor anyway
Definition at line 78 of file CanvasStock.h.
References fcommon_xaxis_cs.
CanvasStock::CanvasStock | ( | const char * | name, |
Int_t | ww, | ||
Int_t | wh, | ||
Int_t | winid | ||
) |
call by THStockFrame, specific call for EmbeddedCanvas ( winid ), used by GUI
CanvasStock::CanvasStock | ( | const char * | name, |
const char * | title, | ||
Int_t | ww, | ||
Int_t | wh | ||
) |
make a constructor for direct use ( without GUI)
Definition at line 39 of file CanvasStock.cxx.
References fcommon_xaxis_cs.
|
virtual |
destructor
Definition at line 69 of file CanvasStock.cxx.
References fcommon_xaxis_cs, and vecTHStock.
Int_t CanvasStock::AddListDataStockToMap | ( | ListDataStockBase * | p_listdata, |
Int_t | npad = 0 |
||
) |
Add a ListDataStock, decide if new pad is created Add a pointeur to the new ListDataStock now decides here which pad to paint, if forcepad is zero name of listdata maybe wrong, taken by default from the indicator.
std::cout << "not the first pad, setcommon_axis anyway " << std::endl;
Definition at line 344 of file CanvasStock.cxx.
References THStock::Add(), CreateNPad(), fcommon_xaxis_cs, ShortName::GetIndicator(), ListDataStockBase::GetName(), ListDataStockBase::GetSize(), CommonXAxis::SetCommonXAxis(), THStock::SetCommonXAxis(), THStock::SetSizeTitle(), Utils::splitline(), and vecTHStock.
Referenced by ControllerIndicatorTHStock::AddData().
CanvasStock::ClassDef | ( | CanvasStock | , |
0 | |||
) |
void CanvasStock::CreateNPad | ( | ) |
clean all and recreate all pads, can improve
new added, first test, would avoid pad number in indicatorlabel Return the pad number from the name, a priori only one with the same name in each thstock.
Can we retrieve the wanted data ??
fullname |
Definition at line 606 of file CanvasStock.cxx.
References GetNPadToPaint(), THStock::GetNTHStockToPaint(), PrintVector(), and vecTHStock.
Referenced by AddListDataStockToMap(), HideListData(), and ShowListData().
|
private |
delete a complete Pad
Definition at line 126 of file CanvasStock.cxx.
References vecTHStock.
Referenced by HideListData().
|
inline |
Definition at line 88 of file CanvasStock.h.
References fcommon_xaxis_cs.
Referenced by THStockFrame::HandleButton().
|
private |
function to return the number of pad needed
Definition at line 102 of file CanvasStock.cxx.
References vecTHStock.
Referenced by CreateNPad().
void CanvasStock::HideListData | ( | std::string | fullname, |
Int_t | npad, | ||
bool | toDelete = false |
||
) |
Used for showing listdatastock indicator.
fullname | : of listdata |
npad | |
bAll | |
toDelete |
Definition at line 294 of file CanvasStock.cxx.
References CreateNPad(), DeleteOneTHStock(), THStock::GetNTHStockToPaint(), THStock::HideNameListData(), and vecTHStock.
Referenced by ControllerIndicatorTHStock::UpdateIndicator().
void CanvasStock::PrintVector | ( | ) |
for info
Definition at line 828 of file CanvasStock.cxx.
References vecTHStock.
Referenced by CreateNPad().
void CanvasStock::SetColor | ( | UInt_t | npad, |
std::string | fullname, | ||
unsigned long | color | ||
) |
new version with fname, really Needed ?? GetPad ( nb_pad ) from Controller not so good, GUI more dependent
Definition at line 761 of file CanvasStock.cxx.
References vecTHStock.
Referenced by ControllerIndicatorTHStock::ModifyColorIndic().
void CanvasStock::SetRangeCommonAxis | ( | Double_t | MinPos, |
Double_t | MaxPos | ||
) |
interface to CommonXaxis.
called by THStockFrame for slider. set Range with integer approximated to porcent. update indirectly fFirst and fLast of TAxis
Definition at line 203 of file CanvasStock.cxx.
References fcommon_xaxis_cs, CommonXAxis::GetNbins(), and CommonXAxis::GetXAxis().
Referenced by THStockFrame::DoSlider(), and THStockFrame::HandleButton().
void CanvasStock::ShowListData | ( | std::string | fullname, |
Int_t | npad | ||
) |
Used for Hide and Delete, with option.
fullname | |
npad |
Definition at line 267 of file CanvasStock.cxx.
References CreateNPad(), THStock::GetNTHStockToPaint(), THStock::ShowNameListData(), and vecTHStock.
Referenced by ControllerIndicatorTHStock::UpdateIndicator().
void CanvasStock::UpdateAllPad | ( | ) |
group function to update all thstock
Definition at line 786 of file CanvasStock.cxx.
Referenced by UpdateTHStock().
void CanvasStock::UpdateCommonAxis | ( | int | new_size | ) |
Resize CommonXaxis, increase size of the axis Update the range (bins) of the Axis (fFirst,fLast) if needed after an update.
Definition at line 234 of file CanvasStock.cxx.
References fcommon_xaxis_cs, CommonXAxis::GetFirst(), CommonXAxis::GetLast(), CommonXAxis::GetNbins(), and CommonXAxis::GetXAxis().
Referenced by THStockFrame::HandleButton(), and UpdateTHStock().
void CanvasStock::UpdateTHStock | ( | ) |
to redefine
new version, regroup all steps, maybe easier to check, optimize update all THStock
Definition at line 159 of file CanvasStock.cxx.
References fcommon_xaxis_cs, CommonXAxis::GetNbins(), UpdateAllPad(), UpdateCommonAxis(), and vecTHStock.
Referenced by THStockFrame::DoSlider(), THStockFrame::HandleButton(), and ControllerIndicatorTHStock::UpdateFrames().
|
private |
owns a common axis
Definition at line 61 of file CanvasStock.h.
Referenced by AddListDataStockToMap(), CanvasStock(), GetCommonAxis(), SetRangeCommonAxis(), UpdateCommonAxis(), UpdateTHStock(), and ~CanvasStock().
|
private |
store the THStocks.
one THStock by pad number, a vector keep numbering for npad as before
more tricky with list.
really needed ? convenient for hiding pad for sure, for other?
Definition at line 67 of file CanvasStock.h.
Referenced by AddListDataStockToMap(), CreateNPad(), DeleteOneTHStock(), GetNPadToPaint(), HideListData(), PrintVector(), SetColor(), ShowListData(), UpdateTHStock(), and ~CanvasStock().